[issue13959] Re-implement parts of imp in pure Python

2012-03-21 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: Of note for my patch is the addition of SUFFIXES and MODE to the 3 main file loader classes. I did this to reverse the dependence on imp.get_suffixes(). As well, a couple of extra functions are added to Python/importlib/_bootstrap.py

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-03-21 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: -if long_xml or text or len(elem): +if text or len(elem) or long_xml: Use alternatives in order of decreasing probability. -- nosy: +storchaka ___ Python tracker

[issue14378] __future__ imports fail when compiling from python ast

2012-03-21 Thread J. D. Bartlett
New submission from J. D. Bartlett j...@bartletts.id.au: GOAL I am trying to compile an AST which contains an ImportFrom node which performs a __future__ import. The ImportFrom node in question is the first node within the AST's body (as it should be, because __future__ imports must occur at

[issue14378] __future__ imports fail when compiling from python ast

2012-03-21 Thread J. D. Bartlett
J. D. Bartlett j...@bartletts.id.au added the comment: Incidentally, the workaround that I'm using for the time being is to run the following code before attempting to compile root_node. for node in ast.walk(root_node): if isinstance(node, ast.ImportFrom) and node.module == '__future__':

[issue13797] Allow objects implemented in pure Python to export PEP 3118 buffers

2012-03-21 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Ok, just for the record: a single __buffer__() special method with delegation-only semantics would also work for Cython. Taking this path would provide a cleaner separation of the (then delegation-only) Python level protocol and

[issue7652] Merge C version of decimal into py3k.

2012-03-21 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: The best thing might be to use Emax=10**8-1 and Emin=-(10**8-1) throughout. I don't think many applications depend on having Emax=10**9-1. If they do, they'll have to use the 64-bit version. 10**6-1 would be another option. The

[issue13797] Allow objects implemented in pure Python to export PEP 3118 buffers

2012-03-21 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13797 ___ ___

[issue14376] sys.exit documents argument as integer but actually requires subtype of int

2012-03-21 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: It would be simple to change line 1112 of pythonrun.c from if (PyInt_Check(value)) to if (PyInt_Check(value) || PyLong_Check(value)) Wouldn't you also have to deal with possible errors from the PyInt_AsLong call? E.g., after

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-21 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Thanks to the tests, I found the error. Since the bzip2 is block algorithm, decompressor need to eat a certain amount of data, so it began to return data. Now when reading small chunks turns out premature end of data. I'm working on a

[issue10142] Support for SEEK_HOLE/SEEK_DATA

2012-03-21 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- nosy: -krisvale ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10142 ___ ___

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file24982/bzip2_in_zip_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14371 ___

[issue9787] Release the TLS lock during allocations

2012-03-21 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Making this low priority since it applies only to platforms without Windows and pthread support. -- priority: normal - low versions: +Python 3.3 -Python 3.2 ___ Python tracker

[issue14376] sys.exit documents argument as integer but actually requires subtype of int

2012-03-21 Thread Gareth Rees
Gareth Rees g...@garethrees.org added the comment: Wouldn't you also have to deal with possible errors from the PyInt_AsLong call? Good point. But I note that Python 3 just does exitcode = (int)PyLong_AsLong(value); so maybe it's not important to do error handling here. --

[issue13797] Allow objects implemented in pure Python to export PEP 3118 buffers

2012-03-21 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: The reason I don't particularly like the delegation only API is that the combination of the new memoryview implementation and bytes/mmap/etc to get a flat region of memory to play with means you could do some quite interesting things entirely

[issue14379] Several traceback docs improvements

2012-03-21 Thread anatoly techtonik
New submission from anatoly techtonik techto...@gmail.com: Some notes about current `traceback` documentation: http://docs.python.org/library/traceback.html 1. It needs a mentioning that traceback module works with traceback objects and frame objects 2. Functions that work with frames should

[issue3367] Uninitialized value read in parsetok.c

2012-03-21 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Here is a patch for the sysmodule.c problem -- Added file: http://bugs.python.org/file24983/sysmodule.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3367

[issue3367] Uninitialized value read in parsetok.c

2012-03-21 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3367 ___

