odt2sphinx 0.2 released

2012-05-31 Thread Christophe de Vienne
Hello, odt2sphinx 0.2 is now available on pypi : http://pypi.python.org/pypi/odt2sphinx/. Odt2sphinx convert OpenDocument Text file(s) to one or several .rst files suitable for Sphinx. Changes --- * Now supports python 3 * Explicitely added PIL as a dependency (issue #2). Regards,

ANN: SfePy 2012.2

2012-05-31 Thread Robert Cimrman
I am pleased to announce release 2012.2 of SfePy. Description --- SfePy (simple finite elements in Python) is a software for solving systems of coupled partial differential equations by the finite element method. The code is based on NumPy and SciPy packages. It is distributed under the

PyCon DE 2012 - Today: Deadline for Talk and Tutorial Proposals

2012-05-31 Thread Mike Müller
Dear Pythonistas, The last day of May marks the last chance to submit a talk or tutorial proposal for PyCon DE 2012. Don't miss this chance to speak at the largest gathering of the German-speaking Python community. Talks and tutorials in English are welcome if you are not comfortable with

[ANN] bzr 2.5.1 released

2012-05-31 Thread Vincent Ladeuil
Hi all, Here comes our new stable release: 2.5.1 Bazaar http://bazaar.canonical.com/ is a Canonical project and part of the GNU project http://gnu.org/ to produce a free operating system. This is a bugfix release. Upgrading is recommended for all users on earlier 2.5 releases. 2.5.1 contains

Mémento Python 3

2012-05-31 Thread Laurent Pointal
Hello, Here is an announce for a Mémento Python 3 (in French - English version will come later). It targets students learning basics of algorithmic and programming, some remarks are related to common errors we can see in practical courses. It dont cover object oriented programming.

How to suppress exception printing to console?

2012-05-31 Thread Qi
Hi guys, I have an application that embedding Python into C++. When any exception occurred in C++ code, PyErr_SetString will be called to propagate the exception to Python. The problem is, some unit tests trigger exception on intention. So it's OK to have the exceptions. But Python will still

Re: How to suppress exception printing to console?

2012-05-31 Thread Gelonida N
On 05/31/2012 09:57 AM, Qi wrote: Hi guys, I have an application that embedding Python into C++. When any exception occurred in C++ code, PyErr_SetString will be called to propagate the exception to Python. The problem is, some unit tests trigger exception on intention. So it's OK to have the

colorbar of image

2012-05-31 Thread Mireille . Hagbe . Ngom
that is my script from matplotlib import pyplot img = pyplot.imread('image.png') pyplot.imshow(img) pyplot.show() the problem is i want to display either colorbar associated to the image and image or just colorbar associated to the image when i download image.png.how can i do? tk's

Re: Maintaining Multiple Copies of Python (Linux)

2012-05-31 Thread Oscar Benjamin
On 31 May 2012 02:41, Nicholas Fitzkee nfitz...@gmail.com wrote: On Wednesday, May 30, 2012 7:55:33 PM UTC-5, Ben Finney wrote: The consensus solution for this is ‘virtualenv’ URL:http://pypi.python.org/pypi/virtualenv. It is so popular as a solution for the kinds of problems you

Re: Object cleanup

2012-05-31 Thread psaff...@googlemail.com
Thanks for all the responses. It looks like none of the BeautifulSoup objects have __del__ methods, so I don't think that can be the problem. To answer your other question, guppy was the best match I came up with when looking for a memory profile for Python (or more specifically Heapy):

Templating library which generates HTML+JS for interfacing RESTfully?

2012-05-31 Thread Alec Taylor
Are there any templating libraries—e.g.: Jinja2, Django Template Engine, Mako etc—which can be used to interface over REST, XMLRPC xor JSONRPC? My use-cases follow: 1. Generate a website, e.g.: to run from example.com (currently every templating language does this out of the box) 2. Generate

Re: Object cleanup

