[issue18151] Idlelib: update to "with open ... except OSError" (in 2.7, leave IOError)

2013-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2fe64ce5da05 by Terry Jan Reedy in branch '3.3': #18151, part 1: Backport idlelilb portion of Andrew Svetlov's 3.4 patch http://hg.python.org/cpython/rev/2fe64ce5da05 New changeset 0be613638523 by Terry Jan Reedy in branch 'default': #18151 null mer

[issue16715] Get rid of IOError. Use OSError instead

2013-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2fe64ce5da05 by Terry Jan Reedy in branch '3.3': #18151, part 1: Backport idlelilb portion of Andrew Svetlov's 3.4 patch http://hg.python.org/cpython/rev/2fe64ce5da05 -- ___ Python tracker

[issue18168] plistlib output self-sorted dictionary

2013-06-07 Thread halfjuice
New submission from halfjuice: Even with OrderedDict, the plistlib will still output the dict in its own order. Search for sorted(d.items()) in plistlib.py and you will know why. It is certainly warm-hearted to sort this before putting it into plist file but I think sometimes we just want a cu

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

2013-06-07 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18163] Add a 'key' attribute to KeyError

2013-06-07 Thread R. David Murray
R. David Murray added the comment: I'm arguing that the statement is false. I think that whether or not it should be a weakref in this and the other cases depends on whether you think an exception object should keep an object alive or not. It is fairly unlikely that a key would get into a cy

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for a cache clearing function like the one in re.py -- ___ Python tracker ___ ___ Python-bugs-

[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: And standardizing on an attribute name, of course. =) -- ___ Python tracker ___ ___ Python-bugs-list m

[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: What Benjamin said. Adding something like this is mostly about a nicer constructor (``AttributeError(attr='meth')``) and automatically creating the message for the exception (although that would require another argument like 'object' or something to be able to

[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: Such custom implementations should be updated to support this wonderful new attr. :) -- nosy: +benjamin.peterson ___ Python tracker ___

[issue18163] Add a 'key' attribute to KeyError

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: So are you arguing it should be a weakref, or just saying you view the statement as false? -- ___ 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-07 Thread Chris AtLee
Chris AtLee added the comment: This is a possible fix to this issue. It's not as clean as I'd like, but the simpler versions I tried could end up with the entire file contents in memory for degenerate (or malicious) inputs. The trick is handling the case where the current line ends with \r. We

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

2013-06-07 Thread Chris AtLee
New submission from Chris AtLee: cgi.FieldStorage uses fp.readline(1 << 16) to read in POSTed file data if no content length has been specified. All HTTP clients I've looked at terminate the file body with CRLF and then the final MIME boundary. If the file body is 65,535 bytes, and doesn't con

[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Alex Gaynor
Alex Gaynor added the comment: +1 on this, but it's worth noting that that fix is not 100% correct (though it's obviously better than most existing equivilants), it's potentially wrong with custom __getattr__, __getattribute__, descriptors. -- nosy: +alex _

[issue17903] Python launcher for windows should search path for #!/usr/bin/env

2013-06-07 Thread Vinay Sajip
Changes by Vinay Sajip : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___ Pyth

[issue18166] 'value' attribute for ValueError

2013-06-07 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue18165] Add 'unexpected_type' to TypeError

2013-06-07 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue18162] Add index attribute to IndexError

2013-06-07 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue18163] Add a 'key' attribute to KeyError

2013-06-07 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue18163] Add a 'key' attribute to KeyError

2013-06-07 Thread R. David Murray
R. David Murray added the comment: I don't see how the fact that keys are immutable implies there are no GC issues. A tuple can be involved in a cycle, for example. -- nosy: +r.david.murray ___ Python tracker ___

[issue18164] Embedding Python doc incorrectly refers to LINKFORSHARED

2013-06-07 Thread Wichert Akkerman
Changes by Wichert Akkerman : -- nosy: +wichert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue18165] Add 'unexpected_type' to TypeError

2013-06-07 Thread Brett Cannon
New submission from Brett Cannon: TypeError could grow an 'unexpected_type' attribute to store the type of the argument that was used to trigger the exception. Since types are expected to not be deleted there is no GC worry. Having an 'expected' attribute makes no sense in the face of a union

[issue18166] 'value' attribute for ValueError

2013-06-07 Thread Brett Cannon
New submission from Brett Cannon: A 'value attribute for ValueError could store a weakref to the value which triggered the exception. It should be a weakref so at to prevent accidental prevention of GC of the value. -- components: Interpreter Core messages: 190781 nosy: brett.cannon pr

[issue18163] Add a 'key' attribute to KeyError

2013-06-07 Thread Brett Cannon
New submission from Brett Cannon: KeyError could grow a 'key' attribute for the key that triggered the exception. Since keys are expected to be immutable (in order to be hashable) there is no GC issue to worry about. -- components: Interpreter Core messages: 190778 nosy: brett.cannon p