[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset a95b19b3b4cd by Andrew Svetlov in branch '3.2': #3573: idle now doesn't hungs if launched as: idle -e directory http://hg.python.org/cpython/rev/a95b19b3b4cd New changeset cdcd1f7f0882 by Andrew Svetlov in branch

[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset a9be863e5734 by Andrew Svetlov in branch '2.7': #3573: idle now doesn't hungs if launched as: idle -e directory http://hg.python.org/cpython/rev/a9be863e5734 -- ___

[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: Backported to 3.2 and 2.7 -- versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3573 ___

[issue7652] Merge C version of decimal into py3k.

2012-03-21 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7652 ___ ___ Python-bugs-list

[issue5066] IDLE documentation for Unix obsolete/incorrect

2012-03-21 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5066 ___ ___ Python-bugs-list

[issue1053687] PyOS_InputHook not called in IDLE subprocess

2012-03-21 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1053687 ___ ___

[issue7738] IDLE hang when tooltip comes up in Linux

2012-03-21 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: Works fine on Ubuntu 11.10 with tk 8.5 for 3.2, 2.7 and 3.3 alpha. -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7738

[issue14373] C implementation of functools.lru_cache

2012-03-21 Thread Matt Joiner
Matt Joiner anacro...@gmail.com added the comment: Updated patch to fix a crash if maxsize isn't given, and add a unit test for that. Possible issues: * I've tried to emulate object() by calling PyBaseObject_Type. Not sure if there's a more lightweight object for this that just provides the

[issue14373] C implementation of functools.lru_cache

2012-03-21 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14373 ___ ___ Python-bugs-list

[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2012-03-21 Thread Dmitry Shachnev
Dmitry Shachnev mity...@gmail.com added the comment: (Sorry for not replying earlier). I think the main priority here is getting things working, not the tests (so I have little interest in that). First of all, should quopri.encodestring() really return bytes? Everything it returns is ascii

[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2012-03-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Well, a patch won't get committed if it lacks tests, so commit would have to wait until I have time to write some, then. The encode_ methods (from email.encoders) take *message* objects as their arguments. MIMEText internally converts

[issue10469] test_socket fails using Visual Studio 2010

2012-03-21 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Added a patch as used by CCP in production. Covers more WSA cases. -- nosy: +krisvale Added file: http://bugs.python.org/file24985/cpython_75849_to_75851.diff ___ Python tracker

[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Thanks for applying. Just note that unlike with svn, with hg it is stronly recommended to apply to 3.2 first and forward port to 3.3. Something about the DAGs working better. -- ___ Python tracker

[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: Will do in next time. Thank you for instructions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3573 ___

[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2012-03-21 Thread Dmitry Shachnev
Dmitry Shachnev mity...@gmail.com added the comment: In fact, there's really no reason to call an encode_ method at all, since if you pass a string to MIMEText when giving it a non-ascii unicode string, it will default to utf-8 and do the appropriate CTE encoding. No, it doesn't: Python

[issue978604] wait_variable hangs at exit

2012-03-21 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue978604 ___ ___

[issue7057] tkinter doc: more 3.x updates

2012-03-21 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7057 ___ ___ Python-bugs-list

[issue5136] Deprecating (and removing) globalcall, merge and globaleval

2012-03-21 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5136 ___

[issue3035] Removing apparently unwanted functions from Tkinter

2012-03-21 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3035 ___ ___ Python-bugs-list

[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2012-03-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Oh, you are right. I even noted that bug in my PyCon talk, but immediately forgot about it :( I do intend to fix it. You can get it to work by explicitly passing the charset: x = MIMEText('йцукен', _charset='utf8') str(x)

[issue802310] tkFont may reuse font names

2012-03-21 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue802310 ___

[issue7652] Merge C version of decimal into py3k.

2012-03-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 730d5357 by Stefan Krah in branch 'default': Issue #7652: Integrate the decimal floating point libmpdec library to speed http://hg.python.org/cpython/rev/730d5357 -- nosy: +python-dev

[issue14380] MIMEText should default to utf8 charset if input text contains non-ASCII

2012-03-21 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: The MIMEText class of the email package in Python3 requires that a character set be specified in order for the resulting email to be valid. If no character set is specified, it currently assumes ascii but puts a unicode payload in the

[issue14381] Intern certain integral floats for memory savings and performance

2012-03-21 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson krist...@ccpgames.com: Michael Foord reminded me of this issue recently. It was discussed on pydev a few years back and met with limited enthusiasm. I speak from experience in live production with EVE that this simple change saved us a lot of

[issue14308] '_DummyThread' object has no attribute '_Thread__block'

2012-03-21 Thread Dustin Kirkland
Dustin Kirkland dustin.kirkl...@gmail.com added the comment: Okay, update... I did rebuild all of Python from source (actually, I applied it to the Ubuntu python2.7 package, rebuilt that locally, and then upgraded to the new python2.7 deb's. I could see my change was applied

[issue14381] Intern certain integral floats for memory savings and performance

2012-03-21 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Does it not decrease the performance? Falling out integral floating point numbers in the mathematical floating point calculations seems unlikely. I suggest interning integral floats only in conversions str - float and int - float.

[issue12757] undefined name in doctest.py

2012-03-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 64f1b8ad9214 by R David Murray in branch '3.2': #12757: Make doctest skipping in -OO mode work with unittest/regrtest -v http://hg.python.org/cpython/rev/64f1b8ad9214 New changeset ff7957aa01a1 by R David Murray in

[issue12757] undefined name in doctest.py

2012-03-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Since nobody really cares about this issue :), I went ahead and applied the patch that at least avoids the tracebacks. Someone can open a new bug about the duplicated message if they really care. -- resolution: - fixed stage:

[issue14078] Add 'sourceline' property to xml.etree Elements

2012-03-21 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14078 ___ ___ Python-bugs-list mailing

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-03-21 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14377 ___ ___ Python-bugs-list mailing

[issue7738] IDLE hang when tooltip comes up in Linux

2012-03-21 Thread Ned Deily
Ned Deily n...@acm.org added the comment: Since most people can't reproduce this problem now, let's assume it was a problem in the particular version of Tk used. If someone can reproduce it with a current IDLE and Tk, please reopen with details. -- nosy: +ned.deily stage: test needed

[issue7738] IDLE hang when tooltip comes up in Linux

2012-03-21 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: +1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7738 ___ ___ Python-bugs-list

[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4652 ___ ___ Python-bugs-list

[issue14381] Intern certain integral floats for memory savings and performance

2012-03-21 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: This looks like a duplicate of issue 4024. -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14381 ___

[issue10118] Tkinter does not find font

2012-03-21 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10118 ___ ___

[issue1500773] wm_attributes doesn't take keyword arguments

2012-03-21 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1500773 ___ ___

[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Daniel Swanson
Daniel Swanson popcorn.tomato.d...@gmail.com added the comment: I opened my IDLE (v. 3.2.2 windows xp) and pasted in print('ここ') it printed ここ just fine. -- nosy: +weirdink13 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4652

[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Daniel Swanson
Daniel Swanson popcorn.tomato.d...@gmail.com added the comment: alt-c does nothing for me -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4652 ___

[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: For now unicode BMP has full support in TK while non-BMP characters doesn't works. 'こ' character is BMP symbol: hex(ord('こ')) '0x3053' which is lesser than non-BMP space (starting from 0x1). I have no idea why alt-c doesn't

[issue14376] sys.exit documents argument as integer but actually requires subtype of int

2012-03-21 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: so maybe it's not important to do error handling here. Hmm, seems it's not. And dealing with OverflowError is hardly likely to be a concern in practice anyway. +1 for the suggested fix. -- ___

[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: I close this issue because: - current 3.2 and upcoming 3.3 support Japanese characters very well. - there are problems with non-BMP characters not supported currently but it's another issue. See progress of #14200 and others for

[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Daniel Swanson
Daniel Swanson popcorn.tomato.d...@gmail.com added the comment: I would say that alt-c is not a problem at all, but, some people might use 'ç' more that me, (I never have used 'ç' spesificaly) -- ___ Python tracker rep...@bugs.python.org

[issue4333] Reworked Dialog.py

2012-03-21 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4333 ___ ___ Python-bugs-list

[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Ned Deily
Ned Deily n...@acm.org added the comment: To add to the other comments, problems with input methods using Python 3 and Tkinter or IDLE are usually platform-specific issues with the implementation of Tk. In particular, the issue Jean-Christophe reported with Python 3.1.1 was very likely due

[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: Daniel Swanson, maybe my msg156512 was not obvious. You can use 'ç' without any problem in IDLE — it is BMP character. See http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters for details. tkinter has full support for 'Basic

[issue3035] Removing apparently unwanted functions from Tkinter

2012-03-21 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: Pushed as PendingDepricationWarnings for upcoming 3.3 -- assignee: - asvetlov resolution: - remind stage: patch review - versions: +Python 3.3, Python 3.4 -Python 3.2 ___ Python tracker

[issue3035] Removing apparently unwanted functions from Tkinter

2012-03-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset d42f264f291e by Andrew Svetlov in branch 'default': Issue #3035: Unused functions from tkinter are marked as pending peprecated. http://hg.python.org/cpython/rev/d42f264f291e -- nosy: +python-dev

[issue3035] Removing apparently unwanted functions from Tkinter

2012-03-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: PendingDeprecationWarning would mean that we are going to remove it someday. If you actually want to remove them in a reasonable time, you should use DeprecationWarning in 3.3, and then remove them in 3.4. But is there a need to remove

[issue3035] Removing apparently unwanted functions from Tkinter

2012-03-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Also, posting a patch for review before committing is a good idea. If you don't get a review in a reasonable time period, then as a committer you can of course go ahead and commit, based on your judgement. --

[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: with hg it is stronly recommended to apply to 3.2 first and forward port to 3.3. Something about the DAGs working better. The default branch (3.3) are a superset of the changesets in 3.2: all bug fixes are in both branches, and new features

[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- Removed message: http://bugs.python.org/msg156522 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3573 ___

[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: 3-22 00:26 with hg it is stronly recommended to apply to 3.2 first and forward port to 3.3. Something about the DAGs working better. The default branch (3.3) is a superset of 3.2: all bug fixes are in both branches, and new features are in

[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: (Edited for typos, ignore the “3-22 00:26” that comes from I don’t know where) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3573 ___

[issue14204] Support for the NPN extension to TLS/SSL

2012-03-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2514a4e2b3ce by Antoine Pitrou in branch 'default': Issue #14204: The ssl module now has support for the Next Protocol Negotiation extension, if available in the underlying OpenSSL library.

[issue14382] test_unittest crashes loading 'unittest.test.testmock' when run from installed Python

2012-03-21 Thread Ned Deily
New submission from Ned Deily n...@acm.org: When run from an installed location, rather than from the build directory, test_unittest now crashes: $ ./root/bin/python3.3 -m test -w -uall,-largefile test_unittest [1/1] test_unittest test test_unittest crashed -- Traceback (most recent call

[issue13959] Re-implement parts of imp in pure Python

2012-03-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Once things all the import stuff currently on the table is wrapped up, I'll probably work on switching things over to using importlib directly. Please leave distutils unchanged; we don’t clean it up or improve it in any way, it’s bugfixes

[issue14204] Support for the NPN extension to TLS/SSL

2012-03-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Closing since the buildbots don't seem to show any new failures after the commit. Thank you for your contribution! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python

[issue14383] Generalize the use of _Py_IDENTIFIER in ceval.c and typeobject.c

2012-03-21 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@gmail.com: Attached patch adds the followig functions: - _PyDict_GetItemId() - _PyDict_SetItemId() - _PyType_LookupId() (private) And it uses identifiers in ceval.c and typeobject.c where it is revelant. I expect a small speedup. The patch

[issue13959] Re-implement parts of imp in pure Python

2012-03-21 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: Sounds good. It will be a while before we get there, but at that point I was already planning on getting in touch with the maintainers of relevant modules before messing with them. -- ___

[issue14383] Generalize the use of _Py_IDENTIFIER in ceval.c and typeobject.c

2012-03-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14383 ___ ___ Python-bugs-list

[issue14384] Add default kw argument to operator.itemgetter and operator.attrgetter

2012-03-21 Thread Miki Tebeka
New submission from Miki Tebeka miki.teb...@gmail.com: This way they will behave more like getattr and the dictionary get. If default is not specified, then if the item/attr not found, an execption will be raised, which is the current behavior. However if default is specified, then return it

[issue14383] Generalize the use of _Py_IDENTIFIER in ceval.c and typeobject.c

2012-03-21 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Removed file: http://bugs.python.org/file24987/identifier.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14383 ___

[issue14383] Generalize the use of _Py_IDENTIFIER in ceval.c and typeobject.c

2012-03-21 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: Oops, my patch contained an unrelated change. I attach a new patch. I commited the change: changeset: 75866: tag: tip user:Victor Stinner victor.stin...@gmail.com date:Thu Mar 22 02:09:08 2012 +0100 files:

[issue14384] Add default kw argument to operator.itemgetter and operator.attrgetter

2012-03-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Thanks for the suggestion. It is an interesting idea, but there are some issues. attrgetter and itemgetter can take more than one key. It would probably make more sense to have the returned function be the one that takes the default,

[issue14385] Support other types than dict for __builtins__

2012-03-21 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@gmail.com: CPython expects __builtins__ to be a dict, but it is interesting to be able to use another type. For example, my pysandbox project (sandbox to secure Python) requires a read-only mapping for __builtins__. The PEP 416 was rejected,

[issue3035] Removing apparently unwanted functions from Tkinter

2012-03-21 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I do not know or directly use tkinter enough to judge the proposed removal. (Although they do look like they might be useless.) I would like to see a little more explanation on the record. Who wrote # XXX I don't like these -- take them away?

[issue14386] Expose dictproxy as a public type

2012-03-21 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@gmail.com: Attached patch makes the dictproxy type public. Example: $ ./python Python 3.3.0a1+ (default:059489cec7b9+, Mar 22 2012, 02:45:36) d=dictproxy({1:2}) d dict_proxy({1: 2}) d[1] 2 d[1]=3 TypeError: 'dictproxy' object does not

[issue14385] Support other types than dict for __builtins__

2012-03-21 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: See the issue #14386 which exposes dictproxy as a public type. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14385 ___

[issue14386] Expose dictproxy as a public type

2012-03-21 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: dictproxy.patch: proxy_new() should check that dict is a dict (PyDict_Check). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14386

[issue14386] Expose dictproxy as a public type

2012-03-21 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14386 ___ ___ Python-bugs-list

[issue14385] Support other types than dict for __builtins__

2012-03-21 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: Example combining patches of #14385 and #14386 to run code with read-only __builtins__: --- test.py - ns={'__builtins__': __builtins__.__dict__} exec(compile(__builtins__['superglobal']=1; print(superglobal), test,

[issue5301] add mimetype for image/vnd.microsoft.icon (patch)

2012-03-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Reopening for 2.7. See http://bugs.python.org/issue13952#msg153106 and also Terry’s proposal in the last message. -- nosy: +eric.araujo stage: committed/rejected - status: closed - open ___ Python

[issue14241] io.UnsupportedOperation.__new__(io.UnsupportedOperation) fails

2012-03-21 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14241 ___ ___ Python-bugs-list mailing

[issue14357] Distutils2 does not work with virtualenv

2012-03-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Can you give more info about your OS, ~/.pydistutils.cfg, etc.? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14357 ___

[issue14378] __future__ imports fail when compiling from python ast

2012-03-21 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14378 ___

[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2012-03-21 Thread Dmitry Shachnev
Dmitry Shachnev mity...@gmail.com added the comment: You can get it to work by explicitly passing the charset Thanks, I didn't know about that. Given the above, do you need it anymore? No. -- ___ Python tracker rep...@bugs.python.org

[issue14376] sys.exit documents argument as integer but actually requires subtype of int

2012-03-21 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14376 ___ ___ Python-bugs-list

[issue5136] Deprecating (and removing) globalcall, merge and globaleval

2012-03-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Andrew, you can take over this issue if you want. As you’ve discovered with #3035, our deprecation process is a bit unclear (this was discussed on python-dev a few months ago), so using PendingDeprecationWarning vs. DeprecationWarning is a