2012-05-31 Thread Oscar Benjamin
On 31 May 2012 11:57, psaff...@googlemail.com psaff...@googlemail.comwrote: Thanks for all the responses. It looks like none of the BeautifulSoup objects have __del__ methods, so I don't think that can be the problem. To answer your other question, guppy was the best match I came up with

Re: Tkinter deadlock on graceful exit

2012-05-31 Thread Matteo Landi
On Thu, May 31, 2012 at 3:42 AM, Terry Reedy tjre...@udel.edu wrote: On 5/30/2012 6:19 PM, Matteo Landi wrote: On May/28, Matteo Landi wrote: Hi list, recently I started to work on an application [1] which makes use of the Tkinter module to handle interaction with the user.  Simply put,

Re: How to suppress exception printing to console?

2012-05-31 Thread Steven D'Aprano
On Thu, 31 May 2012 15:57:08 +0800, Qi wrote: Hi guys, I have an application that embedding Python into C++. When any exception occurred in C++ code, PyErr_SetString will be called to propagate the exception to Python. The problem is, some unit tests trigger exception on intention. I'm

Re: How to suppress exception printing to console?

2012-05-31 Thread Qi
On 2012-5-31 21:31, Steven D'Aprano wrote: The problem is, some unit tests trigger exception on intention. I'm sorry, I don't understand what you mean by on intention. I mean the exception is expected. The test will only pass if the embedded Python code raise certain exception. Are you

Re: How to suppress exception printing to console?

2012-05-31 Thread Ulrich Eckhardt
Am 31.05.2012 09:57, schrieb Qi: I have an application that embedding Python into C++. When any exception occurred in C++ code, PyErr_SetString will be called to propagate the exception to Python. The first sentence is clear. The second sentence rather sounds as if you were implementing a

Re: sqlite INSERT performance

2012-05-31 Thread duncan smith
On 31/05/12 06:15, John Nagle wrote: On 5/30/2012 6:57 PM, duncan smith wrote: Hello, I have been attempting to speed up some code by using an sqlite database, but I'm not getting the performance gains I expected. SQLite is a lite database. It's good for data that's read a lot and not changed

Re: sqlite INSERT performance

2012-05-31 Thread Jon Clements
On Thursday, 31 May 2012 16:25:10 UTC+1, duncan smith wrote: On 31/05/12 06:15, John Nagle wrote: On 5/30/2012 6:57 PM, duncan smith wrote: Hello, I have been attempting to speed up some code by using an sqlite database, but I'm not getting the performance gains I expected. SQLite is

colorbar of image

2012-05-31 Thread mhagbeng
that is my script from matplotlib import pyplot img = pyplot.imread('image.png') pyplot.imshow(img) pyplot.show() the problem is i want to display either colorbar associated to the image and image or just colorbar associated to the image when i download image.png.how can i do? tk's

reading txt file

2012-05-31 Thread Ahmed, Shakir
HI: I am trying to read a txt file and dump the columns in an access database table. But getting problem: Unhandled exception while debugging... Traceback (most recent call last): File C:\WindDuration\Reading_test.py, line 14, in module my_length_1 = nmAddrList[1] IndexError: list index

Re: reading txt file

2012-05-31 Thread MRAB
On 31/05/2012 16:02, Ahmed, Shakir wrote: HI: I am trying to read a txt file and dump the columns in an access database table. But getting problem: Unhandled exception while debugging... Traceback (most recent call last): File C:\WindDuration\Reading_test.py, line 14, inmodule

Re: sqlite INSERT performance

2012-05-31 Thread duncan smith
On 31/05/12 17:06, Jon Clements wrote: On Thursday, 31 May 2012 16:25:10 UTC+1, duncan smith wrote: On 31/05/12 06:15, John Nagle wrote: On 5/30/2012 6:57 PM, duncan smith wrote: Hello, I have been attempting to speed up some code by using an sqlite database, but I'm not getting the

Re: reading txt file