[issue18164] Embedding Python doc incorrectly refers to LINKFORSHARED

2013-06-07 Thread Ned Deily
New submission from Ned Deily: This is in reference to section 5.6 of the "Extending and Embedding Python" doc. This has come up recently where third-party projects are using LINKEDFORHARED instead of the results of python-config when linking an embedded Python into their projects. See discus

[issue18162] Add index attribute to IndexError

2013-06-07 Thread Brett Cannon
New submission from Brett Cannon: Give IndexError an index attribute to store the index it was raised for. Since it is typically an integer there is no reason to worry about GC and thus using a regex. -- components: Interpreter Core messages: 190777 nosy: brett.cannon priority: normal

[issue18150] Duplicate test inside TestSingleDispatch

2013-06-07 Thread Łukasz Langa
Łukasz Langa added the comment: Good catch. Thanks for the patch, Vajrasky. -- assignee: -> lukasz.langa resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue18150] Duplicate test inside TestSingleDispatch

2013-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset a16bebe653b1 by Łukasz Langa in branch 'default': Fixed #18150: duplicate test inside TestSingleDispatch http://hg.python.org/cpython/rev/a16bebe653b1 -- nosy: +python-dev ___ Python tracker

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-07 Thread Ned Deily
Ned Deily added the comment: It seems like this would be a fairly rare situation and, as you note, dependent on the underlying file system. But it would be easy to add a new function to the module to clear its cache in cases where it is known this might be a problem. In fact, in Issue11802 a

[issue5135] Expose simplegeneric function in functools module

2013-06-07 Thread Łukasz Langa
Łukasz Langa added the comment: For the record, this has been implemented as PEP 443. -- nosy: +lukasz.langa ___ Python tracker ___ ___

[issue18159] ConfigParser getters not available on SectionProxy

2013-06-07 Thread Łukasz Langa
Łukasz Langa added the comment: This is a reasonable feature request. Overriding __getattr__ doesn't look like the best solution, though. Let me think this over. -- assignee: -> lukasz.langa ___ Python tracker __

[issue18148] Make of Python 3.2.2 fails on Solaris SPARC

2013-06-07 Thread Ned Deily
Ned Deily added the comment: Issue15050, which was closed without resolution, reported a similar issue. Also, Issue15963 documents some suggestions and proposed changes to make builds easier to configure on legacy platforms like Solaris SPARC. Perhaps they may be of help. Also, Python 3.2.2

[issue18161] call fchdir if subprocess.Popen(cwd=integer|fileobject)

2013-06-07 Thread Марк Коренберг
New submission from Марк Коренберг: Today, subprocess allow to change directory only by using its name. What if I have only file descriptor referring to that dir? It will be nice if such feture will be implemented. Now, I use preexc_fn to call os.fchdir() by hand. We should handle close_fds *

[issue18160] Packaging more coherent Python

2013-06-07 Thread Ezio Melotti
Ezio Melotti added the comment: This bug tracker is not the best place for this kind of requests. Those packages are made by the maintainers of the several distributions, so you should suggest this to them. If you want some kind of feedback from Python users/devs you could try the python-lis

[issue18160] Packaging more coherent Python

2013-06-07 Thread Tambet Väli
New submission from Tambet Väli: Hello! First the issue: my usual way of installing programming environments, languages and platforms is to install all the available modules from standard repositories, or if there is some "all-good" or "batteries-included" metapackage, I sure install this. I

[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue18159] ConfigParser getters not available on SectionProxy

2013-06-07 Thread R. David Murray
Changes by R. David Murray : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue18159] ConfigParser getters not available on SectionProxy

2013-06-07 Thread João Bernardo
New submission from João Bernardo: The configparser.RawConfigParser class implements some `get` methods: get, getint, getfloat, getboolean but if any of these get overridden on a subclass(with other arguments) or new ones are added (e.g. getlist), there's no way a SectionProxy instance wil

[issue14797] Deprecate imp.find_module()/load_module()

2013-06-07 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +remove usage of imp.load_module() from pydoc ___ Python tracker ___ ___ Python-bugs-list m

[issue14797] Deprecate imp.find_module()/load_module()

2013-06-07 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +Delete test_importhooks ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue18158] Delete test_importhooks

2013-06-07 Thread Brett Cannon
New submission from Brett Cannon: Tests don't serve much of a purpose with test_importlib covering the uses, plus the tests are old and are not worth updating. -- assignee: brett.cannon components: Tests messages: 190766 nosy: brett.cannon priority: normal severity: normal stage: needs

[issue18157] remove usage of imp.load_module() from pydoc

