[issue18110] Nested set comprehensions in class scope fail

2013-06-10 Thread Mark Dickinson
Mark Dickinson added the comment: While I agree that this isn't an exact duplicate of #3692, the underlying cause is the same, and Python is working as designed and documented in this case. In Python 2, list comprehensions don't have their own scope, so the `x` in your initial example lives at

[issue18110] Nested set comprehensions in class scope fail

2013-06-10 Thread Mark Dickinson
Mark Dickinson added the comment: "won't fix" is probably a better resolution. But in the absence of that apostrophe-rich option, I'll use "wont fix" instead. -- resolution: invalid -> wont fix ___ Python tracker

[issue18178] Redefinition of malloc(3) family of functions at build time

2013-06-10 Thread rm
New submission from rm: Hello. Marcel Moolenaar (mar...@freebsd.org) pointed this out after committing FreeBSD revision 250991 [1], that makes the malloc(3) family of functions weak symbols. I'm citing him, because (silly me) I don't understand all of this completely: """ After my commit to h

[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations

2013-06-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4d1e4bc6c5b5 by Ronald Oussoren in branch '2.7': Ensure that the fix for #17269 also works on OSX 10.4 http://hg.python.org/cpython/rev/4d1e4bc6c5b5 New changeset ef103e7e7af2 by Ronald Oussoren in branch '3.3': Ensure that the fix for #17269 also w

[issue17134] Use Windows' certificate store for CA certs

2013-06-10 Thread Christian Heimes
Christian Heimes added the comment: Ezio already reviewed my code. But sure I can wait a couple of days. The second part of the patch depends on #18138 anyway. -- ___ Python tracker ___

[issue18178] Redefinition of malloc(3) family of functions at build time

2013-06-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge ___ Python tracker ___ ___ Python-bugs-list mailin

[issue14455] plistlib unable to read json and binary plist files

2013-06-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've attached issue14455-v2.txt with an updated patch. The patch is still very much a work in progress, I haven't had as much time to work on this as I'd like. This version: * Should apply cleanly to the tip of the default branch * Move around some code. * D

[issue18110] Nested set comprehensions in class scope fail

2013-06-10 Thread Eric Wieser
Eric Wieser added the comment: Thanks for the clarification - this behavior now makes perfect sense to me. As expected, swapping the list comprehension for a generator comprehension, or vice versa, prevents the error. -- ___ Python tracker

[issue18178] Redefinition of malloc(3) family of functions at build time

2013-06-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Said simpler: dlmalloc.c code is indeed compiled twice: - once as part of closures.c, which #include "dlmalloc.c"; this is done carefully (with 'static' and 'USE_DL_PREFIX') to not clash with standard malloc functions. - once as a separate target; without

[issue18179] SMTP.local_hostname is undocumented

2013-06-10 Thread Jonas H.
New submission from Jonas H.: The Sphinx docs don't contain any explanation for `local_hostname`. -- assignee: docs@python components: Documentation messages: 190898 nosy: docs@python, jonash priority: normal severity: normal status: open title: SMTP.local_hostname is undocumented versio

[issue2771] Test issue

2013-06-10 Thread Berker Peksag
Berker Peksag added the comment: Lib/smtplib.py#l226 Lib/smtplib.py:l226 Lib/smtplib.py#226 Lib/smtplib.py:226 -- nosy: +berker.peksag ___ Python tracker ___ _

[issue18179] SMTP.local_hostname is undocumented

2013-06-10 Thread Berker Peksag
Berker Peksag added the comment: The docstring of the SMTP class says: "If specified, `local_hostname` is used as the FQDN of the local host. By default, the local hostname is found using socket.getfqdn()." See Lib/smtplib.py:226. -- nosy: +berker.peksag versions: -Python 2.6, Pytho

[issue18180] Refleak in test_imp on Windows

2013-06-10 Thread Richard Oudkerk
New submission from Richard Oudkerk: Seems to be in error path of _PyImport_GetDynLoadWindows(). -- files: load_dynamic.patch keywords: patch messages: 190901 nosy: sbt priority: normal severity: normal status: open title: Refleak in test_imp on Windows Added file: http://bugs.python.org

[issue14455] plistlib unable to read json and binary plist files

2013-06-10 Thread Ronald Oussoren
Changes by Ronald Oussoren : Added file: http://bugs.python.org/file30525/issue14455-v3.txt ___ Python tracker ___ ___ Python-bugs-list mailin

[issue14455] plistlib unable to read json and binary plist files

2013-06-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: v3 is still a work in progress, and still fails some tests * Replaced test data by data generated by a helper script (to make it easier to update) * Use 'subtest' feature of unittest library in 3.4 * Small tweaks to plist library (the dump/load/dumps/loads

[issue14455] plistlib unable to read json and binary plist files

2013-06-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: See also: #18168: request for the sort_keys option #11101: request for an option to ignore 'None' values when writing #9256: datetime.datetime objects created by plistlib don't include timezone information (and looking at the code I'd say that timezones are ig

[issue18179] SMTP.local_hostname is undocumented

2013-06-10 Thread R. David Murray
R. David Murray added the comment: SMTP.local_hostname is probably a private attribute of the SMTP class, dating from before we started getting strict about having private attributes start with '_'. However, I see no reason to keep it private; we might as well just document it, since I'm sure

[issue18181] super vs. someclass.__getattribute__

2013-06-10 Thread Ronald Oussoren
New submission from Ronald Oussoren: Super() walks the MRO and looks for the looked-up attribute in the __dict__ of types on the MRO. This can cause problems when classes implement __getattribute__: a class on the MRO can implement a method that super() won't find because it isn't in the class

[issue18182] xml.dom.createElement() does not take implicit namespaces into account

2013-06-10 Thread Alexander Tobias Heinrich
New submission from Alexander Tobias Heinrich: First of all, I am not sure, if this is a bug in python itself - it could as well be a bug in the py-dom-xpath module (http://code.google.com/p/py-dom-xpath) or not a bug at all (but I find the latter to be highly unlikely). Consider an XML docum

[issue18183] Calling .lower() on certain unicode string raises SystemError

2013-06-10 Thread Dave Challis
New submission from Dave Challis: This occurred when attempting to decode invalid UTF-8 bytes using "errors='replace'", then attempting to lowercase the produced unicode string. This was also tested in python 2.7, but it doesn't occur there. Code to reproduce: x = b'\xe2\xb3\x99\xb3\xd1\x9f\

[issue18177] Typo in Documents

2013-06-10 Thread A.M. Kuchling
A.M. Kuchling added the comment: Confirmed. I think this is a general typographic issue in the PDF documentation. If I cut-and-paste the datetime.isoformat(sep='T') line from the PDF, the single quotes are pasted as U+2019 RIGHT SINGLE QUOTE. Looking at the library.tex file built by "make

[issue18181] super vs. someclass.__getattribute__

2013-06-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Do you have an example in pure Python code? -- nosy: +amaury.forgeotdarc ___ Python tracker ___ __

[issue18177] Typo in Documents

2013-06-10 Thread R. David Murray
R. David Murray added the comment: I presume that tex doesn't do quote-transformation on code blocks (it is not really smart quotes, since IIRC in tex you actually have to specify ` and ' in the correct places yourself). So perhaps the problem is that the function headers &c aren't being prop

[issue18177] Incorect quote marks in code section-headers in PDF version of docs

2013-06-10 Thread R. David Murray
Changes by R. David Murray : -- title: Typo in Documents -> Incorect quote marks in code section-headers in PDF version of docs ___ Python tracker ___ __

[issue18180] Refleak in test_imp on Windows

2013-06-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset ec854f76d6b9 by Richard Oudkerk in branch '3.3': Issue #18180: Fix ref leak in _PyImport_GetDynLoadWindows(). http://hg.python.org/cpython/rev/ec854f76d6b9 -- nosy: +python-dev ___ Python tracker

[issue18183] Calling .lower() on certain unicode string raises SystemError

2013-06-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Interpreter Core nosy: +serhiy.storchaka stage: -> needs patch versions: +Python 3.4 ___ Python tracker ___ ___

[issue18181] super vs. someclass.__getattribute__

2013-06-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: I didn't, but the attached script should do the trick. The code suffers badly from copy&paste editing, but more or less has the same behavior as PyObjC. It defines a subclass of list (MyList) with an append method, and more importantly also defines 3 "proxy"

[issue14455] plistlib unable to read json and binary plist files

2013-06-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: The test failure I'm getting is caused by a difference in the order in which items are written to the archive. I'm working on a fix. -- ___ 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-10 Thread Chris AtLee
Chris AtLee added the comment: To demonstrate how to hit this in a real use case, run the attached script which implements a simple http server that saves POSTed files to a local file "got_data". It returns the sha1sum of the POSTed file as the http response. Then, create a test file consistin

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

2013-06-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset a7381fe515e8 by Richard Oudkerk in branch '2.7': Issue #18174: Fix fd leaks in tests. http://hg.python.org/cpython/rev/a7381fe515e8 New changeset 46fe1bb0723c by Richard Oudkerk in branch '3.3': Issue #18174: Fix fd leaks in tests. http://hg.python.

[issue18183] Calling .lower() on certain unicode string raises SystemError

2013-06-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Minimal example: >>> '\U0001\U0010'.lower() Traceback (most recent call last): File "", line 1, in SystemError: invalid maximum character passed to PyUnicode_New -- ___ Python tracker

[issue18183] Calling .lower() on certain unicode string raises SystemError

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

[issue18180] Refleak in test_imp on Windows

2013-06-10 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> resource usage versions: +Python 3.3, Python 3.4 ___ Python tracker _

[issue18183] Calling .lower() on certain unicode string raises SystemError

2013-06-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It happens due to use fast MAX_MAXCHAR() which can produce maxchar out of range (0x1 | 0x10 > MAX_UNICODE). -- ___ Python tracker ___

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

2013-06-10 Thread Richard Oudkerk
Richard Oudkerk added the comment: The test_shutil leak is caused by #17899. The others are fixed by a7381fe515e8 and 46fe1bb0723c. -- ___ Python tracker ___ _

[issue18183] Calling .lower() on certain unicode string raises SystemError

2013-06-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: >>> a = chr(0x84b2e)+chr(0x109710) >>> a.lower() SystemError: invalid maximum character passed to PyUnicode_New The MAX_MAXCHAR() macro only works for 'maxchar' values, like 0xff, 0x... in do_upper_or_lower() it's used with arbitrary UCS4 values. --

[issue18181] super vs. someclass.__getattribute__

2013-06-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: issue783528 was a bit similar. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue18181] super vs. someclass.__getattribute__

2013-06-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: Looks like it. That issue was closed without a good reason though. -- ___ Python tracker ___ ___ Py

[issue14455] plistlib unable to read json and binary plist files

2013-06-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: v4 passes the included tests. The testsuite isn't finished yet. -- Added file: http://bugs.python.org/file30530/issue14455-v4.txt ___ Python tracker

[issue18183] Calling .lower() on certain unicode string raises SystemError

2013-06-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 89b106d298a9 by Benjamin Peterson in branch '3.3': remove MAX_MAXCHAR because it's unsafe for computing maximum codepoitn value (see #18183) http://hg.python.org/cpython/rev/89b106d298a9 New changeset 668aba845fb2 by Benjamin Peterson in branch 'de

[issue18183] Calling .lower() on certain unicode string raises SystemError

2013-06-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: I simply removed the MAX_MAXCHAR micro-optimization, since it seems fairly unsafe. Interested parties can restore it safely if they wish. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed __

[issue18183] Calling .lower() on certain unicode string raises SystemError

2013-06-10 Thread STINNER Victor
STINNER Victor added the comment: Oops, my MAX_MAXCHAR macro was too optimized :-) (the result is incorrect) It shows us that the test suite does not have enough test on non-BMP characters. -- ___ Python tracker _

[issue18178] Redefinition of malloc(3) family of functions at build time

2013-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't have a system affected by the change, but the explanation and the patch look right to me. FWIW, the patch applies cleanly to 3.4 head and passes 'make test'. -- stage: -> commit review versions: +Python 3.3, Python 3.4 _

[issue18182] xml.dom.createElement() does not take implicit namespaces into account

2013-06-10 Thread Jeremy Kloth
Jeremy Kloth added the comment: This really is not a bug, but more of a (common) misunderstanding of how the mixing of namespace-aware (createElementNS) and namespace-ignorant (createElement) methods work. >From DOM3 Core >[http://www.w3.org/TR/DOM-Level-3-Core/core.html#Namespaces-Considerat

[issue13248] deprecated in 3.2/3.3, should be removed in 3.4

2013-06-10 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

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

2013-06-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- hgrepos: +197 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

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

2013-06-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- keywords: +patch Added file: http://bugs.python.org/file30531/686836ad3042.diff ___ Python tracker ___ __

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

2013-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is a trivial change, but I would like someone to review this in case there is a better solution to keep this in sync with unicodedata.unidata_version. -- assignee: -> docs@python keywords: +needs review nosy: +docs@python stage: -> commit r

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2013-06-10 Thread Bohuslav "Slavek" Kabrda
Bohuslav "Slavek" Kabrda added the comment: I'm currently patching Python 3.3.2 with this, so I thought it might be nice to attach an up-to-date patch. The only notable difference is that I added self.preclean() at the beginning of test_refcount_errors - without it, running test suite produced

[issue18183] Calling .lower() on certain unicode string raises SystemError

2013-06-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are additional tests for this issue. -- keywords: +patch stage: needs patch -> patch review status: closed -> open Added file: http://bugs.python.org/file30533/test_issue18183.patch ___ Python tracker

[issue10382] Command line error marker misplaced on unicode entry

2013-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The latest patch at #2382 is simpler than mine, so I am closing this as duplicate. -- resolution: -> duplicate status: open -> closed superseder: -> [Py3k] SyntaxError cursor shifted if multibyte character is in line. _

[issue18183] Calling .lower() on certain unicode string raises SystemError

2013-06-10 Thread STINNER Victor
STINNER Victor added the comment: +'\U0001\U0010'.lower() Why not checking the result of these calls? -- ___ Python tracker ___ _

[issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line.

2013-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: haypo> The purpose of this issue is to handle CJK characters taking 2 haypo> columns instead of 1 in a terminal, or did I misunderstand it? That's the other half of the problem, but the more common issue is misplaced caret when non-ascii characters are p

[issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line.

2013-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Serhiy's patch is lacking tests, but it passes the test I proposed at #10382 at attaching here. -- Added file: http://bugs.python.org/file30534/test.py ___ Python tracker ___

[issue18183] Calling .lower() on certain unicode string raises SystemError

2013-06-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The result is trivial. Is not checking the result distract an attention from the main issue? -- ___ Python tracker ___ __

[issue18184] Add range check for %c in PyUnicode_FromFormat

2013-06-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently PyUnicode_FromFormat doesn't check an argument for %c and can raise SystemError only due maxchar check in PyUnicode_New. On 2.7 an error doesn't raised, but %c argument can be silently wrapped (on narrow build) or illegal Unicode string can be cr

[issue18184] Add range check for %c in PyUnicode_FromFormat

2013-06-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file30536/format_c-2.7.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue18184] Add range check for %c in PyUnicode_FromFormat

2013-06-10 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

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

2013-06-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Documentation, Unicode nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list m

[issue3329] API for setting the memory allocator used by Python

2013-06-10 Thread STINNER Victor
STINNER Victor added the comment: py_setallocators-filename.patch: Here is a try to define an API providing the filename and line number of the C code. The Py_SetAllocators() API is unchanged: PyAPI_FUNC(int) Py_SetAllocators( char api, void* (*malloc) (size_t size, void *user_data),

[issue18114] Update PyImport_ImportFrozenModuleObject() to set __package__

2013-06-10 Thread Brett Cannon
Brett Cannon added the comment: Forgot that PyImport_ImportFrozenModule() uses PyImport_ImportFrozenModuleObject() and the former is used to load _frozen_importlib, so can't drop the function. The code could still be updated, though, to set __package__ before the code object is executed. That

[issue18114] Update PyImport_ImportFrozenModuleObject() to set __package__

2013-06-10 Thread Brett Cannon
Brett Cannon added the comment: Marking as easy for any C coders. -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list maili

[issue3329] API for setting the memory allocator used by Python

2013-06-10 Thread STINNER Victor
STINNER Victor added the comment: New version of the patch, py_setallocators-3.patch: - _PyMem_DebugMalloc(), _PyMem_DebugFree() and _PyMem_DebugRealloc() are now setup as hooks to the system allocator and are hook on PyMem API *and* on PyObject API - move "if (size > PY_SSIZE_T_MAX)" check i

[issue18185] Error in test_set.TestVariousIteratorArgs.test_inline_methods

2013-06-10 Thread Sye van der Veen
New submission from Sye van der Veen: I'm working with Python's test suite and noticed this error: http://hg.python.org/cpython/file/668aba845fb2/Lib/test/test_set.py#l1669 # etc... for g in (G, I, Ig, L, R): expected = meth(data) actual = meth(G(data)) # etc... I believe the assign

[issue18168] plistlib output self-sorted dictionary

2013-06-10 Thread halfjuice
halfjuice added the comment: Awesome. Thanks Ronald! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue18048] Merging test_pep263.py and test_coding.py

2013-06-10 Thread Matthew Bentley
Matthew Bentley added the comment: OK, I think I fixed this. I merged the two tests into one, called test_source_encoding.py. It doesn't fail, and I'm not sure what else I need to do. Patch is attached. This is also my first patch, so please tell me if I'm doing anything wrong. -

[issue17963] Deprecate the frame hack for implicitly getting module details

2013-06-10 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue17511] Idle find function closes after each find operation

2013-06-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 73de0794ae71 by Roger Serwy in branch '2.7': #17511: Keep IDLE find dialog open after clicking "Find Next". http://hg.python.org/cpython/rev/73de0794ae71 New changeset dac11f143581 by Roger Serwy in branch '3.3': #17511: Keep IDLE find dialog open a

[issue17511] Idle find function closes after each find operation

2013-06-10 Thread Roger Serwy
Roger Serwy added the comment: I'm closing this issue as fixed. Thank you for the patch, Sarah. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker

[issue18185] Error in test_set.TestVariousIteratorArgs.test_inline_methods

2013-06-10 Thread Berker Peksag
Berker Peksag added the comment: Related changeset: http://hg.python.org/cpython/rev/54ff68e973ee#l12.1110 -- keywords: +patch nosy: +berker.peksag stage: -> patch review versions: +Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30540/issue18185.diff

[issue10581] Review and document string format accepted in numeric data type constructors

2013-06-10 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue16715] Get rid of IOError. Use OSError instead

2013-06-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: I would wait and see if it happens gain or on other buildbots. As I am sure you know, intermittent failures, not reproducible on demand, are nasty. -- ___ Python tracker _

[issue6632] Include more chars in the decimal codec

2013-06-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: [In the light of the current discussion on python-ideas regarding adding support for the Unicode minus sign] I'm +1 on adding support for the minus code point, since it's the correct correspondent to the plus code point in Unicode. The traditional ASCII "-"