2012-05-31 Thread Terry Reedy
On 5/31/2012 11:02 AM, Ahmed, Shakir wrote: When you want to start a new thread, make sure you start a new thread and do not post as a response to another thread. This will get lost as a response to 'How to suppress ...'. Is this a homework, hobby, or work exercise? I am trying to read a

Re: cmd2, an extenstion of cmd that parses its argument list

2012-05-31 Thread Adam Tauno Williams
On Thu, 2012-04-26 at 12:16 -0700, anntzer@gmail.com wrote: On Sunday, March 18, 2012 10:12:24 PM UTC-7, anntz...@gmail.com wrote: Dear all, I would like to announce the first public release of cmd2, an extension of the standard library's cmd with argument parsing, here:

Re: cmd2, an extenstion of cmd that parses its argument list

2012-05-31 Thread Adam Tauno Williams
On Thu, 2012-05-31 at 15:21 -0400, Adam Tauno Williams wrote: On Thu, 2012-04-26 at 12:16 -0700, anntzer@gmail.com wrote: On Sunday, March 18, 2012 10:12:24 PM UTC-7, anntz...@gmail.com wrote: Dear all, I would like to announce the first public release of cmd2, an extension of

Re: cmd2, an extenstion of cmd that parses its argument list

2012-05-31 Thread Antony Lee
I am already using shlex.split() (this is a customizable hook). On Thu, May 31, 2012 at 03:42:19PM -0400, Adam Tauno Williams wrote: On Thu, 2012-05-31 at 15:21 -0400, Adam Tauno Williams wrote: On Thu, 2012-04-26 at 12:16 -0700, anntzer@gmail.com wrote: On Sunday, March 18, 2012

Re: python3 raw strings and \u escapes

2012-05-31 Thread ru...@yahoo.com
On 05/30/2012 09:07 AM, ru...@yahoo.com wrote: On 05/30/2012 05:54 AM, Thomas Rachel wrote: Am 30.05.2012 08:52 schrieb ru...@yahoo.com: This breaks a lot of my code because in python 2 re.split (ur'[\u3000]', u'A\u3000A') == [u'A', u'A'] but in python 3 (the result of running 2to3),

[RELEASED] Python 3.3.0 alpha 4

2012-05-31 Thread Georg Brandl
On behalf of the Python development team, I'm happy to announce the fourth alpha release of Python 3.3.0. This is a preview release, and its use is not recommended in production settings. Python 3.3 includes a range of improvements of the 3.x series, as well as easier porting between 2.x and

Re: python3 raw strings and \u escapes

2012-05-31 Thread Chris Angelico
On Fri, Jun 1, 2012 at 6:28 AM, ru...@yahoo.com ru...@yahoo.com wrote: ... a lexer module that is structured as many dozens of little functions, each with a docstring that is a regex string. This may be a good opportunity to take a step back and ask yourself: Why so many functions, each with a

Re: python3 raw strings and \u escapes

2012-05-31 Thread ru...@yahoo.com
On 05/31/2012 03:10 PM, Chris Angelico wrote: On Fri, Jun 1, 2012 at 6:28 AM, ru...@yahoo.com ru...@yahoo.com wrote: ... a lexer module that is structured as many dozens of little functions, each with a docstring that is a regex string. This may be a good opportunity to take a step back and

Re: How to suppress exception printing to console?

2012-05-31 Thread Steven W. Orr
On 5/31/2012 3:57 AM, Qi wrote: I have an application that embedding Python into C++. When any exception occurred in C++ code, PyErr_SetString will be called to propagate the exception to Python. The problem is, some unit tests trigger exception on intention. So it's OK to have the exceptions.

Re: How to suppress exception printing to console?

2012-05-31 Thread Qi
On 2012-5-31 23:01, Ulrich Eckhardt wrote: Am 31.05.2012 09:57, schrieb Qi: The first sentence is clear. The second sentence rather sounds as if you were implementing a Python module in C++. This is the opposite to embedding Python in C++, it's rather embedding C++ in Python. Or is it a C++

