[issue16627] comparison problem of two 'dict' objects

2012-12-06 Thread Ezio Melotti
Ezio Melotti added the comment: That's because dicts are not ordered. You might want to use collections.OrderedDict if the order matters to you. -- nosy: +ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed ___

[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2012-12-06 Thread Roman Evstifeev
Changes by Roman Evstifeev someuniquen...@gmail.com: -- nosy: +Roman.Evstifeev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9291 ___ ___

[issue11797] 2to3 does not correct reload

2012-12-06 Thread Berker Peksag
Berker Peksag added the comment: Could you try to share could with fix_intern? Maybe by moving some things to fixer_utils. Thanks for the suggestion. Here's a new patch. I'm not sure the name of the helper is correct. -- Added file:

[issue16580] Add examples to int.to_bytres and int.from_bytes

2012-12-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: Your example is comprehensive but not simple and obvious. I think better to keep it out of doc. -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16580

[issue16580] Add examples to int.to_bytres and int.from_bytes

2012-12-06 Thread Ezio Melotti
Ezio Melotti added the comment: I agree. The examples in the doc seem clear to me, whereas the ones you proposed are not as clear. Do you think there's something that they don't currently cover that should be added? -- nosy: +ezio.melotti ___

[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2012-12-06 Thread STINNER Victor
STINNER Victor added the comment: File c:\Python27\lib\mimetypes.py, line 250, in enum_types ctype = ctype.encode(default_encoding) # omit in 3.x! UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128) The encoding is wrong. We should read

[issue15346] Tkinter extention modules have no documentation

2012-12-06 Thread Daniel Swanson
Daniel Swanson added the comment: There is documentation of these modules, it's just that it's in the modules themselves. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15346 ___

[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-06 Thread Martin v . Löwis
Martin v. Löwis added the comment: I claim that this is not a bug in the existing versions. It is documented as illegal to assign to None: http://docs.python.org/2.7/library/constants.html?highlight=none#None So what exactly happens if you manage to bypass the existing checks is

[issue2785] alternate fast builtin sum

2012-12-06 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- versions: +Python 3.4 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2785 ___ ___

[issue15516] exception-handling bug in PyString_Format

2012-12-06 Thread Tom Tromey
Tom Tromey added the comment: It sure would. Here's a new patch. -- Added file: http://bugs.python.org/file28223/P ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15516 ___

[issue14901] Python Windows FAQ is Very Outdated

2012-12-06 Thread Ashish Nitin Patil
Ashish Nitin Patil added the comment: Is anyone currently working on this issue? I am a newbie am really looking forward to contributing, but, quite unsure of what exact changes need to be made to the FAQ documentation. The previous comments are very helpful I am going to proceed with the

[issue15539] Fixing Tools/scripts/pindent.py

2012-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. Tests added. I am not sure tests will be passed on Windows. -- Added file: http://bugs.python.org/file28224/pindent_2.patch ___ Python tracker rep...@bugs.python.org

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: In the test named 'test_pdb_return_command_for_generator' in the patch, the return command does not cause pdb to stop at the StopIteration debug event as expected. Instead the following step command steps into the generator. With the patch applied, in the

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: This new patch fixes the two problems described in my previous message. The patch is different from Andrew's patch in that it does not use a new state variable, and the test cases in the patch are a copy of Andrew's patch except for

[issue16628] leak in ctypes.resize()

2012-12-06 Thread Antoine Pitrou
New submission from Antoine Pitrou: ctypes.resize() (and/or the deallocator) can leak because of a logic error. Attached patch seems to fix it. -- components: Library (Lib) files: ctypesresizeleak.patch keywords: patch messages: 177052 nosy: amaury.forgeotdarc, belopolsky, meador.inge,

[issue13390] Hunt memory allocations in addition to reference leaks

2012-12-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: As it turns out, ctypes does leak memory: see issue 16628. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13390 ___

[issue13390] Hunt memory allocations in addition to reference leaks

2012-12-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch with doc. If noone objects, I will commit soon. -- Added file: http://bugs.python.org/file28227/debugblocks6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13390

[issue13390] Hunt memory allocations in addition to reference leaks

2012-12-06 Thread Dave Malcolm
Dave Malcolm added the comment: Minor bikeshedding/spelling nit: should _Py_AllocedBlocks be changed to _Py_AllocatedBlocks (and s/_Py_GetAllocedBlocks/_Py_GetAllocatedBlocks/)? -- ___ Python tracker rep...@bugs.python.org

[issue6912] Add 'with' block support to Tools/Scripts/pindent.py

2012-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually without next['with'] = 'end' with support is broken. See issue15539. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6912

[issue16622] IDLE crashes on parentheses

2012-12-06 Thread Steve OBrien
Steve OBrien added the comment: I have tried renaming my .idlerc file and it seemed yesterday not to work, I just did it again and it is working for the moment. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16622

[issue16622] IDLE crashes on parentheses

2012-12-06 Thread Roger Serwy
Roger Serwy added the comment: Steve, could you post the contents of your .idlerc directory? I wonder if encoding = locale is the culprit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16622

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: When the generator is used in a for loop, the interpreter handles the StopIteration in its eval loop, and the exception is not raised. So it may be considered as confusing to have pdb behave differently with a generator depending on its context. A way to fix

[issue16622] IDLE crashes on parentheses

2012-12-06 Thread Steve OBrien
Changes by Steve OBrien sobrien@gmail.com: Added file: http://bugs.python.org/file28228/idlerc.tar.gz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16622 ___

[issue4643] cgitb.html fails if getattr call raises exception

2012-12-06 Thread Arthur Petitpierre
Arthur Petitpierre added the comment: I attached a patch containing both the fix suggested by Allan and a test case. Tested against trunk and python2.7. -- keywords: +patch nosy: +arthur.petitpierre Added file: http://bugs.python.org/file28229/issue4643.patch

[issue16622] IDLE crashes on parentheses

2012-12-06 Thread Roger Serwy
Roger Serwy added the comment: You only have an empty recent-files.lst file in your posted archive. From what I can tell, there is nothing in common with the other posted .idlerc that had these problems. Please do report if the crashes with open parens reoccurs and what was changed in IDLE

[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 03f92a9f0875 by Benjamin Peterson in branch 'default': create NameConstant AST class for None, True, and False literals (closes #16619) http://hg.python.org/cpython/rev/03f92a9f0875 -- resolution: - fixed stage: patch review -

[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2012-12-06 Thread David Villa Alises
Changes by David Villa Alises david.vi...@gmail.com: -- nosy: +david.villa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16612 ___ ___

[issue16629] IDLE: Calltips test fails due to int docstring change

2012-12-06 Thread Roger Serwy
New submission from Roger Serwy: Revision e4598364ea29 changed the docstring for int, causing the CallTips test to fail in IDLE. The attached patch fixes the problem. -- components: IDLE files: calltips_test_update.patch keywords: easy, patch messages: 177063 nosy: serwy, terry.reedy

[issue16630] IDLE: Calltip fails if __getattr__ raises exception

2012-12-06 Thread Roger Serwy
New submission from Roger Serwy: The calltip fails if __getattr__ raises an exception. Take as an example: Python 3.4.0a0 (default:0238cc842805+, Dec 6 2012, 19:17:04) [GCC 4.7.2] on linux Type copyright, credits or license() for more information. class Test: def __getattr__(self,

[issue16631] tarfile.extractall() doesn't extract everything if .next() was used

2012-12-06 Thread anatoly techtonik
New submission from anatoly techtonik: If tarfile.next() is used before .extractall(), the latter fails to extract files that were accessed. -- components: Library (Lib) messages: 177065 nosy: techtonik priority: normal severity: normal status: open title: tarfile.extractall() doesn't

[issue16631] tarfile.extractall() doesn't extract everything if .next() was used

2012-12-06 Thread anatoly techtonik
anatoly techtonik added the comment: Attached is patch with test. Test needs valid extractable .tar file. The testtar.tar that is currently present fails to unpack on Windows because of too long filenames inside. -- keywords: +patch Added file:

[issue16531] Allow IPNetwork to take a tuple

2012-12-06 Thread pmoody
pmoody added the comment: This patch is for (address, prefixlen). I now see that the original request was (address, netmask). I'll fix this up. In the meantime, let me know if this is what you had in mind. Cheers, peter -- keywords: +patch Added file:

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-06 Thread Éric Araujo
Éric Araujo added the comment: Bruno: do you want to propose an idea for the doc part? Or even a full patch for this request? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___

[issue16631] tarfile.extractall() doesn't extract everything if .next() was used

2012-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Possible this is a duplicate of issue16601. -- nosy: +serhiy.storchaka versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16631 ___

[issue16629] IDLE: Calltips test fails due to int docstring change

2012-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, I also noticed this. However, int(x=0) - integer is not enough. The right calltip should be int(x=0) - integer\nint(x, base=10) - integer. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org

[issue16631] tarfile.extractall() doesn't extract everything if .next() was used

2012-12-06 Thread anatoly techtonik
anatoly techtonik added the comment: issue16601 is about restarting iterations from zero if interrupted. This one is that extractall() should not use public iteration API at all. -- ___ Python tracker rep...@bugs.python.org

[issue14901] Python Windows FAQ is Very Outdated

2012-12-06 Thread Ashish Nitin Patil
Ashish Nitin Patil added the comment: Found this - http://docs.python.org/3/using/windows.html Seems like my work got a bit easy. Need to truncate the bits bytes oof the document so as to fit with FAQ system. I think I will also need to do changes to the official wiki (online) too. Any

[issue16625] Exception on mode 'br'

2012-12-06 Thread Chris Jerdonek
Chris Jerdonek added the comment: Is this issue just for 2.7? 3.3 was selected as the affected version, but the error message text seems limited to 2.7: http://hg.python.org/cpython/file/0adfbafe8a99/Objects/fileobject.c#l303 The exception can be reproduced simply using 2.7: open('foo',

[issue16625] Exception on mode 'br'

2012-12-06 Thread Sworddragon
Sworddragon added the comment: Is this issue just for 2.7? 3.3 was selected as the affected version, but the error message text seems limited to 2.7 You have given me a good hint. My script is running on python3 with the shbang line #!/usr/bin/python3 -OOtt. But it makes a subcall to

[issue16625] Exception on mode 'br'

2012-12-06 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16625 ___ ___

[issue12853] global name 'r' is not defined in upload.py

2012-12-06 Thread Sven Deichmann
Sven Deichmann added the comment: result seems indeed to be what is expected here. One additional note: This only occurs if you use the --show-response option for the upload command. if you omit that, you get no error message -- nosy: +Sven.Deichmann

[issue10589] I/O ABC docs should specify which methods have implementations

2012-12-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed in a58204570a7c, 3cb85250a0a3, 93742b046519. -- assignee: stutzbach - asvetlov resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-06 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16619 ___ ___

[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules

2012-12-06 Thread Georg Brandl
Georg Brandl added the comment: Adding a redirect should be easy, yes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16484 ___ ___

[issue16624] subprocess.check_output should allow specifying stdin as a string

2012-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 2.7 is in bugfix only mode. Please update your patch to 3.4. -- nosy: +serhiy.storchaka stage: - needs patch versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16624

[issue16569] Preventing errors of simultaneous access in zipfile

2012-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seek can be very cheap. Anybody could actually measure it??? I am waiting for an updated patch for issue14099 to make benchmarks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16569

[issue16626] Infinite recursion in glob.glob('*:') on Windows

2012-12-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: glob.glob() can fall in infinite recursion (causing stack overflow) on Windows with patterns which contains metacharacters in drive or UNC path ('*:foo', r'\\?\c:\bar'). This is my assumption, someone should confirm it on Windows. Here is a patch, which

[issue16627] comparison problem of two 'dict' objects

2012-12-06 Thread Singer Song
New submission from Singer Song: #python code: a={600072:1, 8880:2, 600243:3, 600495:4, 80002529:5} b={600072:1, 8880:2, 600243:3, 80002529:5, 600495:4} print(a) print(b) print(a==b) print(str(a)==str(b)) print(a.keys()==b.keys()) #output in python2.7.3: {600072: 1, 8880: 2, 600243: