[issue17630] Create a pure Python zipfile importer

2013-06-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Times in a ZIP files have a two-seconds resolution (in the old DOS FAT format: 5 bits for the hours, 6 bits for the minutes, and only 5 bits left for the seconds) Some fuziness logic is needed when comparing against a time_t. -- nosy: +amaury.for

[issue16991] Add OrderedDict written in C

2013-06-20 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file30468/cOrderedDict.diff ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue16991] Add OrderedDict written in C

2013-06-20 Thread Eric Snow
Eric Snow added the comment: I figured out what I hope were the last memory-related issues. Apparently tp_traverse is not inherited if tp_flags is set. I had it set on all the view types and all the iterator types. So during GC it would blow up when it tried to call tp_traverse. Everything

[issue18274] python: not found

2013-06-20 Thread William Moreno
William Moreno added the comment: Hi ... tks for answer me   What is the right place ? Yes, I have installed Python using FreeBSD-ports? I am using FreeBSD-ports regulary. William Elasio Moreno Albarracin Ingeniero de Sistemas de la Universidad Antonio Nariño Universidad Industrial de Santande

[issue17630] Create a pure Python zipfile importer

2013-06-20 Thread Brett Cannon
Brett Cannon added the comment: I went ahead and added the needed method for bytecode loading; see the new patch. -- Added file: http://bugs.python.org/file30660/zip_importlib.diff ___ Python tracker _

[issue18274] python: not found

2013-06-20 Thread Brett Cannon
Brett Cannon added the comment: This is not the right place to ask for help with this. This is either a FreeBSD or Mesa issue. Have you tried installing Python using FreeBSD-ports? -- nosy: +brett.cannon resolution: -> invalid status: open -> closed ___

[issue18267] xmlrpc.client documentation multicall example missleading for division behaviour of python3

2013-06-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2a3bc6eb2e13 by Andrew Kuchling in branch '3.3': Closes #18267: use floor division in code example http://hg.python.org/cpython/rev/2a3bc6eb2e13 -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed

[issue17621] Create a lazy import loader mixin

2013-06-20 Thread Brett Cannon
Brett Cannon added the comment: One problem with the importers code is it doesn't properly clean up after the module if the load failed and it wasn't a reload. Should store an attribute on the module signaling whether it was a reload or not to know whether an exception raised during loading sh

[issue18275] Make isinstance() work with super type instances

2013-06-20 Thread Brett Cannon
New submission from Brett Cannon: class A: pass class B(A): pass sup = super(B, B()) isinstance(sup, A) # returns False Why is that? Is there an explicit reason to prevent that isinstance check from working? How about just for ABCs? Either way it's annoying that at least for ABCs you can't c

[issue18250] In itertools.repeat() object shadows object()

2013-06-20 Thread A.M. Kuchling
A.M. Kuchling added the comment: Thanks for your bug report and patch, but I agree that we can't change this. The repeat() function really does take 'object' as the keyword argument: >>> from itertools import * >>> list(repeat(times=3, object='abc')) ['abc', 'abc', 'abc'] >>> repeat(times=3, e

[issue18272] In itertools recipes there is a typo in __builtins__

2013-06-20 Thread A.M. Kuchling
A.M. Kuchling added the comment: Thanks for your report! I've corrected the error on the 3.3 and 3.4 branches. -- nosy: +akuchling ___ Python tracker ___ ___

[issue18272] In itertools recipes there is a typo in __builtins__

2013-06-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset b805506b11e0 by Andrew Kuchling in branch '3.3': Closes #18272: use 'builtins' for 3.3 instead of __builtin__ http://hg.python.org/cpython/rev/b805506b11e0 -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open

[issue17630] Create a pure Python zipfile importer

2013-06-20 Thread Brett Cannon
Brett Cannon added the comment: Here is an initial stab at a zip file importer using importlib. Probably the biggest shortcoming is that it doesn't support bytecode files, but that's because I just have not bothered to add support yet (it's just one method to implement). There is a note in zip

[issue18274] python: not found

2013-06-20 Thread William Moreno
New submission from William Moreno: mklib: Making FreeBSD static library: librtasm.a gmake[4]: Leaving directory `/usr/ports/graphics/libGL/work/Mesa-7.6.1/src/gallium/auxiliary/rtasm' gmake[4]: Entering directory `/usr/ports/graphics/libGL/work/Mesa-7.6.1/src/gallium/auxiliary/util' python u_

[issue18270] IDLE on OS X fails with Attribute Error if no initial shell and Tk out-of-date

2013-06-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: In 2.7.5, the offending line is 1558, not 1560. It is clearer to me as shell.interp.runcommand("print('%s')" % tkversionwarning) Amaury is correct about 1541, as seen in the if block itself, but I thing the shell test should be elevated to guard all the shell-d

[issue18272] In itertools recipes there is a typo in __builtins__

2013-06-20 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue18269] Add new parameter format for converter function w/ position number