2013-06-07 Thread Brett Cannon
New submission from Brett Cannon: -- assignee: brett.cannon components: Library (Lib) messages: 190765 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open title: remove usage of imp.load_module() from pydoc type: behavior versions: Python 3.4 __

[issue14797] Deprecate imp.find_module()/load_module()

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: The modulefinder usage is directly exposed in its API as the return value of a find_module method, which makes removal a pain. Adding Thomas Heller to see what he has to say. The pkgutil usage is in classes that have been deprecated, so don't care. The rest sho

[issue14797] Deprecate imp.find_module()/load_module()

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: Current status (with test_imp stripped out): > ack "imp\.(find|load)_module" Lib Lib/modulefinder.py 482:return imp.find_module(name, path) Lib/pkgutil.py 189:file, filename, etc = imp.find_module(subname, path) 251:mod = imp.load_

[issue7732] imp.find_module crashes Python if there exists a directory named "__init__.py"

2013-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset bf882390713c by Brett Cannon in branch 'default': Issue #7732: Move an imp.find_module test from test_import to http://hg.python.org/cpython/rev/bf882390713c -- ___ Python tracker

[issue18055] Stop using imp in IDLE

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the help everyone! -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue18055] Stop using imp in IDLE

2013-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset a0d8ae880ae6 by Brett Cannon in branch '3.3': Issue #18055: Move to importlib from imp for IDLE. http://hg.python.org/cpython/rev/a0d8ae880ae6 New changeset 3a3ec484ce95 by Brett Cannon in branch 'default': merge w/ 3.3 for issue #18055 http://hg.py

[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread Vajrasky Kok
Vajrasky Kok added the comment: Added test to sniffer double quote. -- Added file: http://bugs.python.org/file30501/csv_has_header.diff ___ Python tracker ___ ___

[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file30499/csv_has_header.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue17314] Stop using imp.find_module() in multiprocessing

2013-06-07 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue17314] Stop using imp.find_module() in multiprocessing

2013-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 97adaa820353 by Brett Cannon in branch 'default': Issue #17314: Stop using imp in multiprocessing.forking and move over http://hg.python.org/cpython/rev/97adaa820353 -- nosy: +python-dev ___ Python tracke

[issue17134] Use Windows' certificate store for CA certs

2013-06-07 Thread Christian Heimes
Christian Heimes added the comment: I fixed a ref leak and added some tests. -- Added file: http://bugs.python.org/file30500/enumcertstore2.patch ___ Python tracker ___ _

[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread Vajrasky Kok
Vajrasky Kok added the comment: Sorry. This one is correct. Attached the patch to fix the problem. -- Added file: http://bugs.python.org/file30499/csv_has_header.diff ___ Python tracker

[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread Vajrasky Kok
Vajrasky Kok added the comment: Attached the patch to fix the problem. -- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file30498/csv_has_header.diff ___ Python tracker ___

[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file30498/csv_has_header.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Brett Cannon
New submission from Brett Cannon: Much like ImportError now has 'name' and 'path', AttributeError should get an 'attr' attribute that can only be set through a keyword argument or after creating an instance. That would make the common ``try/except AttributeError`` uses much more robust by not

[issue17134] Use Windows' certificate store for CA certs

2013-06-07 Thread Christian Heimes
Christian Heimes added the comment: First patch. I have not yet verified that the return data can be loaded by openssl. Also I need to verify the error paths and add some tests, too. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file30497/enum

[issue18136] Put local build paths before system build paths in configure.ac and Makefile.pre.in

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: I'll change the title to make it more obvious what the problem is. And yes, Homebrew by default uses /usr/local if I remember correctly. -- title: test_distutils failing under OS X 10.8 w/ clang -> Put local build paths before system build paths in confi

[issue18136] test_distutils failing under OS X 10.8 w/ clang

2013-06-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: On 7 Jun, 2013, at 16:54, Brett Cannon wrote: > > If that's true, does this simply mean I need to build Python without any > installed libraries to avoid this conflict? That's correct. There are other bugreports about other python installations influencing

[issue18136] test_distutils failing under OS X 10.8 w/ clang

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: > echo $CPPFLAGS -I /Users/bcannon/Developer/include -I/Users/bcannon/Developer/Cellar/readline/6.2.4/include > echo $LDFLAGS -L /Users/bcannon/Developer/lib -L/Users/bcannon/Developer/Cellar/readline/6.2.4/lib > echo $CFLAGS -Wno-unused-value -Wno-empty-body -Qu

[issue17342] datetime.strptime does not implement %z

2013-06-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Python 2.x is in maintenance mode and will not receive new features. In 3.x this is already implemented: Python 3.3.2 (default, May 24 2013, 22:46:58) [GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin Type "help", "copyright", "credits" or

[issue17903] Python launcher for windows should search path for #!/usr/bin/env

2013-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset a174d79cef2e by Vinay Sajip in branch 'default': Issue #17903: Added path search changes to launcher. http://hg.python.org/cpython/rev/a174d79cef2e -- nosy: +python-dev ___ Python tracker

[issue11959] smtpd cannot be used without affecting global state

2013-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset ed498f477549 by Vinay Sajip in branch 'default': Closes #11959: SMTPServer and SMTPChannel now take an optional map, use of which avoids affecting global state. http://hg.python.org/cpython/rev/ed498f477549 -- nosy: +python-dev resolution:

[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread R. David Murray
R. David Murray added the comment: I doubt this is a regression, so I'm marking the others versions as well without actually testing it. Should be an easy fix. -- keywords: +easy nosy: +r.david.murray stage: -> needs patch versions: +Python 2.7, Python 3.4 ___

[issue18116] getpass.unix_getpass() always fallback to sys.stdin

2013-06-07 Thread R. David Murray
R. David Murray added the comment: The test changes look correct to me, but it sure would be nice to come up with less fragile tests. For a function like this, though, it probably isn't possible. -- ___ Python tracker

[issue17134] Use Windows' certificate store for CA certs

2013-06-07 Thread Christian Heimes
Christian Heimes added the comment: Yes, I'm planing to expose the low level API. I prefer to do as much work in Python space as possible. The information is just too useful to 3rd parties, too. I'm thinking about one low level function that interfaces Windows's cert store. The rest can be bu

[issue17134] Use Windows' certificate store for CA certs

2013-06-07 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > Sounds promising. Do you think this should be hooked into > SSLContext.set_default_verify_paths, or be exposed as a separate method? If there were an API which exposed the certificate material, then this would be more useful to libraries trying to do ot

[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread Dave Challis
New submission from Dave Challis: When attempting to detect the presence of CSV headers, delimiters are passed to a regex function without escaping, which causes an exception if a delimiter which has meaning in a regex (e.g. '+', '*' etc.) is used. Code to reproduce: import csv s = csv.Sniffer

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

2013-06-07 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I'd like to add some argument to providing a "file" and "line number" to the allocation api. I know that currently this is not provided e.g. by the PyMem_Allocate() functions, but I think it would be wise to provide a "debug" version of these function

[issue18116] getpass.unix_getpass() always fallback to sys.stdin

2013-06-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which fixes getpass bug: unix_getpass() always fallback to sys.stdin. As side effect it also fixes resource warning in getpass(). I'm not sure I have correctly changed tests. David, could you please review the patch? -- nosy: +gregor

[issue18154] make install failed on solaris

2013-06-07 Thread Palm Kevin
Changes by Palm Kevin : Added file: http://bugs.python.org/file30494/Makefile.pre.in.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18154] make install failed on solaris

2013-06-07 Thread Palm Kevin
Changes by Palm Kevin : Removed file: http://bugs.python.org/file30493/Makefile.pre.in.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue18154] make install failed on solaris

2013-06-07 Thread Palm Kevin
Changes by Palm Kevin : Added file: http://bugs.python.org/file30493/Makefile.pre.in.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18154] make install failed on solaris

2013-06-07 Thread Palm Kevin
Changes by Palm Kevin : Removed file: http://bugs.python.org/file30492/Makefile.pre.in.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue18154] make install failed on solaris

2013-06-07 Thread Palm Kevin
Palm Kevin added the comment: fixing patch attached -- keywords: +patch Added file: http://bugs.python.org/file30492/Makefile.pre.in.diff ___ Python tracker ___ _

[issue18154] make install failed on solaris

2013-06-07 Thread Palm Kevin
New submission from Palm Kevin: On Solaris, make install fails on target altbininstall. This is due to the fact than on Solaris you man not create a symlink using `ln -sf` -> You have to use `ln -f -s`. (SunOS sol1 5.10 Generic_147440-09 sun4u sparc SUNW,Sun-Fire-V240) -- components:

[issue13843] Python doesn't compile anymore on our Solaris buildbot: undefined libintl_* symbols

2013-06-07 Thread STINNER Victor
STINNER Victor added the comment: > But I succeeded to compile Python using the CC compiler (/usr/bin/cc) instead > of GCC compiler. I may be interesting to check if CC searchs header files in the same directories than GCC. Same question for libraries. Using GCC, it can be seen in the command l

[issue13843] Python doesn't compile anymore on our Solaris buildbot: undefined libintl_* symbols

2013-06-07 Thread Palm Kevin
Palm Kevin added the comment: The `-lintl` fix did not work in my case. But I succeeded to compile Python using the CC compiler (/usr/bin/cc) instead of GCC compiler. (cc: Sun C 5.12 SunOS_sparc 2011/11/16) -- nosy: +palm.kevin ___ Python tracker <