[issue18170] define built-in exceptions in Python code

2013-06-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: I suppose you'd better hope that there are no errors loading said frozen module. :) -- nosy: +benjamin.peterson ___ Python tracker ___ _

[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines

2013-06-09 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue18054] Add more exception related assertions to unittest

2013-06-09 Thread Nick Coghlan
Nick Coghlan added the comment: I think something like "assertThat" could address the problem nicely. Probably best to propose it as a separate issue, then we can make this one depend on that one if we decide to go that way. -- ___ Python tracker <

[issue18171] os.path.expanduser does not use the system encoding

2013-06-09 Thread Pascal Garcia
New submission from Pascal Garcia: The name of the user contains accents under windows. This error occurs when using the function. expaduser("~") UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 10: ordinal not in range(128) ascii is the default encoding as sys.getdefaulte

[issue18172] New easter egg: insecure string pickle

2013-06-09 Thread flying sheep
New submission from flying sheep: the second meaning of the error message “insecure string pickle” inspired at least two different people independently of drawing it. i’d wish for a link to one of those pics in the docstring or message of the error. picture: http://i.imgur.com/To3DQ6J.jpg thr

[issue18106] There are unused variables in Lib/test/test_collections.py

2013-06-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: Fixed the test based on Ezio Melotti's advice. However, Ezio did not comment specifically about whether we should cut or keep this line. self.assertEqual(list(dup.items()), list(od.items())) After studying the OrderedDict source code, I came to conclusion that

[issue18172] New easter egg: insecure string pickle

2013-06-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +alexandre.vassalotti, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue18171] os.path.expanduser does not use the system encoding

2013-06-09 Thread R. David Murray
R. David Murray added the comment: I could not reproduce this error on Linux with python2.7. -- nosy: +haypo, r.david.murray ___ Python tracker ___ __

[issue18171] os.path.expanduser does not use the system encoding

2013-06-09 Thread R. David Murray
R. David Murray added the comment: Also, it would be helpful for you to show a full traceback, since there can be spurrious sources of unicode errors on Windows depending on how you execute your code. -- ___ Python tracker

[issue18173] Add MixedTypeKey to reprlib

2013-06-09 Thread Nick Coghlan
New submission from Nick Coghlan: Armin Ronacher pointed out that one downside of the removal of implicit cross-type comparisons in Python 3 is that it makes it harder to produce a stable repr for mixed-type containers. This seems like a valid point to me, so I propose adding a suitable "Mixe

[issue18038] Unhelpful error message on invalid encoding specification

2013-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 15aa786b723b by Serhiy Storchaka in branch '3.3': Issue #18038: SyntaxError raised during compilation sources with illegal http://hg.python.org/cpython/rev/15aa786b723b New changeset 39e2f0059ee2 by Serhiy Storchaka in branch 'default': Issue #18038

[issue15239] Abandoned Tools/unicode/mkstringprep.py

2013-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8f95d77443da by Serhiy Storchaka in branch '3.3': Issue #15239: Make mkstringprep.py work again on Python 3. http://hg.python.org/cpython/rev/8f95d77443da New changeset 4abe61a412be by Serhiy Storchaka in branch 'default': Issue #15239: Make mkstrin

[issue18038] Unhelpful error message on invalid encoding specification

2013-06-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue15239] Abandoned Tools/unicode/mkstringprep.py

2013-06-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue18171] os.path.expanduser does not use the system encoding

2013-06-09 Thread Pascal Garcia
Pascal Garcia added the comment: Here are 2 logs one with the default site.py forcing defaultencoding to ascii, and the other to utf8. You can see that the home dir includes accents : Pépé Not an insult to anybody but this stupid computer :) When I force using the locale.getdefaultlocale() as

[issue18143] ssl.get_default_verify_paths()

2013-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset a4d31e56075d by Christian Heimes in branch 'default': Issue #18143: Implement ssl.get_default_verify_paths() in order to debug http://hg.python.org/cpython/rev/a4d31e56075d -- nosy: +python-dev ___ Python

[issue14015] surrogateescape largely missing from documentation

2013-06-09 Thread A.M. Kuchling
A.M. Kuchling added the comment: Here's a proposed patch that touches the Sphinx documentation and a docstring in codecs.py. The text is slightly revised from my current revisions to the Unicode howto. help(open) says "See the documentation for codecs.register for a list of the permitted enc

[issue18171] os.path.expanduser does not use the system encoding

2013-06-09 Thread R. David Murray
R. David Murray added the comment: On linux as well this fails: os.path.expanduser(u'~' + os.sep) But this works: os.path.expanduser('~' + os.sep) Counterintuitive, to say the least. The reason is that the value of the HOME environment variable is read as a byte string, but when that by

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-06-09 Thread Eli Bendersky
Eli Bendersky added the comment: LGTM. I suggest you wait for a couple of days to see if others have any critical comments and then commit. -- ___ Python tracker ___ __

[issue18171] os.path.expanduser does not use the system encoding

2013-06-09 Thread Pascal Garcia
Pascal Garcia added the comment: Sorry for this error. Thanks for the solution. Here is the code as I modify it. wrkdir= os.path.expanduser("~"+os.sep) loc = locale.getdefaultlocale() if loc[1]: encoding = loc[1] wrkdir= wrkdir.

[issue18171] os.path.expanduser does not use the system encoding

2013-06-09 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> invalid status: open -> closed type: -> behavior ___ Python tracker ___ ___ Python-bu

[issue17134] Use Windows' certificate store for CA certs

2013-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 10d325f674f5 by Christian Heimes in branch 'default': Issue #17134: Add ssl.enum_cert_store() as interface to Windows' cert store. http://hg.python.org/cpython/rev/10d325f674f5 -- nosy: +python-dev ___ Py

[issue17134] Use Windows' certificate store for CA certs

2013-06-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > New changeset 10d325f674f5 by Christian Heimes in branch 'default': > Issue #17134: Add ssl.enum_cert_store() as interface to Windows' cert store. > http://hg.python.org/cpython/rev/10d325f674f5 I don't want to sound annoying, but I would have liked to review

[issue18101] Tk.split() doesn't work with nested Unicode strings

2013-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ezio, have you reviewed the main code? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue16741] `int()`, `float()`, etc think python strings are null-terminated

2013-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. It now reuses code for bytes->int in longobject.c and abstract.c, doesn't raise UnicodeDecodeError for non-utf-8 bytes, and always reports an invalid bytes literal as a bytes object. -- Added file: http://bugs.python.org/file30515/int_

[issue18101] Tk.split() doesn't work with nested Unicode strings

2013-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are patches with updated tests as Ezio suggested. -- Added file: http://bugs.python.org/file30516/tkinter_split_nested_unicode_2.patch ___ Python tracker __

[issue18101] Tk.split() doesn't work with nested Unicode strings

2013-06-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file30517/tkinter_split_nested_unicode-2.7_2.patch ___ Python tracker ___ __

[issue16102] uuid._netbios_getnode() is outdated

2013-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 27f55ff12f41 by Serhiy Storchaka in branch '3.3': Issue #16102: Make uuid._netbios_getnode() work again on Python 3. http://hg.python.org/cpython/rev/27f55ff12f41 New changeset 4a0017722910 by Serhiy Storchaka in branch 'default': Issue #16102: Make

[issue16102] uuid._netbios_getnode() is outdated

2013-06-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-06-09 Thread Zachary Ware
Zachary Ware added the comment: enum.rst will need to be added to a table of contents page somewhere, I would guess possibly Development Tools (Doc/library/development.rst) or maybe Data Types (Doc/library/datatypes.rst). I would trust almost anybody else's opinion over mine on where it shoul

[issue17944] Refactor test_zipfile

2013-06-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18174] Make regrtest with --huntrleaks check for fd leaks

2013-06-09 Thread Richard Oudkerk
New submission from Richard Oudkerk: regrtest already tests for refcount leaks and memory allocation leaks. It can also be made to check for file descriptor leaks (and perhaps also handles on Windows). Running with the attached patch makes it look like test_openpty, test_shutil, test_subproc

[issue18138] ssl.SSLContext.add_cert()

2013-06-09 Thread Christian Heimes
Christian Heimes added the comment: New patch: * rename function to add_ca_cert() * only accept CA certs, no other certs * raise an error if extra data is found after cert (e.g. two certs). PEM_read_bio_X509() silently ignores extra data * fixes from Ezio's code review * documentation

[issue17394] Add slicing support to collections.deque

2013-06-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: The slicing support can be implemented using just rotates, appends, and pops. -- assignee: rhettinger -> nosy: +serhiy.storchaka priority: low -> normal stage: -> needs patch type: -> enhancement ___ Python trac

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2013-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are other inconsistencies. email.quoprimime.decode(), binascii.a2b_qp() and pure Python (by default binascii used) quopri.decodestring() returns different results for following data: quoprimime binascii quopri b'=' '' b''

[issue18175] os.listdir(fd) leaks fd on error

