[issue12883] xml.sax.xmlreader.AttributesImpl allows empty string as attribute names

2013-01-30 Thread Chenguang Wang
Chenguang Wang added the comment: I found this problem is still not fixed in the lastest hg version. Seriously? This patch is for the latest v3.4.0a0. -- keywords: +patch nosy: +Chenguang.Wang Added file: http://bugs.python.org/file28915/w.patch ___

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-01-30 Thread Brian Curtin
Brian Curtin added the comment: I can't comment on what the change should be or how it should be done as I don't do anything with mimetypes, but nothing about how the patch was written jumps out at me for being incorrect (except I would not include ishimoto's name changes). If there's a conse

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-01-30 Thread Ben Hoyt
Ben Hoyt added the comment: Any update on this, Tim or other Windows developers? -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2013-01-30 Thread Silverback Networks
New submission from Silverback Networks: ET reads a default-namespaced (xmnls="whatever") file correctly but won't write it back out. The error given is: ValueError: cannot use non-qualified names with default_namespace option The XML reference is reasonably clear on this: http://www.w3.org/TR

[issue17011] ElementPath ignores different namespace mappings for the same path expression

2013-01-30 Thread Silverback Networks
Changes by Silverback Networks : -- nosy: +silverbacknet ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue17087] Improve the repr for regular expression match objects

2013-01-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Just showing group(0) should be helpful. And perhaps the number of groups. If a string is really long, we can truncate it like reprlib does. The main goal is to make it easier to work with match objects at the interactive prompt. They are currently too

[issue16997] subtests

2013-01-30 Thread Nick Coghlan
Nick Coghlan added the comment: Right. I have *heaps* of tests that would be very easy to migrate to Antoine's subtest API. A separate "addMessage" API could conceivably be helpful for debugging, but it's not the obvious improvement to my existing looping tests that subtests would be. --

[issue17087] Improve the repr for regular expression match objects

2013-01-30 Thread Chris Jerdonek
Chris Jerdonek added the comment: Is this a duplicate of issue 13592? -- nosy: +chris.jerdonek ___ Python tracker ___ ___ Python-bugs-

[issue17087] Improve the repr for regular expression match objects

2013-01-30 Thread Ezio Melotti
Ezio Melotti added the comment: Showing start and stop would be OK, but there might be many groups and they might contain lot of text, so they can't simply be included in the repr as they are. FWIW there was another issue about changing _sre.SRE_Match to something better, but I can't find it r

[issue17086] backport cross-build patches to the 2.7 branch

2013-01-30 Thread Benjamin Peterson
Benjamin Peterson added the comment: Did you mean to add that config.guess file? -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue17087] Improve the repr for regular expression match objects

2013-01-30 Thread Raymond Hettinger
New submission from Raymond Hettinger: Experience teaching Python has shown that people have a hard time learning to work with match objects. A contributing cause is the opaque repr: >>> import re >>> s = 'On 3/14/2013, Python celebrate Pi day.' >>> mo = re.search(r'\d+/\d+/\d+', s

[issue17086] backport cross-build patches to the 2.7 branch

2013-01-30 Thread Matthias Klose
New submission from Matthias Klose: I would like to check in a backport of the cross build patches on Thu or Fri, so that these can be checked for the upcoming 2.7.4 release. The backport was made using the current state of the cross build support on the 3.3 branch. The patch is tested with n

[issue17028] launcher does not read shebang line when arguments are given

2013-01-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 58e72cb89848 by Vinay Sajip in branch 'default': Updated NEWS with fix for #17028. http://hg.python.org/cpython/rev/58e72cb89848 -- ___ Python tracker

[issue17028] launcher does not read shebang line when arguments are given

2013-01-30 Thread STINNER Victor
STINNER Victor added the comment: A test would also be nice :-) -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue17028] launcher does not read shebang line when arguments are given

2013-01-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: An entry in Misc/NEWS would be nice. -- nosy: +amaury.forgeotdarc ___ Python tracker ___ ___ P

[issue17083] can't specify newline string for readline for binary files

2013-01-30 Thread Bryant
Bryant added the comment: I'm not terribly worried about the "right" way for me to deal with my code, but that Python, in this instance, is inconsistent. While it doesn't want you to apply the concept of a "line" to a binary file in that it prevents you from specifying an EOL string, it does a

[issue17085] test_socket crashes the whole test suite