2013-06-20 Thread Brett Cannon
Brett Cannon added the comment: That is not a documentation bug (i.e. a problem with what is written at docs.python.org), this is a feature request to try to improve the exception message. That would require adding a new parameter format (http://docs.python.org/3/c-api/arg.html?highlight=pyarg

[issue18271] get_payload method returns bytes which cannot be decoded using the message's charset

2013-06-20 Thread R. David Murray
R. David Murray added the comment: If all you are changing is headers (and you con't change the CTE), then when you use BytesGenerator to re-serialize the message, it is supposed to preserve the existing CTE/payload. (Whether or not you call get_payload, regardless of arguments, does not matt

[issue18269] Clarify which integer is required in os.chmod() exception

2013-06-20 Thread anatoly techtonik
anatoly techtonik added the comment: Right. This report is about improving error message. It doesn't say what is expected where. If you have a call like: os.fchmod(outfile, unixperm) it is easy to assume that unixperm is not integer, while in fact the problem is in outfile. This could not

[issue18271] get_payload method returns bytes which cannot be decoded using the message's charset

2013-06-20 Thread Marko Lalic
Marko Lalic added the comment: Thank you for your reply. Unfortunately, I have a use case where message_from_bytes has a pretty great disadvantage. I have to parse the received message and then forward it completely unchanged, apart from possibly adding a few new headers. The problem with mes

[issue18270] IDLE on OS X fails with Attribute Error if no initial shell and Tk out-of-date

2013-06-20 Thread Ned Deily
Ned Deily added the comment: The problem here occurs when IDLE on OS X is launched without an initial shell window, either by setting the option in IDLE preferences or from the command line (/usr/local/bin/idle -e) *and* IDLE detects that the version of Tk in use is one of the suspect OS X ver

[issue18234] Unicodedata module should provide access to codepoint aliases

2013-06-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: UCD provides more than just a list of aliases: formal name aliases have "type" - control, abbreviation, etc. See . -- ___ Python tracker

[issue18273] Simplify calling and discovery of json test package

2013-06-20 Thread Zachary Ware
New submission from Zachary Ware: Technically, test discovery already works for test_json.py / json_tests, but not the way really expected (each test file is discovered individually), and not as simply as it could. The attached patch does the following: - remove test_json.py - rename json_tes

[issue18271] get_payload method returns bytes which cannot be decoded using the message's charset

2013-06-20 Thread R. David Murray
R. David Murray added the comment: The python3 email package's handling of 8bit definitely has quirks. (So did the python2 email package's, but they were different quirks. :) You can't correctly handle 8bit unless you use message_from_bytes and take the input from a byte string. It is a good

[issue18244] singledispatch: When virtual-inheriting ABCs at distinct points in MRO, composed MRO is dependent on haystack ordering

2013-06-20 Thread Łukasz Langa
Łukasz Langa added the comment: I meditated on the nature of the problem. A big issue that Edward pointed out is that at times the computed MRO depends on haystack ordering. We should fix that. However, my conclusion is that whatever home-grown algorithm we come up with, it will still be unintuit

[issue18271] get_payload method returns bytes which cannot be decoded using the message's charset

2013-06-20 Thread Marko Lalic
Marko Lalic added the comment: That will work fine as long as the characters are actually latin. We cannot forget the rest of the unicode character planes. Consider:: >>> message = message_from_string("""MIME-Version: 1.0 ... Content-Type: text/plain; charset=utf-8 ... Content-Disposition: inli

[issue18269] Clarify which integer is required in os.chmod() exception

2013-06-20 Thread Brett Cannon
Brett Cannon added the comment: That's expected with that kind of argument. os.fchmod() and os.chmod() only accept a path as a string or a file descriptor as an integer as specified in the docs: http://docs.python.org/3/library/os.html#os.chmod -- resolution: -> invalid status: open -

[issue18271] get_payload method returns bytes which cannot be decoded using the message's charset

2013-06-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> message.get_payload(decode=True).decode('latin1') 'ünicöde data..' -- nosy: +serhiy.storchaka versions: +Python 3.4 ___ Python tracker ___

[issue18270] AttributeError: 'NoneType' object has no attribute 'interp'

2013-06-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +kbk, roger.serwy, terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue18272] In itertools recipes there is a typo in __builtins__

2013-06-20 Thread Zachary Ware
Zachary Ware added the comment: Being Python 3, it should actually be "builtins" rather than "__builtins__". Also, imp.rst and importlib.rst have the same issue in the description of reload(). -- nosy: +zach.ware ___ Python tracker

[issue18272] In itertools recipes there is a typo in __builtins__

2013-06-20 Thread Zachary Ware
Changes by Zachary Ware : -- versions: +Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue18272] In itertools recipes there is a typo in __builtins__

2013-06-20 Thread py.user
New submission from py.user: http://docs.python.org/3/library/itertools.html#itertools-recipes "Like __builtin__.iter(func, sentinel)" -- assignee: docs@python components: Documentation files: issue.diff keywords: patch messages: 191530 nosy: docs@python, py.user priority: normal severit

[issue18269] Clarify which integer is required in os.chmod() exception

2013-06-20 Thread anatoly techtonik
anatoly techtonik added the comment: >>> v = open("VERSION") >>> import os >>> os.fchmod(v, 0664) Traceback (most recent call last): File "", line 1, in TypeError: an integer is required -- status: pending -> open ___ Python tracker

[issue15198] multiprocessing Pipe send of non-picklable objects doesn't raise error

2013-06-20 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> works for me stage: -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue11390] doctest: add cmdline parameters

2013-06-20 Thread R. David Murray
R. David Murray added the comment: Patch updated with documentation. -- stage: needs patch -> patch review Added file: http://bugs.python.org/file30655/doctest_cli.patch ___ Python tracker _

[issue11390] doctest: add cmdline parameters

2013-06-20 Thread R. David Murray
Changes by R. David Murray : Removed file: http://bugs.python.org/file30654/doctest_cli.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue18122] RuntimeError: not holding the import lock

2013-06-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: See also #9573 and #15914. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18271] get_payload method returns bytes which cannot be decoded using the message's charset

2013-06-20 Thread Marko Lalic
New submission from Marko Lalic: When the message's Content-Transfer-Encoding is set to 8bit, the get_payload(decode=True) method returns the payload encoded using raw-unicode-escape. This means that it is impossible to decode the returned bytes using the content charset obtained by the get_co

[issue16499] CLI option for isolated mode

2013-06-20 Thread Nick Coghlan
Nick Coghlan added the comment: CPython's startup sequence and collection of global flags are organically evolved madness, so I think adding even more complexity to them is a bad idea. When you're in a hole, the first thing to do is *stop digging*. I could use help laying the foundations for PEP

[issue17018] Inconsistent behaviour of methods waiting for child process

2013-06-20 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue18270] AttributeError: 'NoneType' object has no attribute 'interp'

2013-06-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: PyShell.py, line 1541: if shell and cmd or script: Does it need parentheses? if shell and (cmd or script): -- nosy: +amaury.forgeotdarc ___ Python tracker ___

[issue18269] Clarify which integer is required in os.chmod() exception

2013-06-20 Thread Brett Cannon
Brett Cannon added the comment: os.chmod is implemented in posixmodule.c and the argument parsing code can be found at http://hg.python.org/cpython/file/3acbb23c73bc/Modules/posixmodule.c#l2605 . You will notice that the argument parsing is specified as "O&i|$O&p". That means the first argume

[issue16499] CLI option for isolated mode

2013-06-20 Thread Christian Heimes
Christian Heimes added the comment: It comes from Nick and http://www.python.org/dev/peps/pep-0432/ . Once PEP 432 is in place we can easily create variants of Python binaries with special flags. I'm in favor with python -I, too. -- ___ Python track

[issue11390] doctest: add cmdline parameters

2013-06-20 Thread R. David Murray
R. David Murray added the comment: Oh, a documentation update is still needed here, so I guess I'm not really ready for review yet :( -- stage: patch review -> needs patch ___ Python tracker __

[issue11390] doctest: add cmdline parameters

2013-06-20 Thread R. David Murray
R. David Murray added the comment: Here is a patch that implements the ones I'm interested in (-o for any option, and -f as a shortcut for -o FAIL_FAST). It's a good question whether doctest should support other unittest options, but doing so is more complicated than supporting -o and -f. Ad

[issue6461] multiprocessing: freezing apps on Windows

2013-06-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: I just tried freezing the program from multiprocessing import freeze_support,Manager if __name__ == '__main__': freeze_support() m=Manager() l = m.list([1,2,3]) l.append(4) print(l) print(repr(l)) using cx_Freeze with P

[issue18270] AttributeError: 'NoneType' object has no attribute 'interp'

2013-06-20 Thread Dennis Backhaus
New submission from Dennis Backhaus: It just worked fine yesterday, but when I start IDLE (with and without trying to open a file at the same time) I get this error. Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/bin/idle", line 5, in main()

[issue16499] CLI option for isolated mode

2013-06-20 Thread Christian Heimes
Christian Heimes added the comment: We don't have "spython" yet. Py_IsolatedFlag is also required if we ever going to have "spython", too. We can always remove the command line flag before Python 3.4 hits beta. -- ___ Python tracker

[issue16499] CLI option for isolated mode

2013-06-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 20, 2013, at 02:26 PM, STINNER Victor wrote: > >"python -I" and "spython" sound like two ways to get the same results. I >would prefer to only have one way. Where does spython come from? Personally, I'd much rather this be an option on the existing pyt

[issue16499] CLI option for isolated mode

2013-06-20 Thread STINNER Victor
STINNER Victor added the comment: "python -I" and "spython" sound like two ways to get the same results. I would prefer to only have one way. -- ___ Python tracker ___ _

[issue9122] Problems with multiprocessing, Python embedding and Windows

2013-06-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: We don't do non-security updates on Python 2.6 anymore. As a workaround you might be able to do something like import sys, multiprocessing sys.frozen = True# or multiprocessing.forking.WINEXE = True ... if __name__ == '__main__':

[issue4153] Unicode HOWTO up to date?

2013-06-20 Thread A.M. Kuchling
A.M. Kuchling added the comment: As far as I can tell, there are no other outstanding suggestions for howto updates, so I'll now close this item. Feel free to re-open or file a new item if there are further improvements that can be made. -- resolution: -> fixed stage: commit review -

[issue16499] CLI option for isolated mode

2013-06-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: It applies cleanly, builds without noticeable problems and does what it's advertised to do. In other words, looks great to me! I say go for it. -- ___ Python tracker __

[issue16507] Patch selectmodule.c to support WSAPoll on Windows

2013-06-20 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- keywords: +gsoc -patch resolution: -> rejected stage: -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue4153] Unicode HOWTO up to date?

2013-06-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1dbbed06a163 by Andrew Kuchling in branch '3.3': #4153: update Unicode howto for Python 3.3 http://hg.python.org/cpython/rev/1dbbed06a163 -- ___ Python tracker

[issue18234] Unicodedata module should provide access to codepoint aliases

2013-06-20 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think the best way would be to provide a function unicodedata.aliases, returning a list of names for a given character or sequence. -- ___ Python tracker __

[issue18231] What's new in Python should explain what's new in UCD

2013-06-20 Thread Martin v . Löwis
Martin v. Löwis added the comment: I don't think anything of this is worth mentioning, except to mention the precise version number of the database. Anybody interested in the consequences of the change should read the announcement of the Unicode Consortium. --

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

2013-06-20 Thread STINNER Victor
STINNER Victor added the comment: Update patch according to the last version of the PEP. -- Added file: http://bugs.python.org/file30653/py_setallocators-8.patch ___ Python tracker __

[issue13483] Use VirtualAlloc to allocate memory arenas

2013-06-20 Thread Martin v . Löwis
Martin v. Löwis added the comment: Ok, I'm going to commit this patch. Any further revisions (including reversions) can be done then. -- ___ Python tracker ___ _

[issue13483] Use VirtualAlloc to allocate memory arenas

2013-06-20 Thread STINNER Victor
STINNER Victor added the comment: >> I plan to test the Low Fragmentation Allocator, at least on Windows 7. > I don't think it can be any better than raw mmap() / VirtualAlloc()... I mean using the Low Fragmentation Allocator for PyObject_Malloc() instead of pymalloc. Martin wrote (msg148605):

[issue18250] In itertools.repeat() object shadows object()

2013-06-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think this is a problem, since it is only a local variable in a function. -- nosy: +pitrou ___ Python tracker ___ _

[issue13483] Use VirtualAlloc to allocate memory arenas

2013-06-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I plan to test the Low Fragmentation Allocator, at least on Windows 7. I don't think it can be any better than raw mmap() / VirtualAlloc()... -- ___ Python tracker _

[issue11016] Re-implementation of the stat module in C

2013-06-20 Thread Charles-François Natali
Charles-François Natali added the comment: I still fail to understand why you just don't ditch the Python implementation. -- ___ Python tracker ___ __