[issue14673] add sys.implementation

2012-05-31 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: Thanks for taking the time for the review, Barry. Again, sorry I broke the review link. It shouldn't be a problem any more. Barry A. Warsaw ba...@python.org added the comment: I'm inclined to go with the as_simple_namespace patch.  

[issue14673] add sys.implementation

2012-05-31 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: Added file: http://bugs.python.org/file25768/issue14673_docs_and_tests_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14673 ___

[issue14673] add sys.implementation

2012-05-31 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: History with dictproxy means I'm also OK with new type by stealth. Perhaps add some tests to check type(sys.implementation)() does something sane? Test added. Here's what happens: cls = type(sys.implementation) cls()

[issue14673] add sys.implementation

2012-05-31 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: @Barry: FWIW, the kwds passed to namespace_init was NULL when no keyword arguments were used. Easy enough to handle though. -- ___ Python tracker rep...@bugs.python.org

[issue14966] Fully document subprocess.CalledProcessError

2012-05-31 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: CalledProcessError provides a nice encapsulation for a returncode, the original command and any partial output. The API should be officially documented so that third party subprocess.Popen convenience wrappers can use it easily. --

[issue10376] ZipFile unzip is unbuffered

2012-05-31 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: The patch updated to reflect Martin's stylistic comments. Sorry for the delay, Martin. I have not received an email with your review from 2012-05-13, and only today accidentally discovered your comments in Rietveld. It seems to have been

[issue14944] Setup Usage documentation for pydoc, idle 2to3

2012-05-31 Thread A.M. Kuchling
Changes by A.M. Kuchling li...@amk.ca: -- nosy: +akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14944 ___ ___ Python-bugs-list mailing

[issue14945] Setup Usage documentation for selected stdlib modules

2012-05-31 Thread A.M. Kuchling
Changes by A.M. Kuchling li...@amk.ca: -- nosy: +akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14945 ___ ___ Python-bugs-list mailing

[issue14963] Use an iterative implementation for contextlib.ExitStack.__exit__

2012-05-31 Thread alon horev
alon horev alo...@gmail.com added the comment: that was indeed trickier, but overriding the __context__ attribute did the trick. -- Added file: http://bugs.python.org/file25770/14963.2.patch ___ Python tracker rep...@bugs.python.org

[issue14899] Naming conventions and guidelines for packages and namespace packages

2012-05-31 Thread Alexis Metaireau
Changes by Alexis Metaireau ale...@notmyidea.org: -- nosy: +alexis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14899 ___ ___ Python-bugs-list

[issue14007] xml.etree.ElementTree - XMLParser and TreeBuilder's doctype() method missing

2012-05-31 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: * Another problem: the C implementation of XMLParser does not take 3 positional args, but only 2. Although the 'html' arg is documented as unsupported, it should still be taken and silently ignored, similarly to the Python version --

[issue14909] Fix incorrect use of *Realloc() and *Resize()

2012-05-31 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 588ea940e5e3 by Kristjan Valur Jonsson in branch 'default': Issue #14909: A number of places were using PyMem_Realloc() apis and http://hg.python.org/cpython/rev/588ea940e5e3 -- nosy: +python-dev

[issue14909] Fix incorrect use of *Realloc() and *Resize()

2012-05-31 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14909 ___

[issue14964] distutils2.utils.resolve_name cleanup

2012-05-31 Thread Ronny Pfannschmidt
Ronny Pfannschmidt ronny.pfannschm...@gmail.com added the comment: my change is a unrelated cleanup but the ideas in the patch look good the attribute error addition seems relevant i'll adapt my patch to raise the original import error for toplevel import failure and accumuplate the attrbute

[issue14967] distutils2.utils.resolve_name cannot be implemented to give correct errors in all situations