2013-01-30 Thread ddve...@ucar.edu
New submission from ddve...@ucar.edu: While running "make test" on my build of python 2.7.3 the suite aborts with [..omiss..] test_socket make: *** [test] Alarm clock Trying to run individually the offending test reveals a little more $ ./python Lib/test/regrtest.py -v test_socket == CPython

[issue15633] httplib.response is not closed after all data has been read

2013-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch for 2.7. Ideally, we would raise IncompleteRead in this situation, but this would break existing programs. -- keywords: +patch stage: -> patch review versions: +Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file2

[issue16997] subtests

2013-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: > You didn't respond to the idea of exposing both features separately > after saying you didn't understand what I meant and saying that they > were pointless and didn't make sense. So I explained and also > proposed a specific API to make the suggestion clearer

[issue17044] Implement PEP 422: Simple class initialisation hook

2013-01-30 Thread Daniel Urban
Daniel Urban added the comment: I'm attaching a new patch with some documentation and one additional test. -- Added file: http://bugs.python.org/file28912/pep422_3.patch ___ Python tracker _

[issue16997] subtests

2013-01-30 Thread Chris Jerdonek
Chris Jerdonek added the comment: > I've already replied to all this. You didn't respond to the idea of exposing both features separately after saying you didn't understand what I meant and saying that they were pointless and didn't make sense. So I explained and also proposed a specific API

[issue17083] can't specify newline string for readline for binary files

2013-01-30 Thread R. David Murray
R. David Murray added the comment: If you are reading in binary mode, then all readline does is get you the next \n terminated chunk of data, which is a convenience in some circumstances. You have to do all the newline handling yourself. Otherwise it isn't a binary read. I think the "right w

[issue17084] nntplib.NNTP.xover does not always return results as documented

2013-01-30 Thread David Holm
New submission from David Holm: The response from NNTP.xover doesn't always match the format described in the documentation. It is supposed to return a (result, list) where the list contains entries of the format (article number, subject, poster, date, id, references, size, lines). However, I

[issue16997] subtests

2013-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The current API doesn't seem like a good building block because it > bundles orthogonal features (i.e. to add loop failure data to a block > of asserts you have to use the continuance feature). Why not expose > *those* as the building blocks? The API can be s

[issue16997] subtests

2013-01-30 Thread Chris Jerdonek
Chris Jerdonek added the comment: > I am concerned that this feature changes the TestResult API in a backwards > incompatible way. My suggestion to add the original TestCase object to TestResult.errors, etc. instead and add the extra failure data to the longDescription would address this conc

[issue17083] can't specify newline string for readline for binary files

2013-01-30 Thread Bryant
New submission from Bryant: When opening binary files in Python 3, the newline parameter cannot be set. While this kind of makes sense, readline() can still be used on binary files. This is great for my usage, but it is doing universal newline mode, I believe, so that any \r, \n, or \r\n trigg

[issue1783] nonexistent data items declared as exports in sysmodule.h

2013-01-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are patches. -- assignee: -> serhiy.storchaka keywords: +easy nosy: +serhiy.storchaka stage: needs patch -> patch review versions: +Python 3.2, Python 3.3, Python 3.4 -Python 3.1 Added file: http://bugs.python.org/file28911/sysmodule_h_cleanup-3.

[issue1783] nonexistent data items declared as exports in sysmodule.h

2013-01-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch Added file: http://bugs.python.org/file28910/sysmodule_h_cleanup-2.7.patch ___ Python tracker ___ ___

[issue16997] subtests

2013-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I am concerned that this feature changes the TestResult API in a > backwards incompatible way. There are (quite a few) custom TestResult > objects that just implement the API and don't inherit from TestResult. > I'd like to try this new code with (for example)

[issue17015] mock could be smarter and inspect the spec's signature

2013-01-30 Thread Michael Foord
Michael Foord added the comment: Ah, well if the bugfix exists everywhere that function signatures exist then it shouldn't be a problem. (I think there is already a backport of inspect.signature() by Nick Coghlan.) -- ___ Python tracker

[issue17015] mock could be smarter and inspect the spec's signature

2013-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I am a little concerned that this relies on Python 3 only features of > inspect, and *in fact* relies on bug fixes in Python 3.4 to work. The bug fix has landed in 3.3 as well ;-) (see 49fd1c8aeca5) I guess a backport of inspect.signature() would allow it to w

[issue17082] Fix test discovery for test_dbm*.py

2013-01-30 Thread Zachary Ware
New submission from Zachary Ware: This patch fixes discovery for test_dbm.py and removes test_main() from test_dbm, test_dbm_dumb, test_dbm_gnu, and test_dbm_ndbm. It also removes unnecessary __init__ methods from DumbDBMTestCase and WhichDBTestCase, which only called unittest.TestCase.__init_

