[issue18018] SystemError: Parent module '' not loaded, cannot perform relative import

2013-05-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: User code should generally not see any SystemErrors (even when choosing wacky module names :-)), so IMHO this is a regression. -- nosy: +pitrou ___ Python tracker

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. But why not just inline expat_unknown_encoding_handler()? For 2.7 we perhaps should add SetStartDoctypeDeclHandler and SetEncoding in the exported C API. Shouldn't we update the C API version (for this issue and for issue16986)? -- __

[issue16991] Add OrderedDict written in C

2013-05-23 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file29078/odict.diff ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue16991] Add OrderedDict written in C

2013-05-23 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file29077/cleanup-test-collections.diff ___ Python tracker ___ ___ Python-bugs-lis

[issue16991] Add OrderedDict written in C

2013-05-23 Thread Eric Snow
Eric Snow added the comment: I finally had some time so here's an updated patch (including O(1) deletions). I've also added a bunch of notes at the top of odictobject.c. Some notable things left to do: * address two recently failing tests due to r83881 (issue 17900) * check for any reference

[issue18047] Descriptors get invoked in old-style objects and classes

2013-05-23 Thread Arnaud Porterie
New submission from Arnaud Porterie: In the Data Model section of the documentation regarding descriptors invokations (http://docs.python.org/2/reference/datamodel.html#invoking-descriptors), it is said: Note that descriptors are only invoked for new style objects or classes (ones that s

[issue16991] Add OrderedDict written in C

2013-05-23 Thread Eric Snow
Eric Snow added the comment: Raymond, do you have any objections to splitting the OrderedDict-related tests into their own module. Doing so allows for testing all the those test classes at once, which is handy when working on OrderedDict. This is more relevant now with the extra PEP-399-moti

[issue18042] Provide enum.unique class decorator

2013-05-23 Thread Nick Coghlan
Nick Coghlan added the comment: Don't worry, compared to some of the ideas I've had (and rightfully had shot down) over the years, that one was positively sensible :) -- ___ Python tracker

[issue16991] Add OrderedDict written in C

2013-05-23 Thread Eric Snow
Eric Snow added the comment: > I just looked at the test-collections patch and don't want it > committed. It is full of trivial edits that make it hard to > review and doesn't make the test suite better. Thanks for the feedback, Raymond. I agree that there are a number of trivial edits there

[issue18042] Provide enum.unique class decorator

2013-05-23 Thread Ethan Furman
Ethan Furman added the comment: Oh. Well, I like your decorator. :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue16991] Add OrderedDict written in C

2013-05-23 Thread Eric Snow
Eric Snow added the comment: It's worth noting that issue10977 is pretty closely related to this isssue. -- ___ Python tracker ___ ___

[issue18042] Provide enum.unique class decorator

2013-05-23 Thread Nick Coghlan
Nick Coghlan added the comment: You don't generally see reversals of decisions where Guido has made an explicit choice based on consistency with the rest of the language. The fact that aliases are permitted in enumerations by default is consistent with the normal behaviour of namespaces and di

[issue18046] Simplify and clarify logging internals

2013-05-23 Thread Alex Gaynor
Changes by Alex Gaynor : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue18046] Simplify and clarify logging internals

2013-05-23 Thread Alex Gaynor
New submission from Alex Gaynor: This patch splits a dictionary that maps integer and string representations of levels to each other out into two dictionaries, one which goes int -> string, and the other which is string -> int. This makes it easier to reason about what a variable contains. --

[issue18045] get_python_version is not import in bdist_rpm.py