2012-05-31 Thread Ronny Pfannschmidt
New submission from Ronny Pfannschmidt ronny.pfannschm...@gmail.com: due to the lack of a marker that denotes where the module ends and the attribute starts, unrelated import errors can break the tryerror chain at unexpected places and the code can pass on to the recursive getattr chain,

[issue14967] distutils2.utils.resolve_name cannot be implemented to give correct errors in all situations

2012-05-31 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: the current code works as expected. Why not leaving it like this since your change seem to be comsetics only ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14967

[issue14967] distutils2.utils.resolve_name cannot be implemented to give correct errors in all situations

2012-05-31 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: can you give an example of a bad error ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14967 ___

[issue14967] distutils2.utils.resolve_name cannot be implemented to give correct errors in all situations

2012-05-31 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- resolution: - duplicate superseder: - Improve error reporting for packaging.util.resolve_name ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14967

[issue14967] distutils2.utils.resolve_name cannot be implemented to give correct errors in all situations

2012-05-31 Thread Ronny Pfannschmidt
Ronny Pfannschmidt ronny.pfannschm...@gmail.com added the comment: to correctly implement it we need the : separator back with the separator the import specification is no longer ambigious, and we can use one exact import, and an error will always be an error --

[issue14967] distutils2.utils.resolve_name cannot be implemented to give correct errors in all situations

2012-05-31 Thread Ronny Pfannschmidt
Ronny Pfannschmidt ronny.pfannschm...@gmail.com added the comment: an example of creating a wrong error would be something like the following: there is a package foo.bar, which does a wrong import in __init__.py we want to resolve the name foo.bar.something we'd get the error that foo has no

[issue14964] distutils2.utils.resolve_name cleanup

2012-05-31 Thread Ronny Pfannschmidt
Ronny Pfannschmidt ronny.pfannschm...@gmail.com added the comment: updated the patch with more detailed errors -- Added file: http://bugs.python.org/file25771/resolve_name.patch ___ Python tracker rep...@bugs.python.org

[issue14968] Section Inplace Operators of :mod:`operator` should be a subsection

2012-05-31 Thread Lars Buitinck
New submission from Lars Buitinck l.j.buiti...@uva.nl: The section Inplace Operators of the module docs for operator now show up in TOC at http://docs.python.org/dev/library/. I don't think that's intended as it does not describe a separate module. -- assignee: docs@python components:

[issue14964] distutils2.utils.resolve_name cleanup

2012-05-31 Thread Ronny Pfannschmidt
Ronny Pfannschmidt ronny.pfannschm...@gmail.com added the comment: i missused hg export, here is a corrected patch -- Added file: http://bugs.python.org/file25773/resolve_name.patch ___ Python tracker rep...@bugs.python.org

[issue14969] Restore sys.exc_clear()?

2012-05-31 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: When adding the test case for #14963, I discovered that contextlib.ExitStack can't *quite* reproduce the exception handling of nested with statements. The problem arises when the original exception gets suppressed by one of the handlers,

[issue14963] Use an iterative implementation for contextlib.ExitStack.__exit__

2012-05-31 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset fc73e6ea9e73 by Nick Coghlan in branch 'default': Issue #14963: Added test cases for contextlib.ExitStack exception handling behaviour (Initial patch by Alon Horev) http://hg.python.org/cpython/rev/fc73e6ea9e73

[issue14963] Use an iterative implementation for contextlib.ExitStack.__exit__

2012-05-31 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset c0c7618762e5 by Nick Coghlan in branch 'default': Close #14963: Use an iterative algorithm in contextlib.ExitStack.__exit__ (Patch by Alon Horev) http://hg.python.org/cpython/rev/c0c7618762e5 -- resolution:

[issue14963] Use an iterative implementation for contextlib.ExitStack.__exit__

2012-05-31 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Interesting - it turns out we can't fully reproduce the behaviour of nested with statements in ExitStack (see the new reference test I checked in, as well as #14969) I added one technically redundant variable to the implementation to make it