[issue16997] subtests

2013-01-30 Thread Michael Foord
Michael Foord added the comment: Note, some brief discussion on the "testing in python" mailing list: http://lists.idyll.org/pipermail/testing-in-python/2013-January/005356.html -- ___ Python tracker _

[issue16997] subtests

2013-01-30 Thread Michael Foord
Michael Foord added the comment: I am concerned that this feature changes the TestResult API in a backwards incompatible way. There are (quite a few) custom TestResult objects that just implement the API and don't inherit from TestResult. I'd like to try this new code with (for example) the t

[issue17015] mock could be smarter and inspect the spec's signature

2013-01-30 Thread Michael Foord
Michael Foord added the comment: Wow, impressive work Antoine - thanks. I am a little concerned that this relies on Python 3 only features of inspect, and *in fact* relies on bug fixes in Python 3.4 to work. That means it would be hard / impossible for the backport "mock" to have the new featu

[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2

2013-01-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indeed, Popen.communicate() is incompatible not only between 3.2 and 3.3, but between Windows and POSIX too. Documentation says the input argument should be a bytes string and 3.2 on POSIX  works only with bytes strings. 3.2 on Windows and 3.3 on both platfor

[issue17077] Fix test_tools hangs

2013-01-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka dependencies: +subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2 stage: -> patch review type: -> behavior ___ Python tracker

[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2

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

[issue17077] Fix test_tools hangs

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

[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2

2013-01-30 Thread Jeremy Kloth
Jeremy Kloth added the comment: I would suggest that this be bumped to release blocker as currently passing bytes to communicate with universal_newlines=True on Windows causes the process to hang (see issue17077). The backported test case passes on Windows without any changes to subprocess.py

[issue17077] Fix test_tools hangs

2013-01-30 Thread Jeremy Kloth
Jeremy Kloth added the comment: It hangs on both my Windows buildbot and development machine. The patch is tested and works correctly on Windows. -- ___ Python tracker ___ _

[issue17056] Support Visual Studio 2012

2013-01-30 Thread Trent Nelson
Changes by Trent Nelson : -- nosy: +trent ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue17081] documentation

2013-01-30 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue17080] A better error message for float()

2013-01-30 Thread Ezio Melotti
Ezio Melotti added the comment: I was thinking about that but in other places they are not used. Adding them is OK though. -- ___ Python tracker ___ ___

[issue17080] A better error message for float()

2013-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: You should put single quotes around the type name, i.e.: "float() argument must be a string or a number, not '%.200s'" -- nosy: +pitrou stage: needs patch -> patch review ___ Python tracker

[issue17081] documentation

2013-01-30 Thread wohugb
Changes by wohugb : -- assignee: docs@python components: Documentation nosy: docs@python, wohugb priority: normal severity: normal status: open title: documentation versions: Python 3.3 ___ Python tracker _

[issue16989] allow distutils debug mode to be enabled more easily

2013-01-30 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- keywords: -easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue16989] allow distutils debug mode to be enabled more easily

2013-01-30 Thread Chris Jerdonek
Chris Jerdonek added the comment: I meant to comment on the patch earlier. The fix here isn't as simple as I had originally suggested. The patch has to be constructed more carefully to be more fully backwards compatible. For example, it shouldn't break code that imports DEBUG from modules, o

[issue17080] A better error message for float()

2013-01-30 Thread Ezio Melotti
Ezio Melotti added the comment: Here's an initial patch, still needs tests. The same should be done for complex() too. Maybe it could be applied to older branches too. -- assignee: -> ezio.melotti keywords: +patch Added file: http://bugs.python.org/file28907/issue17080.diff ___

[issue17080] A better error message for float()

2013-01-30 Thread Kushal Das
Changes by Kushal Das : -- nosy: +kushaldas ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue17080] A better error message for float()

2013-01-30 Thread Ezio Melotti
Ezio Melotti added the comment: Sounds reasonable to me. -- nosy: +ezio.melotti stage: -> needs patch versions: +Python 3.4 -Python 2.7 ___ Python tracker ___ __

[issue17080] A better error message for float()

2013-01-30 Thread Jonathan Livni
New submission from Jonathan Livni: These lines of Python (2.7): y = float(x) gives the error: TypeError: float() argument must be a string or a number. In various cases such as: x = [0] x = None x = SomeClass() In addition to the information given in the error message,