2013-06-09 Thread Richard Oudkerk
New submission from Richard Oudkerk: If os.listdir() is used with an fd, but fdopendir() fails (e.g. if the the fd is a normal file) then a duplicated fd is leaked. This explains the leaks in test_shutil mentioned in #18174. -- messages: 190875 nosy: sbt priority: normal severity: norm

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2013-06-09 Thread R. David Murray
R. David Murray added the comment: Most of the variations represent different invalid-input recovery choices. I believe binascii's decoding of b'= \n' is incorrect, as is its decoding of b'==41'. quopri's decoding of b'=\r' is arguably incorrect as well, given that python generally supports

[issue18175] os.listdir(fd) leaks fd on error

2013-06-09 Thread R. David Murray
Changes by R. David Murray : -- nosy: +larry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue6632] Include more chars in the decimal codec

2013-06-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am changing the title slightly to include '\N{MINUS SIGN}' in the scope of this issues. See [1]: "Unless anyone can point me to a case where \N{MINUS SIGN} should not be treated as a (duh) minus sign, we should go and try to make life easier for our u

[issue18176] Builtins documentation refers to old version of UCD.

2013-06-09 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: Reference to http://www.unicode.org/Public/6.0.0/ucd/extracted/DerivedNumericType.txt in http://docs.python.org/3.4/library/stdtypes.html#numeric-types-int-float-complex should be changed to http://www.unicode.org/Public/6.1.0/ucd/extracted/DerivedNum

[issue18162] Add index attribute to IndexError

2013-06-09 Thread Brett Cannon
Brett Cannon added the comment: Yes, I mean weakref. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue18170] define built-in exceptions in Python code

2013-06-09 Thread Brett Cannon
Brett Cannon added the comment: Yeah, that's the tricky bit. =) That's why I was thinking of starting with the leaf exceptions and then just slowly working down the hierarchy until I hit exceptions that just had to exist in C code (e.g. BaseException, Exception, and maybe SyntaxError). The res

[issue6632] Include more chars in the decimal codec

2013-06-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: As a design principle, "accept what's unambiguous in any locale" is reasonable, but it is hard to apply consistently. I would agree that the status quo is hard to defend. After a long discussion, it has been accepted that fullwidth digits should be acc

[issue18177] Typo in Documents

2013-06-09 Thread icedream91
New submission from icedream91: In library.pdf file(Release 3.3.2, June 09, 2013), I found a typo in page 149: I think the quotation marks are wrong in "datetime.isoformat(sep=’T’)" sentence, they should both be "'". But it's right in online documents (http://docs.python.org/3/library/datetime

[issue18175] os.listdir(fd) leaks fd on error

2013-06-09 Thread Larry Hastings
Larry Hastings added the comment: Duplicate of #17899. -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed type: -> resource usage ___ Python tracker _

[issue18172] New easter egg: insecure string pickle

2013-06-09 Thread Brian Curtin
Brian Curtin added the comment: Sorry, I don't think this is something we can do. We're not going to put an image link into an exception message or docstring. -- nosy: +brian.curtin stage: -> committed/rejected status: open -> closed ___ Python trac

[issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory

2013-06-09 Thread Larry Hastings
Larry Hastings added the comment: Second rev incorporating a suggestion from the ever-present Serhiy. Also, for what it's worth, I walked through this with the debugger when using os.listdir(0) and it worked fine. -- Added file: http://bugs.python.org/file30520/larry.listdir.fd.leaka

[issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory

2013-06-09 Thread Larry Hastings
Larry Hastings added the comment: Here's a patch for 3.3. There's been enough churn around listdir in trunk that I was gonna have to write the patches separately anyway. -- Added file: http://bugs.python.org/file30521/larry.3.3.listdir.fd.leakage.bug.1.patch _

[issue18172] New easter egg: insecure string pickle

2013-06-09 Thread Ezio Melotti
Changes by Ezio Melotti : -- resolution: -> rejected versions: +Python 3.4 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list ma

[issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory

2013-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: rewinddir() is called only when dirp != NULL && fd > -1. fdopendir() is called when fd != -1. close() is called when dirp == NULL && fd != -1. Therefore rewinddir() and fdopendir() with close() can't be called in the same time. And you can move block if

[issue18168] plistlib output self-sorted dictionary

2013-06-09 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'm reworking the patch in #14455 and one of the things I intend to do is to add a keyword argument that controls whether or not the keys in dictionaries will be sorted by plistlib. -- ___ Python tracker

[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-06-09 Thread Stefan Drees
Changes by Stefan Drees : -- nosy: +dilettant ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2013-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perl's MIME::QuotedPrint produces same result as pure Python quopri. konwert qp-8bit produces same result as binascii (except '==41' it decodes as '=A'). RFC 2045 says: """A reasonable approach by a robust implementation might be to inclu