[issue14970] -v command line option is broken

2012-05-31 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson krist...@ccpgames.com: Using the -v command line option to diagnose import problem is no longer useful. In stead of lines like this in version 2.7: import UserDict # from

[issue14970] -v command line option is broken

2012-05-31 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: See http://hg.python.org/cpython/file/default/Lib/importlib/_bootstrap.py for the source of SourceFileLoader. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org

[issue14952] Cannot run regrtest with amd64/debug on windows

2012-05-31 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: I've found what is wrong. There is a problem with _multiprocessing.pyd on 64 bit debug builds. Why this manifests itself as it does, I don´t know. Someone must be silencinng the proper import error. this is most likely a build

[issue14952] Cannot run regrtest with amd64/debug on windows

2012-05-31 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset c7b16e2be71a by Kristjan Valur Jonsson in branch 'default': Issue #14952: Fix incorrect output dll names for win64/debug builds, causing http://hg.python.org/cpython/rev/c7b16e2be71a -- nosy: +python-dev

[issue14952] Cannot run regrtest with amd64/debug on windows

2012-05-31 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14952 ___

[issue14970] -v command line option is broken

2012-05-31 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Yes, I found that. The line in question is, however, this: _verbose_message('import {!r} # {!r}', name, loader) (_bootstrap.py:1254). Unfortunately, I see no way to get at the line from which the import occurred here. The

[issue14938] 'import my_pkg.__init__' creates duplicate modules

2012-05-31 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: I see what you mean about the discrepancy, but you don't need to complicate the constructor to get the desired result. If you have is_package() check if the module name ends in __init__ to skip the package check and just say False (e.g. only if

[issue14970] -v command line option is broken

2012-05-31 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: The information is still there, just in a different output line (i.e. http://hg.python.org/cpython/file/c7b16e2be71a/Lib/importlib/_bootstrap.py#l735 outputs the same info, just on its own line). I couldn't keep the old format as the code has

[issue14970] -v command line option is broken

2012-05-31 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: I am setting this as pending since I consider the total output acceptable, but if Kristján has specific issues he wants to bring up or change he still can. -- status: open - pending ___ Python tracker

[issue14970] -v command line option is broken

2012-05-31 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Oh dear, silly me. I misunderstood the point of -v _and_ misunderstood the output of 2.7 I was quoting. I was looking for a way to find out where the import originated from, not which file would be imported as a result. Import

[issue14962] When changing IDLE configuration all text in shell window loses highlighting

2012-05-31 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: Attached is a patch to fix this issue. The ModifiedColorDelegator already marks everything before iomark as SYNC'ed. This is good, as the ColorDelegator should not be trying to colorize STDOUT text as Python code. Resetting the

[issue14970] -v command line option is broken

2012-05-31 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Not a problem. =) If you want to know where an import originated from, you can probably do something as simple as overload builtins.__import__ with a version that does a quick stack look to see where the previous call is coming from.

[issue14962] When changing IDLE configuration all text in shell window loses highlighting

2012-05-31 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1a4e99460438 by Ned Deily in branch '2.7': Issue #14962: Update text coloring in IDLE shell window after changing http://hg.python.org/cpython/rev/1a4e99460438 New changeset 9d0c3a835bfe by Ned Deily in branch

[issue14962] When changing IDLE configuration all text in shell window loses highlighting

2012-05-31 Thread Ned Deily
Ned Deily n...@acm.org added the comment: LGTM, thanks. Applied for release in 2.7.4, 3.2.4, and 3.3.0. -- nosy: +ned.deily resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 2.7 ___ Python tracker

[issue14971] (unittest) loadTestsFromName does not work on method with a decorator

2012-05-31 Thread Alessandro Piccione
New submission from Alessandro Piccione alessandro.piccione...@gmail.com: Steps to reproduce the problem. 1. Create a module (ex. name it test) 2. Create a file in it (ex. mainTest.py) with a class (ex. MainTest) derived from TestCase. 3. Create a test method in that class, (ex. test_base),

