[issue11694] xdrlib raises ConversionError in inconsistent way

2011-09-17 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Patch with tests. -- keywords: +patch Added file: http://bugs.python.org/file23178/11694.patch ___ Python tracker <http://bugs.python.org/issue11

[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS

2011-12-10 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Patch with tests. -- keywords: +patch nosy: +gruszczy Added file: http://bugs.python.org/file23906/13544.patch ___ Python tracker <http://bugs.python.org/issue13

[issue13568] sqlite3 convert_date error with DATE type

2011-12-10 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: c.execute("insert into testdate values ('now')") This works, but you actually are putting string "now" into a field with DATE type. When conversion occurs after retrieving data, there is an error. Also if you use datetime(

[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS

2011-12-11 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I didn't know about `make patchcheck`, next time I will use it, thanks. -- ___ Python tracker <http://bugs.python.org/is

[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS

2011-12-11 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Fixed tests. -- Added file: http://bugs.python.org/file23912/13544_2.patch ___ Python tracker <http://bugs.python.org/issue13

[issue13521] Make dict.setdefault() atomic

2011-12-11 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I have written a patch and a test, but since it's changing C code, I am far from being sure if it's achieve the expected behavior in the right way. There are also tests and running whole test suite didn't bring any errors. -- k

[issue13521] Make dict.setdefault() atomic

2011-12-11 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Also: I'll be happy to work further on this patch, if I get some comments and advice. -- ___ Python tracker <http://bugs.python.org/is

[issue13521] Make dict.setdefault() atomic

2011-12-11 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Done. -- Added file: http://bugs.python.org/file23918/13521_2.patch ___ Python tracker <http://bugs.python.org/issue13

[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS

2011-12-12 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Pleasure :-) -- ___ Python tracker <http://bugs.python.org/issue13544> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13521] Make dict.setdefault() atomic

2011-12-12 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I haven't given it much thought, when I was making the choice of using nonlocal rather than self.count. I was rather excited to see, if the change will work as I wanted it to. If you believe it would be better to use an attribute, I'll be happy

[issue13521] Make dict.setdefault() atomic

2011-12-12 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I'll send a patch, when I get home from work. -- ___ Python tracker <http://bugs.python.org/issue13521> ___ ___ Pytho

[issue13521] Make dict.setdefault() atomic

2011-12-12 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I have tried to port patch to python2.7, but apparently I must be doing something wrong, because while most tests pass, several fail (including tests for unittest itself). I would like to continue working on this test, but incoming week is pretty

[issue13521] Make dict.setdefault() atomic

2011-12-18 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Patch for 2.7. -- Added file: http://bugs.python.org/file24035/13521_27_1.patch ___ Python tracker <http://bugs.python.org/issue13

[issue11807] Documentation of add_subparsers lacks information about parametres

2011-12-18 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Fixed patch. -- Added file: http://bugs.python.org/file24042/11807_2.patch ___ Python tracker <http://bugs.python.org/issue11

[issue13690] Add DEBUG flag to documentation of re.compile

2011-12-31 Thread Filip Gruszczyński
New submission from Filip Gruszczyński : This is a useful flag and it would be good, if it was in documentation. -- messages: 150423 nosy: gruszczy priority: normal severity: normal status: open title: Add DEBUG flag to documentation of re.compile

[issue13690] Add DEBUG flag to documentation of re.compile

2011-12-31 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : -- keywords: +patch Added file: http://bugs.python.org/file24118/13690.patch ___ Python tracker <http://bugs.python.org/issue13

[issue13521] Make dict.setdefault() atomic

2012-01-08 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Bump! There was no activity here for two weeks. Is my patch for 2.7 ok or should I do something more about it? -- ___ Python tracker <http://bugs.python.org/issue13

[issue13521] Make dict.setdefault() atomic

2012-01-08 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I understand you are talking about this call: mp->ma_lookup(mp, key, hash); I haven't noticed that earlier. I'll try to provide a better fix (for 2.7 first, after we agree it's good enough, I will provide one for 3.3). Do you have any

[issue13521] Make dict.setdefault() atomic

2012-01-08 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Thanks, I'll try that. Like before I will probably find time next weekend. -- ___ Python tracker <http://bugs.python.org/is

[issue12318] list + tuple inconsistency

2011-06-11 Thread Filip Gruszczyński
New submission from Filip Gruszczyński : You can do this: >>> [1] + (1,) Traceback (most recent call last): File "", line 1, in TypeError: can only concatenate list (not "tuple") to list But you can do this: >>> result = [1] >>> result

[issue12318] list + tuple inconsistency

2011-06-11 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Obviously first sentence should be "You can't do this:". -- ___ Python tracker <http://bugs.python.org/issue12318> ___ _

[issue11767] Maildir iterator leaks file descriptors by default

2011-06-17 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Should I try to do something about this right now or should I wait until #1170 is finished&closed and only then try to fix this issue too? -- ___ Python tracker <http://bugs.python.org/iss

[issue6584] gzip module has no custom exception

2011-06-17 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Bump! Antoine, do you think the patch is acceptable and can be committed now? -- ___ Python tracker <http://bugs.python.org/issue6

[issue12354] packaging.pypi.simple docs use both client and crawler variable, which might be confusing

2011-06-17 Thread Filip Gruszczyński
New submission from Filip Gruszczyński : In documentation for packaging.pypi.simple in first code snippet crawler variable is created on which further operations will be performed. However in all next snippets there is client variable, which is a little confusing on first sight. This could be

[issue12354] packaging.pypi.simple docs use both client and crawler variable, which might be confusing

2011-06-17 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: And a small, quick patch to docs. -- keywords: +patch Added file: http://bugs.python.org/file22396/12354.patch ___ Python tracker <http://bugs.python.org/issue12

[issue12348] case sensitivity in packaging.pypi.simple.Crawler

2011-06-17 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: When I started looking at this I noticed following behaviour: >>> from packaging.pypi.simple import Crawler >>> client = Crawler() >>> client.get_releases('webob') Traceback (most recent call last): File "&quo

[issue12355] Crawler doesn't follow redirection

2011-06-17 Thread Filip Gruszczyński
New submission from Filip Gruszczyński : When looking at issue #12348 I have noticed following behaviour: from packaging.pypi.simple import Crawler c = Crawler() c.get_releases('webob') Traceback (most recent call last): File "test_crawl.py", line 3, in c.get_rele

[issue12355] Crawler doesn't follow redirection

2011-06-17 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: OK, I'll try to come up with some patch. -- ___ Python tracker <http://bugs.python.org/issue12355> ___ ___ Pytho

[issue11174] add argparse formatting option to display type names for metavar

2011-02-26 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: First draft of patch with this functionality. Test, patch and docs are included. I'll gladly work further on this, so I would appreciate some advice and suggestions. -- keywords: +patch nosy: +gruszczy Added file: http://bugs.python.org/file

[issue11140] threading.Lock().release() raises _thread.error, not RuntimeError

2011-02-27 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Test for releasing unacquired lock and aliasing exception. -- keywords: +patch nosy: +gruszczy Added file: http://bugs.python.org/file20936/11140.patch ___ Python tracker <http://bugs.python.org/issue11

[issue5979] strptime() gives inconsistent exceptions

2011-02-27 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: But this is exactly how strptime in C. Consider this: #include #include #include #include int main(){ char buf[255]; struct tm tm; memset(&tm, 0, sizeof(tm)); strptime("123", "%m%d", &tm); st

[issue8933] Invalid detection of metadata version

2011-02-27 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Here is a simple patch, that sets metadata version in PKG-INFO to 1.1, if finds classifier or download_url parametres in setup. If it's any good, I'll try to write a test. If not, I'll be happy to get some advice on how to provid

[issue8933] Invalid detection of metadata version

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I'll get down to it. -- ___ Python tracker <http://bugs.python.org/issue8933> ___ ___ Python-bugs-list mailing list

[issue8933] Invalid detection of metadata version

2011-03-01 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : Removed file: http://bugs.python.org/file20942/8933.patch ___ Python tracker <http://bugs.python.org/issue8933> ___ ___ Python-bugs-list m

[issue8933] Invalid detection of metadata version

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Patch with tests. Hope this is enough. -- Added file: http://bugs.python.org/file20956/8933.patch ___ Python tracker <http://bugs.python.org/issue8

[issue8841] GetoptError strings should be localized

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I'd be happy to provide a patch. How about extending getopt api to something like this: >> optlist, args = getopt.getopt(['-b'], 'e', not_recognized="no %s option, >> mate!") GetoptError: no -b option,

[issue8841] GetoptError strings should be localized

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: One more solution. Maybe getopt should expose variables that hold error messages (rather than have them hardcoded in the code), that can be simply substituted by the user before he runs getopt? But I don't really like thi

[issue8841] GetoptError strings should be localized

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I understand I should do something similar to what is done in argparse: from gettext import gettext as _, ngettext ... message = ngettext('conflicting option string: %s', 'conflicting option strings: %s',

[issue8841] GetoptError strings should be localized

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Here is a small patch. Could you advise me, how can I test it now? Or is it an issue, that doesn't require writing new tests? -- keywords: +patch Added file: http://bugs.python.org/file20970/8841.

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Filip Gruszczyński
New submission from Filip Gruszczyński : In http://bugs.python.org/issue8841 Eric asked to open a new ticket about localisation of getopt error messages. I attach a patch. -- files: 8841.patch keywords: patch messages: 129865 nosy: eric.araujo, gruszczy priority: normal severity

[issue8841] getopt errors should be specialized

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Here it is: http://bugs.python.org/issue11371 -- ___ Python tracker <http://bugs.python.org/issue8841> ___ ___ Python-bug

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Yes, I have run ./python -m test -v test_getopt and it was ok. Running xgettext --from-code utf-8 getopt.py produces no output. -- ___ Python tracker <http://bugs.python.org/issue11

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Cool, thanks for all your advice. -- status: pending -> open ___ Python tracker <http://bugs.python.org/issue11371> ___ _

[issue1559549] ImportError needs attributes for module and file name

2011-03-02 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : -- nosy: +gruszczy ___ Python tracker <http://bugs.python.org/issue1559549> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1559549] ImportError needs attributes for module and file name

2011-03-06 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: This is a draft of a patch. I have only used this new ImportError api in once place, so it would work with following code: >>> try: ... import nosuchmodule ... except ImportError as e: ... print(e.module) ... nosuchmodule I have lit

[issue1559549] ImportError needs attributes for module and file name

2011-03-07 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I am sorry again for those mistakes, it's all completely new to me. I have fixed those issues and created new patch. Using hg export, that now spans over two commits. Is it the way those patches should be provided, or should I gather all changes i

[issue8933] Invalid detection of metadata version

2011-03-10 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Bump! How about applying this patch, Eric? Or maybe there is something else, that needs to be done. If so, I'll be happy to do it. -- ___ Python tracker <http://bugs.python.org/i

[issue8933] Invalid detection of metadata version

2011-03-10 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Sure :-) -- ___ Python tracker <http://bugs.python.org/issue8933> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8933] Invalid detection of metadata version

2011-03-12 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Here is patch for distutils2. Or maybe you would prefer a patch made by hg export? -- Added file: http://bugs.python.org/file21095/disutils2_8933.patch ___ Python tracker <http://bugs.python.org/issue8

[issue6584] gzip module has no custom exception

2011-03-14 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Bump! How about commiting this patch? Or maybe there is something missing? I'll be happy to fix it. -- ___ Python tracker <http://bugs.python.org/i

[issue6584] gzip module has no custom exception

2011-03-14 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I'll be very happy to fix this after Friday. Thanks for your comments. -- ___ Python tracker <http://bugs.python.org/i

[issue6584] gzip module has no custom exception

2011-03-15 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I had some time today, so I managed to fix the patch. I hope now everything is ok. -- Added file: http://bugs.python.org/file21209/6584_3.patch ___ Python tracker <http://bugs.python.org/issue6

[issue1559549] ImportError needs attributes for module and file name

2011-03-15 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I didn't know about this mq extension. I will do a proper patch with a test after friday. -- ___ Python tracker <http://bugs.python.org/issu

[issue11371] Localization of error messages in getopt

2011-03-16 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Bump! Hi Eric, there was no negative feedback for two weeks. How about commiting the patch? -- ___ Python tracker <http://bugs.python.org/issue11

[issue1559549] ImportError needs attributes for module and file name

2011-03-18 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : Removed file: http://bugs.python.org/file21020/1559549_1.patch ___ Python tracker <http://bugs.python.org/issue1559549> ___ ___ Python-bug

[issue1559549] ImportError needs attributes for module and file name

2011-03-18 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : Removed file: http://bugs.python.org/file21031/1559549_2.patch ___ Python tracker <http://bugs.python.org/issue1559549> ___ ___ Python-bug

[issue1559549] ImportError needs attributes for module and file name

2011-03-18 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Ok, here is a patch created using mq. I have a problem, however. I managed to solve following situation: try: raise ImportError('failed import' module_name='somemodule') except ImportError as e: print(e.module_name) that wo

[issue11174] add argparse formatting option to display type names for metavar

2011-03-26 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Well, since you are the designer of the package, I believe you have better knowledge on how to extend it :-). I just provided a patch according to what you described in the first message. Anyway having separate help formatter seems better than bloating

[issue9696] xdrlib's pack_int generates DeprecationWarnings for negative in-range values

2011-03-27 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Here is a test and a patch. -- keywords: +patch nosy: +gruszczy Added file: http://bugs.python.org/file21426/9696.patch ___ Python tracker <http://bugs.python.org/issue9

[issue9544] xdrlib.Packer().pack_fstring throws a TypeError when called with a str()

2011-03-27 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Here is a simple patch with a test. Depending o bytes in this library seems strange, maybe it should be changed somehow? Anyway, this simple patch should be a quick fix to the problem. -- keywords: +patch nosy: +gruszczy Added file: http

[issue11694] xdrlib raises ConversionError in inconsistent way

2011-03-27 Thread Filip Gruszczyński
New submission from Filip Gruszczyński : xdrlib defines ConversionError, but very seldom uses it. For example: def pack_float(self, x): try: self.__buf.write(struct.pack('>f', x)) except struct.error as msg: raise ConversionError(msg) But it doesn

[issue9696] xdrlib's pack_int generates DeprecationWarnings for negative in-range values

2011-03-27 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I believe this should be applied also against 3.3. I was working on this using 3.3 code base, so it is not working there too. -- ___ Python tracker <http://bugs.python.org/issue9

[issue9696] xdrlib's pack_int generates DeprecationWarnings for negative in-range values

2011-03-27 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I'm sorry, I wasn't hurrying you. Just wanted to make sure you know. -- ___ Python tracker <http://bugs.python.

[issue9544] xdrlib.Packer().pack_fstring throws a TypeError when called with a str()

2011-03-28 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue9544> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11707] Create C version of functools.cmp_to_key()

2011-03-29 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : -- nosy: +gruszczy ___ Python tracker <http://bugs.python.org/issue11707> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10791] Wrapping TextIOWrapper around gzip files

2011-04-01 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Is following change in GzipFile class enough: def read1(self, n): return self.read(n) ? This satisfies TextIOWrapper to run readline correctly. -- nosy: +gruszczy ___ Python tracker <h

[issue11740] difflib html diff takes extremely long

2011-04-01 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : -- nosy: +gruszczy ___ Python tracker <http://bugs.python.org/issue11740> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11740] difflib html diff takes extremely long

2011-04-02 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: The culprit seems to be Differ._fancy_replace. There is a nasty quadratic loop there, that has pretty complex internal code. I have done a quick a fix, that makes example run below a second at the expense of not calling _fancy_replace for longer chunks

[issue8905] difflib should accept arbitrary line iterators

2011-04-02 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : -- nosy: +gruszczy ___ Python tracker <http://bugs.python.org/issue8905> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2011-04-02 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Check also this: http://bugs.python.org/issue11740 -- nosy: +gruszczy ___ Python tracker <http://bugs.python.org/issue6

[issue11707] Create C version of functools.cmp_to_key()

2011-04-02 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Here is a patch that passes functools tests. I'll be happy to work on it further. -- keywords: +patch Added file: http://bugs.python.org/file21504/11707.patch ___ Python tracker <http://bugs.py

[issue11707] Create C version of functools.cmp_to_key()

2011-04-02 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Ok, here is patch that keep python implementation of cmp_to_key if C version can't be imported. Thanks again for you help :-) -- Added file: http://bugs.python.org/file21505/11707_2.patch ___ Python tr

[issue11707] Create C version of functools.cmp_to_key()

2011-04-03 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I worked a little on the tests. Only then I have noticed, that cmp_to_key tests weren't run, so I have encountered some problems, when I finally turned them on. I have added some of my tests, fixed some things in the patch and now it seems to work

[issue11707] Create C version of functools.cmp_to_key()

2011-04-04 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Here are some example performance results: def cmp(x, y): return y - x sorted(range(1, 1000), key=cmp_to_key(cmp)) ''' C version: real0m19.994s user0m8.053s sys 0m1.044s Python version: real0m28.825s user

[issue11707] Create C version of functools.cmp_to_key()

2011-04-05 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I have a follow-up question: why keyobject_type needed traverse function? From what I read in docs I assumed it is required for GC tracked types. Why was it required here and how it is used? -- ___ Python

[issue11707] Create C version of functools.cmp_to_key()

2011-04-05 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I see. Thanks :-) -- ___ Python tracker <http://bugs.python.org/issue11707> ___ ___ Python-bugs-list mailing list Unsub

[issue11767] Maildir iterator leaks file descriptors by default

2011-04-06 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Shouldn't this be your responsibility to close this descriptor in the object used as self._factory? When self._factory is called it should read from the file like object and then simply close it, just as get_message (when self._factory is not pro

[issue11767] Maildir iterator leaks file descriptors by default

2011-04-06 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: How about this? Though I have no idea, how a test could be created for this. If someone could advise me on that, I'll be happy to write tests/work further on the patch. -- keywords: +patch Added file: http://bugs.python.org/file21554/11767.

[issue11767] Maildir iterator leaks file descriptors by default

2011-04-07 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Here is a new patch, that uses with in __getitem__. I wonder, if we shouldn't check for an AttributeError in case object returned by get_file doesn't have __exit__ method, but does have close and use close instead of with. But it's for yo

[issue11767] Maildir iterator leaks file descriptors by default

2011-04-07 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I am sorry. This is the first time I see contextlib and haven't understood, that I should use a function from it. Here is a version with mock object having close method and __getitem__ using contextlib.closing. -- Added file:

[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2011-04-08 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I have no idea how I should do this. If you explain to me, how it should be done, I'll be happy to do this from now on :-) -- ___ Python tracker <http://bugs.python.org/i

[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2011-04-08 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Here it is. -- keywords: +patch Added file: http://bugs.python.org/file21588/11740.patch ___ Python tracker <http://bugs.python.org/issue6

[issue11807] Documentation of add_subparsers lacks information about parametres

2011-04-09 Thread Filip Gruszczyński
New submission from Filip Gruszczyński : In argparse documentation parametres of add_subparsers are not listed. And yet there are some really useful parametres like parser_class. It would be useful, it they were described there well and one wouldn't have to look into the code to find

[issue11807] Documentation of add_subparsers lacks information about parametres

2011-04-09 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : -- nosy: +bethard ___ Python tracker <http://bugs.python.org/issue11807> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11807] Documentation of add_subparsers lacks information about parametres

2011-04-10 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Here is a patch for this. I am not much of technical writer, so please be patient with me. I tried to provide all the information about parameters, that can be inferred from the code and experimenting. I have left out one parameter - action - because I

[issue11841] Bug in the verson comparison

2011-04-13 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Here is a patch that I made against distutils2 tip. I have changed _FINAL_MARKER from 'f' to 'z', which works with rc. Also I have added constant _FINAL_MARKER_CHAR, since later in the code you make a check against 'f' an

[issue9544] xdrlib.Packer().pack_fstring throws a TypeError when called with a str()

2011-04-14 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Actually documentation doesn't say that it supports only bytes, but: "The following methods support packing strings, bytes, and opaque data:" Also under python2 you can easily do this: In [1]: import xdrlib In [2]: p = xdrlib.

[issue9544] xdrlib.Packer().pack_fstring throws a TypeError when called with a str()

2011-04-14 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I am well aware of this, Benjamin. I am not trying to force any solution, but rather trying to point out, that current documentation is misleading. There might be no need for patching the code, but rather updating the docs to say, that only bytes are

[issue9544] xdrlib.Packer().pack_fstring throws a TypeError when called with a str()

2011-04-14 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I'll provide docs patch. -- assignee: -> docs@python components: +Documentation -None nosy: +docs@python ___ Python tracker <http://bugs.python.or

[issue11841] Bug in the verson comparison

2011-04-15 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: The reason for the use of two constants is that previously there was comparison in the code with a hardcoded 'f': if postdev[0] == 'f': I think it's a common practice to create constants for such hardcoded values.

[issue11841] Bug in the verson comparison

2011-04-15 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I understand that ML is mailing list, but I have no idea what is fellowship mailing list. Could you elaborate on this? -- ___ Python tracker <http://bugs.python.org/issue11

[issue8933] Invalid detection of metadata version

2011-04-19 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Bump! How about commiting this patch, Eric? -- status: pending -> open ___ Python tracker <http://bugs.python.org/iss

[issue11881] Add list.get

2011-04-19 Thread Filip Gruszczyński
New submission from Filip Gruszczyński : I have proposed on Core Mentorship list to add get(index, default) method to list object. I was suggested to bring it up here and also told, that improving operator module could be a better solution. This is why I would like to ask, if it makes sense

[issue11881] Add list.get

2011-04-19 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Nick Coghlan suggested, that operator.getitem could be extended to accept default value. How does it sound to you? -- ___ Python tracker <http://bugs.python.org/issue11

[issue6584] gzip module has no custom exception

2010-03-16 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I have created a small patch, that introduces BadGzipFile exception. It is a subclass of IOError, so it would be backward compatible and will be still caught by old code, but this way is distinct from IOError. -- keywords: +patch nosy: +gruszczy

[issue6584] gzip module has no custom exception

2010-03-16 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Modified patch with test, that catches both BadGzipFile and IOError exceptions. -- Added file: http://bugs.python.org/file16566/6584_2.patch ___ Python tracker <http://bugs.python.org/issue6

[issue6081] str.format_from_mapping()

2010-03-18 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I have created a small patch, that adds method that formats using a dict. It's the first time I have written anything in python implementation, so I would very appreciate any advice. Change allows the following: >>> m = Mapping(a=&#

[issue6081] str.format_from_mapping()

2010-03-18 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: My first intention was simply to push mapping from args to kwargs, just like Eric suggested, but that didn't help with __missing__, only with accepting a dict instead of pushing keyword arguments. I didn't like explicitly asking for __missin

[issue6081] str.format_from_mapping()

2010-03-19 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Could you point me, where to add tests and documentation? I would happily add those. -- ___ Python tracker <http://bugs.python.org/issue6

[issue6081] str.format_from_mapping()

2010-03-19 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Ok, unfortunately this code won't work for certain tests. Take those: self.assertEqual("My name is {0}".format('Fred'), "My name is Fred") We pass only one argument, which is a dict and this won't sati

  1   2   >