2013-05-23 Thread Matt Mao
New submission from Matt Mao: Python version : 2.7.5 OS : CentOS 6.3 When I tried to build a rpm with "python ./setup.py bdist_rpm", I get the following error : Traceback (most recent call last): File "setup.py", line 221, in ... and much more ;)""" File "/usr/local/pytho

[issue12641] Remove -mno-cygwin from distutils

2013-05-23 Thread Renato Silva
Renato Silva added the comment: I must note that GCC 4.x *does* support -mno-cygwin, at least until 4.4, and at least the MinGW version. I have used it myself for building Pidgin under Windows, which requires that option. See [1] where a Pidgin developer confirms that. [1] http://pidgin.im/pi

[issue7760] use_errno=True does not work

2013-05-23 Thread Nikolaus Rath
Nikolaus Rath added the comment: Matt, I believe in that case it's still a documentation issue, because then the documentation probably should say that using absolute paths to libraries is a bad idea in general. -- ___ Python tracker

[issue7940] re.finditer and re.findall should support negative end positions

2013-05-23 Thread Matthew Barnett
Matthew Barnett added the comment: Yes. As msg99456 suggests, I fixed it the my source code before posting. Compare re in Python 3.3.2: >>> re.compile('x').findall('', 1, 3) ['x', 'x'] >>> re.compile('x').findall('', 1, -1) [] with regex: >>> regex.compile('x').findall('', 1, 3) [

[issue18042] Provide enum.unique class decorator

2013-05-23 Thread Ethan Furman
Ethan Furman added the comment: I'm not giving up hope yet. Plenty of Python features no longer work the way they did when their PEP was accepted. ;) -- ___ Python tracker ___

[issue18042] Provide enum.unique class decorator

2013-05-23 Thread Nick Coghlan
Nick Coghlan added the comment: I take Guido's acceptance of the PEP (and the discussion in the previous issue) as meaning the default behaviour (allowing aliases) is no longer up for debate. Hence this suggestion to offer a self-documenting way to opt in to the more restrictive variant. ---

[issue18042] Provide enum.unique class decorator

2013-05-23 Thread Ethan Furman
Ethan Furman added the comment: This is certainly an effective method, but it places safety off by default. I would rather have a system that was from duplicates by default but had an easy override. The method I had in place in my original code was something like: class Color(Enum, options=D

[issue7940] re.finditer and re.findall should support negative end positions

2013-05-23 Thread Mark Lawrence
Mark Lawrence added the comment: Has this been fixed in the regex module? -- nosy: +BreamoreBoy ___ Python tracker ___ ___ Python-bugs-

[issue17701] Improving strftime documentation

2013-05-23 Thread David Wolever
Changes by David Wolever : Added file: http://bugs.python.org/file30354/0f4d971b0cee.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue17701] Improving strftime documentation

2013-05-23 Thread David Wolever
Changes by David Wolever : Removed file: http://bugs.python.org/file30353/102b3e257dca.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue17701] Improving strftime documentation

2013-05-23 Thread David Wolever
Changes by David Wolever : Added file: http://bugs.python.org/file30353/102b3e257dca.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue10652] test___all_ + test_tcl fails (Windows installed binary)

2013-05-23 Thread Zachary Ware
Zachary Ware added the comment: Terry, I just tested your 2.7 patch, and it does work, but the workaround that (I think) we have both been using on 3.x to find the Tcl/Tk .dlls (copying them into PCbuild) doesn't work on 2.7 for some reason. However, if you add ..\tcltk\bin to PATH, which the

[issue16692] Support TLS 1.1 and TLS 1.2

2013-05-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Is there any chance of this being backported to Python 2.7? Given > NIST's complete deprecation of SHA1 and TLS 1.0 by end of 2013, I > imagine there are at least a few folks who can't upgrade to Python > 3.x, but need TLS 1.2 support. I think Ruby just recen

[issue12641] Remove -mno-cygwin from distutils

2013-05-23 Thread Paul Moore
Paul Moore added the comment: On 23 May 2013 20:11, Roumen Petrov wrote: > > Is this approach acceptable? > It is not enough. > Support for compilers other than gcc (including cross-compilers) is a separate issue, and one which is much less likely to get accepted. --

[issue17326] Windows build docs still referring to VS 2008 in 3.3

2013-05-23 Thread Zachary Ware
Zachary Ware added the comment: Here's a simple patch to clear up the first paragraph of PCbuild/readme.txt, applicable to 3.3 and default. -- keywords: +patch nosy: +zach.ware Added file: http://bugs.python.org/file30352/issue17326.diff ___ Python t

[issue13483] Use VirtualAlloc to allocate memory arenas

2013-05-23 Thread STINNER Victor
STINNER Victor added the comment: Set also issue #3329 which proposes an API to define memory allocators. -- nosy: +haypo ___ Python tracker ___ _

[issue16895] Batch file to mimic 'make' on Windows

2013-05-23 Thread Zachary Ware
Zachary Ware added the comment: Here's a new version of the patch, which is a major rewrite. Among the changes: - Switch from using 'goto' to execute the right subroutine to 'call' and end every subroutine with 'exit /B' (thank you Richard for making me aware of that possibility). This makes

[issue12641] Remove -mno-cygwin from distutils

2013-05-23 Thread Roumen Petrov
Roumen Petrov added the comment: Oscar Benjamin wrote: > Oscar Benjamin added the comment: > > I have written a function that can be used to determine if the gcc > that distutils will use is from Cygwin or MinGW: > > def is_cygwingcc(): > '''Try to determine if the gcc that would be used is

[issue16692] Support TLS 1.1 and TLS 1.2

2013-05-23 Thread Thom Nichols
Thom Nichols added the comment: Is there any chance of this being backported to Python 2.7? Given NIST's complete deprecation of SHA1 and TLS 1.0 by end of 2013, I imagine there are at least a few folks who can't upgrade to Python 3.x, but need TLS 1.2 support. I think Ruby just recently imp

[issue18018] SystemError: Parent module '' not loaded, cannot perform relative import

2013-05-23 Thread Brett Cannon
Brett Cannon added the comment: The line raising the exception is http://hg.python.org/cpython/file/f7992397e98d/Lib/importlib/_bootstrap.py#l1518 . If you're sure it's a regression feel free to change what exception is raised. -- assignee: -> flox __

[issue12641] Remove -mno-cygwin from distutils

2013-05-23 Thread Oscar Benjamin
Oscar Benjamin added the comment: I have written a function that can be used to determine if the gcc that distutils will use is from Cygwin or MinGW: def is_cygwingcc(): '''Try to determine if the gcc that would be used is from cygwin.''' out = Popen(['gcc', '-dumpmachine'], shell=True,

[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks

2013-05-23 Thread Brett Cannon
Brett Cannon added the comment: If someone wants to submit a patch to make the change that's fine, but they are going to have the same issue when they simply execute an import that byte-compiles as a side-effect so you will have to decide if you are only worried about py_compile. --

[issue17683] socket.getsockname() inconsistent return type with AF_UNIX

2013-05-23 Thread Charles-François Natali
Charles-François Natali added the comment: > Shouldn't the surrogateescape error handler (PEP 383) prevent this? Yes, it shoud (I just read PEP 383, I told you I didn't know anything about encoding :-). So basically, for the test failure, the issue is simply that the platform's default encoding

[issue9883] minidom: AttributeError: DocumentFragment instance has no attribute 'writexml'

2013-05-23 Thread James Socol
Changes by James Socol : -- nosy: +jamessocol ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2013-05-23 Thread paul j3
paul j3 added the comment: Oops, I attached the wrong file. Here's the correct one. -- Added file: http://bugs.python.org/file30350/issue9338_7.patch ___ Python tracker ___ _

[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2013-05-23 Thread paul j3
Changes by paul j3 : Removed file: http://bugs.python.org/file30349/argparse_7.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2013-05-23 Thread paul j3
paul j3 added the comment: Here's another approach to the problem, using an iterative localized search. For simple cases it produces the same thing, but in complex cases it is more robust. It is based on two ideas: - if the action in consume_optional() is being 'greedy', use slots = self

[issue17454] ld_so_aix not used when linking c++ (scipy)

2013-05-23 Thread Delhallt
Delhallt added the comment: proposed patch -- keywords: +patch nosy: +delhallt Added file: http://bugs.python.org/file30348/Python-2.7.5-linkso.patch ___ Python tracker ___ _

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-23 Thread Eli Bendersky
Eli Bendersky added the comment: How about this patch (not tested it too much - just as a proof of concept). We're pretty free in the C API exported by pyexpat through a capsule to _elementtree, so we can also add a default handler there. This API already has some general utilities like ErrorS

[issue18007] CookieJar expects request objects with origin_req_host attribute instead of method

2013-05-23 Thread Senthil Kumaran
Senthil Kumaran added the comment: This change is documented. Thanks for the report. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue18007] CookieJar expects request objects with origin_req_host attribute instead of method

2013-05-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 26ac5b9cffda by Senthil Kumaran in branch '3.3': Fix #18007 : Document CookieJar.add_cookie_header request parameter changes in 3.3 http://hg.python.org/cpython/rev/26ac5b9cffda New changeset f7992397e98d by Senthil Kumaran in branch 'default': mer

[issue18044] Email headers do not properly decode to unicode.

2013-05-23 Thread Tim Rawlinson
New submission from Tim Rawlinson: In Python 3.3 decoding of headers to unicode is supposed to be automatic but fails in several cases, including one shown as successful in the documentation: >>> msg = message_from_string('Subject: =?utf-8?q?=C3=89ric?=\n\n', policy=default) >>> msg['Sub

[issue17839] base64 module should use memoryview

2013-05-23 Thread Nick Coghlan
Nick Coghlan added the comment: Just adding a note for easier cross-referencing: the old behaviour of these functions was one of the culprits that led to the removal of the codec aliases as discussed in issue 7475 -- ___ Python tracker

[issue17839] base64 module should use memoryview

2013-05-23 Thread Nick Coghlan
Nick Coghlan added the comment: The codec uses the old API that breaks the encoded output up into multiple lines. The new patch: 1. Also changes the behaviour of the older de/encodebytes API 2. Checks that all the defined binary transform codecs actually support memoryview as input for both e

[issue18043] No mention of `match.regs` in `re` documentation

2013-05-23 Thread Ram Rachum
New submission from Ram Rachum: There's no mention of `match.regs` in the documentation of the `re` module. -- assignee: docs@python components: Documentation messages: 189859 nosy: cool-RR, docs@python priority: normal severity: normal status: open title: No mention of `match.regs` in `

[issue17839] base64 module should use memoryview

2013-05-23 Thread Nick Coghlan
Nick Coghlan added the comment: We now also need to update the new footnote that I added for issue 17844 in http://hg.python.org/cpython/rev/801567d6302c -- ___ Python tracker _

[issue17844] Add link to alternatives for bytes-to-bytes codecs

2013-05-23 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for initiating this Serhiy :) -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue17844] Add link to alternatives for bytes-to-bytes codecs

2013-05-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 85e8414060b4 by Nick Coghlan in branch '3.3': Issue 17844: Clarify meaning of different codec tables http://hg.python.org/cpython/rev/85e8414060b4 New changeset 801567d6302c by Nick Coghlan in branch 'default': Merge issue 17844 from 3.3 http://hg.p

[issue17986] Alternative async subprocesses (pep 3145)

2013-05-23 Thread Charles-François Natali
Charles-François Natali added the comment: I'm not familiar with windows, but if I understand the patch correctly, you can only select from a single subprocess at a time, which is IMO an important limitation. Also, the fact that close() can fail with BlockingIOError is really a pain, and makes w

[issue18042] Provide enum.unique class decorator

2013-05-23 Thread Nick Coghlan
Changes by Nick Coghlan : -- dependencies: +Code, test, and doc review for PEP-0435 Enum nosy: +eli.bendersky, ethan.furman ___ Python tracker ___ ___

[issue18042] Provide enum.unique class decorator

2013-05-23 Thread Nick Coghlan
New submission from Nick Coghlan: Another attempt at tackling the "but I want to ensure my enum values are unique" problem that PEP 435 deliberately chose not to handle. My previous suggestion (in issue 17959) was rightly rejected due to the other problems it caused, but this idea is much clea

[issue18031] The Python Tutorial says % string formatting will be removed

2013-05-23 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue18031] The Python Tutorial says % string formatting will be removed

2013-05-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset e1d6140b02f0 by Raymond Hettinger in branch '3.3': Issue #18031: %-formatting isn't dead yet and might pull through. http://hg.python.org/cpython/rev/e1d6140b02f0 -- ___ Python tracker

[issue18031] The Python Tutorial says % string formatting will be removed

2013-05-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset ef037ad304c1 by Raymond Hettinger in branch '2.7': Issue #18031: %-formatting isn't dead yet and might pull through. http://hg.python.org/cpython/rev/ef037ad304c1 -- nosy: +python-dev ___ Python tracker

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: I'm still skeptical that a new exception should be introduced in 2.7.x, or 3.3 (might this break existing setups?). I suggest to ask the release manager for a decision. But if this is done, then I propose to add the following text to ServerProxy: versionchan