[issue14938] 'import my_pkg.__init__' creates duplicate modules

2012-05-31 Thread Ronan Lamy
Ronan Lamy ronan.l...@gmail.com added the comment: That would force the Loaders to know how to convert a module name into a file path, which isn't the case now since FileLoader.get_filename() is just a shim that returns self.path. So I'd rather add an optional argument to FileLoader.

[issue14971] (unittest) loadTestsFromName does not work on method with a decorator

2012-05-31 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I don't think this is documented anywhere (and should be). I believe what you need to do is use functools.wraps on your wrapper function. -- assignee: - docs@python components: +Documentation -None nosy: +docs@python,

[issue14814] Implement PEP 3144 (the ipaddress module)

2012-05-31 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: It's funny how raising the test coverage _always_ uncovers lurking bugs in obscure branches. :) Patch attached, let me know if I got it wrong – would commit otherwise. A few quick side-note: does the __version__ variable make sense in stdlib?

[issue6721] Locks in python standard library should be sanitized on fork

2012-05-31 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: Attached is an updated version of Charles-François's reinit_locks.diff. Changes: * Handles RLock by assuming that if self-count != 0 when we acquire the lock, then the lock must have been reinitialized by PyThread_ReInitLocks(). *

[issue14635] telnetlib uses select instead of poll - limited to FD_SETSIZE fds

2012-05-31 Thread Akintayo Holder
Akintayo Holder akint...@google.com added the comment: Hi, telnet.read_until() and telnet.expect() will use select.poll() instead of select.select() on systems where poll() is available. The patch also includes updates to test_telnetlib, the read_until() tests were changed to test the case

[issue14969] Restore sys.exc_clear()?

2012-05-31 Thread alon horev
alon horev alo...@gmail.com added the comment: Another possible solution is to explicitly set an exception's __supress_context__ attribute to False (right now impossible because it's the default value). If a user can 'turn on' the flag when attaching a different exception (raise X from Y),

[issue14972] listcomp with nested classes

2012-05-31 Thread josmiley
New submission from josmiley joel-murie...@sfr.fr: # this runs with python2.7, not with python3.2 class Foo(object): class Bar(object): pass Attr = [Bar()for n in range(10)] # solved in this way ... class Foo(object): class Bar(object): pass Attr = [] for

[issue14972] listcomp with nested classes

2012-05-31 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: Simpler test case: class A: x = 42 y = [x for _ in '1'] The semantics of list comprehension changed with Python 3. However, I do not see this specific behavior documented somewhere.

[issue14972] listcomp with nested classes

2012-05-31 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14972 ___ ___ Python-bugs-list mailing

[issue14972] listcomp with nested classes

2012-05-31 Thread Westley Martínez
Westley Martínez aniko...@gmail.com added the comment: $ python Python 3.2.3 (default, Apr 23 2012, 23:35:30) [GCC 4.7.0 20120414 (prerelease)] on linux2 Type help, copyright, credits or license for more information. class A: ... x = 42 ... y = [x for _ in '1'] ... Traceback (most

[issue14973] restore python2 unicode literals in ru strings

2012-05-31 Thread rurpy the second
New submission from rurpy the second ru...@yahoo.com: PEP 414 proposes restoring the u string prefix (semantically as a noop) to make porting from Python2 easier. I would like to propose that ru-strings also interpret embedded \u unicode literals in the python2 fashion (as a single

[issue14972] listcomp with nested classes

2012-05-31 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: This is doubtless a result of the way the class namespace scope is handled, coupled with the fact that in Python3 list comprehensions have a local scope. The class scope is a somewhat unique beast. I agree that this is unfortunate,

[issue14974] rename packaging.pypi to packaging.index

2012-05-31 Thread Alexis Metaireau
New submission from Alexis Metaireau ale...@notmyidea.org: PyPI is the name of a particular index, whereas index is a generic term. So ISTM that it would be better to use the latter, semantically-wise. -- assignee: alexis components: Distutils2 messages: 162027 nosy: alexis, tarek

[issue14814] Implement PEP 3144 (the ipaddress module)

2012-05-31 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset bd2c2def77a7 by Hynek Schlawack in branch 'default': #14814: Remove stale __hex__ method from ipaddress http://hg.python.org/cpython/rev/bd2c2def77a7 -- ___ Python

[issue14974] rename packaging.pypi to packaging.index

2012-05-31 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: While I can see your point, I think that index is way too generic. I also think that the pypi term is overloaded with both meanings. -- nosy: +hynek ___ Python tracker rep...@bugs.python.org

[issue14975] import unicodedata, DLL load failed on Python 2.7.3

2012-05-31 Thread YF
New submission from YF yfdyh...@gmail.com: Before I use the Python 2.7.2 on Windows XP, today I tried to upgrade to the Python 2.7.3, but encountered a problem. When running any .py file encountered import unicodedata or directly run the command always returns: Traceback (most recent call

[issue6721] Locks in python standard library should be sanitized on fork

2012-05-31 Thread lesha
lesha pybug.20.le...@xoxy.net added the comment: I am really alarmed by the reinit_locks patches. I scanned the comment history, and looked at the patch. I may have missed something, but it looks to me like the basic behavior is this: After fork(), all locks are replaced by brand-new lock

[issue14972] listcomp with nested classes

2012-05-31 Thread Hynek Schlawack
Changes by Hynek Schlawack h...@ox.cx: -- nosy: +hynek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14972 ___ ___ Python-bugs-list mailing list

[issue14971] (unittest) loadTestsFromName does not work on method with a decorator

2012-05-31 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Whilst functools.wraps would fix the problem it still sounds like a bug (or at the very least a reasonable feature request). -- ___ Python tracker rep...@bugs.python.org

[issue14959] ttk.Scrollbar in Notebook widget freezes

2012-05-31 Thread Ned Deily
Ned Deily n...@acm.org added the comment: Another data point: I just tried the same test using a Python 3.2.3 linked with an X11 Tk 8.5 (MacPorts) rather than the ActiveState Cocoa Tk 8.5.11 (python.org Python). I was not able to get the test to fail with X11 Tk so that tends to support the

[issue6721] Locks in python standard library should be sanitized on fork

2012-05-31 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: a) fork() is called with the DB lock held by thread1. b) Some time passes before the child gets to exec(). c) In that time, the child's thread2 gets to doWork(). d) Simultaneously, the parent's doWork is still running and holding a lock.

[issue14975] import unicodedata, DLL load failed on Python 2.7.3

2012-05-31 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I do not believe that this is a problem in Python. Instead, it appears that your Python installation got corrupted somehow. I recommend to run a virus scanner. -- nosy: +loewis ___ Python

[issue6721] Locks in python standard library should be sanitized on fork

2012-05-31 Thread lesha
lesha pybug.20.le...@xoxy.net added the comment: I think forkall() on Solaris acts like that, but the normal fork() function does not. Only the thread which performs fork() will survive in the child process. Sorry, brain fail. A slightly more contrived failure case is this:

[issue14969] Use __suppress_context__ in contextlib.ExitStack.__exit__

2012-05-31 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Electronic contributor forms are actually on the PSF wishlist. We'll get there some day (maybe after the website update). Getting back to the problem at hand, I think you might be on to something with the idea of exploiting PEP 409 to handle

[issue6721] Locks in python standard library should be sanitized on fork

2012-05-31 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: Anyone using a preexec function in subprocess has already declared that they like deadlocks so that isn't an issue. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721

[issue6721] Locks in python standard library should be sanitized on fork

2012-05-31 Thread lesha
lesha pybug.20.le...@xoxy.net added the comment: Deadlocks are dandy, but corruption is cruel. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___

  1   2   >