Re: Python one-liner?

2012-04-14 Thread Tim Chase
On 04/13/12 22:54, Chris Angelico wrote: Yes, that would be the right method to use. I'd not bother with the function and map() though, and simply iterate: d = {} for val in l: d.setdefault(f(val), []).append(val) Or make d a defaultdict: from collections import defaultdict d =

Re: trac.util

2012-04-14 Thread Alex Willmer
On Apr 11, 9:52 pm, cerr ron.egg...@gmail.com wrote: Hi, I want to install some python driver on my system that requires trac.util (from Image.py) but I can't find that anywhere, any suggestions, anyone? Thank you very much, any help is appreciated! Error: File /root/weewx/bin/Image.py,

Newbie python questions...

2012-04-14 Thread vmars316
win7HomePremium: Greetings, 1) I installed portablePython(pP) here: C:\Users\vmars\Python3 ?Does that look ok? 2) I would like to try pyWin, but it won't let me install because there is no pP3.2 in registry. ? How can I update the Registry for Python3.2 ? 3) When ever I cllick on *.py file, it

Re: Newbie python questions...

2012-04-14 Thread Andrew Berg
On 4/14/2012 1:25 PM, vmars316 wrote: I installed portablePython(pP) here: C:\Users\vmars\Python3 ?Does that look ok? I would suggest including the minor version number (i.e. Python32 instead of Python3) because not all 3.x code is compatible with all versions of Python 3.x - all code that

Re: Newbie python questions...

2012-04-14 Thread Temia Eszteri
3) When ever I cllick on *.py file, it runs by so fast that I can't see what's going on. ?Is there a way to keep the pyconsole open 'til i decide to close it? Thanks...Vernon This one's answered easily enough - just open a command prompt window at that directory (shift-right click the folder and

Re: Zipping a dictionary whose values are lists

2012-04-14 Thread Arnaud Delobelle
On 13 April 2012 17:35, Kiuhnm kiuhnm03.4t.yahoo...@mail.python.org wrote: On 4/13/2012 17:58, Alexander Blinne wrote: zip(*[x[1] for x in sorted(d.items(), key=lambda y: y[0])]) Or  zip(*[d[k] for k in sorted(d.keys())]) .keys() is superfluous here: zip(*(d[k] for k in sorted(d))) --

Re: Newbie python questions...

2012-04-14 Thread Emile van Sebille
On 4/14/2012 11:25 AM vmars316 said... win7HomePremium: Greetings, 1) I installed portablePython(pP) here: C:\Users\vmars\Python3 ?Does that look ok? 2) I would like to try pyWin, but it won't let me install because there is no pP3.2 in registry. ? How can I update the Registry for Python3.2

[newbie questions] if conditions - if isset - if empty

2012-04-14 Thread Mahmoud Abdel-Fattah
Hello, I'm coming from PHP background ant totally new to Python, I just started using scrapy, but has some generic question in python. 1. How can I write the following code in easier way in Python ? if len(item['description']) 0: item['description'] = item['description'][0]

Naming future objects and their methods

2012-04-14 Thread Stefan Schwarzer
Hello, I wrote a `Connection` class that can be found at [1]. A `Connection` object has a method `put_bytes(data)` which returns a future [2]. The data will be sent asynchronously by a thread attached to the connection object. The future object returned by `put_bytes` has a `was_sent` method

Re: [newbie questions] if conditions - if isset - if empty

2012-04-14 Thread Chris Angelico
On Sun, Apr 15, 2012 at 8:16 AM, Mahmoud Abdel-Fattah accou...@abdel-fattah.net wrote: Hello, I'm coming from PHP background ant totally new to Python, I just started using scrapy, but has some generic question in python. 1. How can I write the following code in easier way in Python ? if

Re: Naming future objects and their methods

2012-04-14 Thread Chris Angelico
On Sun, Apr 15, 2012 at 8:22 AM, Stefan Schwarzer sschwar...@sschwarzer.net wrote: The future object returned by `put_bytes` has a `was_sent` method which will return `True` once the sender thread has actually sent the data via a socket call. Dunno if this throws a spanner in your works, but

Re: [newbie questions] if conditions - if isset - if empty

2012-04-14 Thread Zero Piraeus
: 1. How can I write the following code in easier way in Python ? if len(item['description']) 0:             item['description'] = item['description'][0]         else:             item['description'] = '' Assuming item['description'] is a string, all you need is item['description'] =

Re: [newbie questions] if conditions - if isset - if empty

2012-04-14 Thread Mahmoud Abdel-Fattah
Thanks ChrisA a lot. I just tried what you said, but I got an error, here's what I tried : item['name'] = hxs.select('//div[@id=center-main]/h1/text()').extract()[0] author_brand = re.match(r'^[.*] - (.*)$', item['name'], re.I|re.S|re.M) item['author_brand'] = author_brand.group(2) if

Re: [newbie questions] if conditions - if isset - if empty

2012-04-14 Thread Chris Angelico
On Sun, Apr 15, 2012 at 8:41 AM, Mahmoud Abdel-Fattah accou...@abdel-fattah.net wrote: item['author_brand'] = author_brand.group(2) if type(author_brand) != None else '' Almost there! :) None is a singleton, not a type; you don't need to check type(author_brand) but rather its identity. Use

Re: Python Gotcha's?

2012-04-14 Thread Bryan
Miki Tebeka wrote: If you have an interesting/common Gotcha (warts/dark corners ...) please share. Python 3(K) likes to use the same '.py' file extension as its incompatible predecessors, and in some/many/most *nix implementations, it likes to install in the same place. Python 3 is an

Re: [newbie questions] if conditions - if isset - if empty

2012-04-14 Thread MRAB
On 14/04/2012 23:45, Chris Angelico wrote: On Sun, Apr 15, 2012 at 8:41 AM, Mahmoud Abdel-Fattah accou...@abdel-fattah.net wrote: item['author_brand'] = author_brand.group(2) if type(author_brand) != None else '' Almost there! :) None is a singleton, not a type; you don't need to check

Re: Python Gotcha's?

2012-04-14 Thread Chris Angelico
On Sun, Apr 15, 2012 at 8:47 AM, Bryan bryanjugglercryptograp...@yahoo.com wrote: Python 3(K) likes to use the same '.py' file extension as its incompatible predecessors, and in some/many/most *nix implementations, it likes to install in the same place. Python 3 is an improvement upon Python

Re: [newbie questions] if conditions - if isset - if empty

2012-04-14 Thread Chris Angelico
On Sun, Apr 15, 2012 at 9:00 AM, MRAB pyt...@mrabarnett.plus.com wrote: re.match(...) returns either a match object or None. In a condition, a match object always evaluates as True and None always evaluates as False. Yes, should have clarified that. It's a deliberate feature of the re module

Re: Python Gotcha's?

2012-04-14 Thread MRAB
On 14/04/2012 23:47, Bryan wrote: Miki Tebeka wrote: If you have an interesting/common Gotcha (warts/dark corners ...) please share. Python 3(K) likes to use the same '.py' file extension as its incompatible predecessors, and in some/many/most *nix implementations, it likes to install in

Re: Python Gotcha's?

2012-04-14 Thread Steven D'Aprano
On Sat, 14 Apr 2012 15:47:54 -0700, Bryan wrote: Miki Tebeka wrote: If you have an interesting/common Gotcha (warts/dark corners ...) please share. Python 3(K) likes to use the same '.py' file extension as its incompatible predecessors, And so it should. Python 2 and Python 3 are two

Re: Newbie python questions...

2012-04-14 Thread Steven D'Aprano
On Sat, 14 Apr 2012 11:25:57 -0700, vmars316 wrote: win7HomePremium: Greetings, 1) I installed portablePython(pP) here: C:\Users\vmars\Python3 ?Does that look ok? Sure, why not? 2) I would like to try pyWin, but it won't let me install because there is no pP3.2 in registry. ? How

[issue14535] three code examples in docs are not syntax highlighted

2012-04-14 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Ezio: That's a bug in Sphinx; even when the language is selected explicitly as python, it will try to parse the code. It is fixed in a later Sphinx version. -- nosy: +georg.brandl ___ Python tracker

[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2012-04-14 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: As long as there is a way to access these fields directly from the struct (with the usual preprocessor conditional), I don't think Cython will actually start to use the PyErr_[GS]etExcInfo() functions in CPython - simply for

[issue11750] Mutualize win32 functions

2012-04-14 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- nosy: +kristjan.jonsson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11750 ___ ___

[issue14574] SocketServer doesn't handle client disconnects properly

2012-04-14 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- nosy: +kristjan.jonsson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14574 ___ ___

[issue14534] Add method to mark unittest.TestCases as do not run.

2012-04-14 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: +1, we already have such decorators for individual test cases. Code should be obvious, particularly testing code and mixins often aren't. Magic such as identifying classes to run by their type should be over rideable. All magic

[issue14576] IDLE cannot connect to subprocess - New solution

2012-04-14 Thread clikkeb
New submission from clikkeb clik...@gmail.com: It's a common issue that IDLE cannot start on Windows because IDLE's subprocess didn't make connection.Either IDLE can't start a subprocess or personal firewall software is blocking the connection. Everyone claim that the user should set the

[issue14577] pickling uses __class__ so you can't pickle proxy/mock objects that pretend to be other objects

2012-04-14 Thread Michael Foord
New submission from Michael Foord mich...@voidspace.org.uk: Pickling uses __class__ instead of type(obj) to determine the type to pickle. This means that objects which pretend to be other objects (like proxy and mock objects) can't be pickled correctly: class Foo(object): ... __class__ =

[issue14577] pickling uses __class__ so you can't pickle proxy/mock objects that pretend to be other objects

2012-04-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Have you tried making a change and see if any tests fail? This is a behaviour change and I wonder if the original behaviour is by design or accident. -- components: +Library (Lib) nosy: +alexandre.vassalotti, pitrou type: - enhancement

[issue6380] Deadlock during the import in the fork()'ed child process if fork() happened while import_lock was held

2012-04-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This was fixed long ago in 724bbd489ad4. Dmitriy's example works fine with 2.7. -- nosy: +pitrou resolution: - out of date stage: needs patch - committed/rejected status: open - closed ___ Python

[issue14574] SocketServer doesn't handle client disconnects properly

2012-04-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14574 ___ ___ Python-bugs-list mailing

[issue14577] pickling uses __class__ so you can't pickle proxy/mock objects that pretend to be other objects

2012-04-14 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: So, changing copyreg.py to use type(self) instead of self.__class__ isn't sufficient. _pickle accesses __class__ as well it seems. However I'm running all tests with this change in place to see if it breaks intended behaviour: Python

[issue14577] pickling uses __class__ so you can't pickle proxy/mock objects that pretend to be other objects

2012-04-14 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: test_pickle still passes with only copyreg.py modified. With one additional change in pickle.py (line 405 to use type(obj) instead of obj.__class__) the pickling works as I would hope (I would need assistance to fix _pickle): import

[issue14577] pickling uses __class__ so you can't pickle proxy/mock objects that pretend to be other objects

2012-04-14 Thread Michael Foord
Changes by Michael Foord mich...@voidspace.org.uk: -- resolution: - wont fix stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14577 ___

[issue14577] pickling uses __class__ so you can't pickle proxy/mock objects that pretend to be other objects

2012-04-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Some additional thoughts for anyone else that comes across this issue. Consider the case of a weakref proxy (the only proxy type in the stdlib): for that, you never want to serialise the proxy, you want to serialise the original object. To

[issue14577] pickling uses __class__ so you can't pickle proxy/mock objects that pretend to be other objects

2012-04-14 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Nick - in general proxy objects have a *reference* to their target (weakref being somewhat of a special case), and pickle can already handle multiple references to the same target when deserializing an object graph. So I don't see that

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2012-04-14 Thread Robin Schreiber
Robin Schreiber robin.schrei...@me.com added the comment: I have now submitted a patch, which swapped out all the necessary calls. Tests are all running as expected. I will now try to remove some backwards compatibility code. -- keywords: +patch Added file:

[issue13700] imaplib.IMAP4.authenticate authobject fails with PLAIN mechanism

2012-04-14 Thread Simonas Kazlauskas
Simonas Kazlauskas simo...@kazlauskas.me added the comment: Exactly same thing happens with `XOAUTH` mechanism too, so this bug report should be made more general. (Py3.2.2) -- nosy: +nagisa ___ Python tracker rep...@bugs.python.org

[issue13700] imaplib.IMAP4.authenticate authobject does not work correctly in python3

2012-04-14 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- title: imaplib.IMAP4.authenticate authobject fails with PLAIN mechanism - imaplib.IMAP4.authenticate authobject does not work correctly in python3 ___ Python tracker rep...@bugs.python.org

[issue14574] SocketServer doesn't handle client disconnects properly

2012-04-14 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Thanks for the report. Several things are going on here: 1. Even though socketserver's StreamRequestHandler uses unbuffered wfile for the socket class StreamRequestHandler(BaseRequestHandler): [...] rbufsize = -1 wbufsize

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2012-04-14 Thread Robin Schreiber
Changes by Robin Schreiber robin.schrei...@me.com: Removed file: http://bugs.python.org/file25211/sqlite.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9303 ___

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2012-04-14 Thread Robin Schreiber
Changes by Robin Schreiber robin.schrei...@me.com: Added file: http://bugs.python.org/file25212/sqlite.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9303 ___

[issue6380] Deadlock during the import in the fork()'ed child process if fork() happened while import_lock was held

2012-04-14 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Just to answer Greg's question, importlib uses a context manager to manage the import lock so as long as that surfaces the right thing in a fork then things will be fine. -- ___ Python tracker

[issue14578] importlib doesn't check Windows registry for paths

2012-04-14 Thread Brett Cannon
New submission from Brett Cannon br...@python.org: Because I don't have access to Windows, importlib doesn't check the Windows registry for paths to search (see the use of _PyWin_FindRegisteredModule() in Python/import.c and its definition in PC/import_nt.c). I am considering this a release

[issue14578] importlib doesn't check Windows registry for paths

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

[issue14578] importlib doesn't check Windows registry for paths

2012-04-14 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: Yeah, that's one part of imp.find_module that I kind of set aside too (the #ifdef MS_COREDLL sections in Python/import.c). For now would it be sufficient to expose _PyWin_FindRegisteredModule() privately with a wrapper in the imp

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2dd046be2c88 by Brett Cannon in branch 'default': Issue #2377: Make importlib the implementation of __import__(). http://hg.python.org/cpython/rev/2dd046be2c88 -- nosy: +python-dev

[issue14578] importlib doesn't check Windows registry for paths

2012-04-14 Thread Brian Curtin
Changes by Brian Curtin br...@python.org: -- nosy: +brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14578 ___ ___ Python-bugs-list

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-14 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: While the code has been committed, I'm leaving the issue open until I have checked that the language spec is up-to-date and I have written the What's New entry. I am holding off on both, though, unti any tweaks I make to the import process is

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-14 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2377 ___ ___

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

2012-04-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I think this should be a blocker for 3.3. -- nosy: +pitrou priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13959

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-14 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Notes on what to mention: importlib.invalidate_caches() doctests and ImportError now spitting out the full module name ImportError's new attributes -- ___ Python tracker rep...@bugs.python.org

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-14 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: More notes: 5% startup loss according to normal_startup; within realm of compiler optimizations. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2377

[issue14579] Possible vulnerability in the utf-16 decoder after error handling

2012-04-14 Thread Serhiy Storchaka
New submission from Serhiy Storchaka storch...@gmail.com: In the utf-16 decoder after calling unicode_decode_call_errorhandler aligned_end is not updated. This may potentially cause data leaks, memory damage, and crash. The bug introduced by implementation of the issue #4868. In a similar

[issue14579] Possible vulnerability in the utf-16 decoder after error handling

2012-04-14 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, pitrou stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14579 ___

[issue14579] Possible vulnerability in the utf-16 decoder after error handling

2012-04-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file25214/utf16_update_after_error-3.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14579 ___

[issue14580] imp.reload can fail for sub-modules

2012-04-14 Thread Paul Ollis
New submission from Paul Ollis pyt...@ollis.me.uk: Code like this:: import collections.abc imp.reload(collections.abc) Raises the following exception: SystemError: Negative size passed to PyUnicode_New This occurs on the latest mercurial checkout (76302). -- components:

[issue14580] imp.reload can fail for sub-modules

2012-04-14 Thread Paul Ollis
Paul Ollis pyt...@ollis.me.uk added the comment: Patch adding a test to reproduce the issue. -- keywords: +patch Added file: http://bugs.python.org/file25215/patch01-tests.diff ___ Python tracker rep...@bugs.python.org

[issue14580] imp.reload can fail for sub-modules

2012-04-14 Thread Paul Ollis
Paul Ollis pyt...@ollis.me.uk added the comment: Patch that fixes the issue. -- Added file: http://bugs.python.org/file25216/patch01-code.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14580

[issue14580] imp.reload can fail for sub-modules

2012-04-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +brett.cannon priority: normal - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14580 ___

[issue11750] Mutualize win32 functions

2012-04-14 Thread sbt
sbt shibt...@gmail.com added the comment: Attached is an up to date patch. * code has been moved to Modules/_windows.c * DWORD is uniformly treated as unsigned * _subprocess's handle wrapper type has been removed (although subprocess.py still uses a Python implemented handle wrapper type)

[issue11750] Mutualize win32 functions

2012-04-14 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: I don't think we need the vcproj file, unless I missed something. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11750 ___

[issue11750] Mutualize win32 functions

2012-04-14 Thread sbt
sbt shibt...@gmail.com added the comment: I don't think we need the vcproj file, unless I missed something. _multiprocessing.win32 currently wraps closesocket(), send() and recv() so it needs to link against ws2_32.lib. I don't know how to make _windows link against ws2_32.lib without adding

[issue14581] Support case-insensitive file extensions on Windows in importlib

2012-04-14 Thread Brett Cannon
New submission from Brett Cannon br...@python.org: Importlib doesn't cover case-insensitivity on file extensions under Windows (see test.test_import.test_import: http://www.python.org/dev/buildbot/all/builders/x86%20XP-5%203.x/builds/41/steps/test/logs/stdio). Should add a test to

[issue14582] Have importlib use return value from a loader's load_module()

2012-04-14 Thread Brett Cannon
New submission from Brett Cannon br...@python.org: Right now importlib doesn't use what loader.load_module() returns as that was what import.c did. But PEP 302 explicitly states that load_module() is expected to return the module that was loaded. So to save a dict lookup I want to rely on the

[issue14583] try/except import fails --without-threads

2012-04-14 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: In the build --without-threads, catching an ImportError in support.py fails. Fedora buildbot: http://www.python.org/dev/buildbot/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/1986/steps/test/logs/stdio ./python

[issue14584] Add gzip support the XMLRPC Server

2012-04-14 Thread Raymond Hettinger
New submission from Raymond Hettinger raymond.hettin...@gmail.com: The xmlrpclib client already supports gzipped data and say so in the HTTP header: Accept-Encoding: gzip. Our XMLRPC Server ignores this header and always sends uncompressed data. -- messages: 158282 nosy: rhettinger

[issue14581] Support case-insensitive file extensions on Windows in importlib

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

[issue11750] Mutualize win32 functions

2012-04-14 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: It shouldn't. I noticed this and fixed this at CCP a while back but I wasn't in Python Committer mode at the time. _select needs fixing. -- ___ Python tracker rep...@bugs.python.org

[issue14582] Have importlib use return value from a loader's load_module()

2012-04-14 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: big +1! I went quite a while before realizing that loader.load_module() was supposed to return the module, due to this specific issue. -- nosy: +eric.snow ___ Python tracker

[issue14580] imp.reload can fail for sub-modules

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

[issue14583] try/except import fails --without-threads

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

[issue14575] IDLE crashes after file open in OS X

2012-04-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: Hugh, Can you launch IDLE from the terminal and report the error message you receive? From a regular Terminal, enter: python -m idlelib.idle FILE_TO_OPEN.py -- nosy: +serwy ___ Python tracker

[issue14574] SocketServer doesn't handle client disconnects properly

2012-04-14 Thread Vladan Djeric
Vladan Djeric vladandje...@gmail.com added the comment: Thank you for taking a look Charles-François. I should note that catching the first exception in the request handler and then calling self.wfile.close() wouldn't fully solve the issue. The self.wfile.close() call would throw another

[issue14575] IDLE crashes after file open in OS X

2012-04-14 Thread Ned Deily
Ned Deily n...@acm.org added the comment: This is almost certainly due to using the Apple-supplied Tcl/Tk 8.5 in Mac OS X 10.6. The Apple-suppied version of Tcl/Tk is buggy to the point of being unusable with Tkinter applications, in particular IDLE. There are many duplicate issues on

[issue14576] IDLE cannot connect to subprocess - New solution

2012-04-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: I can confirm that setting HOMEPATH to a non-existent directory will prevent IDLE from starting when using idle.bat. If you modify idle.bat such that python.exe is called instead of pythonw.exe, then IDLE starts normally, but with this

[issue8900] IDLE crashes if Preference set to At Startup - Open Edit Window

2012-04-14 Thread Roger Serwy
Changes by Roger Serwy roger.se...@gmail.com: -- nosy: +asvetlov, terry.reedy type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8900 ___

[issue9925] Idle doesn't launch

2012-04-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: Is this still a valid issue? -- status: open - pending type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9925 ___

[issue8820] IDLE not launching correctly

2012-04-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: Joseph, Jeff, Is this still a valid issue with the latest release of IDLE? -- status: open - pending type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8820

[issue14006] Improve the documentation of xml.etree.ElementTree

2012-04-14 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14006 ___ ___

[issue9150] IDLE should not save trailing whitespace after strip trailing whitespace has been used

2012-04-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: Ryan, is this still an issue? -- status: open - pending versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9150 ___

[issue14578] importlib doesn't check Windows registry for paths

2012-04-14 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: You could just expose it, but on Windows I believe all extension modules are builtins, so you should be able to properly use _winreg to get at the registry and thus not require keeping the C code around. But that's just a guess. --

[issue9803] IDLE closes with save while breakpoint open

2012-04-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: This is a duplicate of #6257. -- nosy: +serwy resolution: - duplicate status: open - closed superseder: - Idle terminates on source save while debugging ___ Python tracker rep...@bugs.python.org

[issue3493] No Backslash (\) in IDLE 1.2.2

2012-04-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: Is this still an issue with the latest version of IDLE? -- nosy: +serwy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3493 ___

[issue6649] idlelib/rpc.py missing exit status on exithook

2012-04-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: The existing code will raise an error since os._exit requires an argument. http://docs.python.org/library/os.html#os._exit The patch looks good to me. -- nosy: +serwy ___ Python tracker

[issue14581] Support case-insensitive file extensions on Windows in importlib

2012-04-14 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: OK, is supporting this really necessary? It's a special case on Windows only; even OS X which is also case-insensitive doesn't support this. But if it does need to be supported, then does someone know if this extends to all module types or only

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: Brett, your latest commit breaks IDLE. Here's the error message: Failed to import extension: FormatParagraph Failed to load extension 'FormatParagraph' Traceback (most recent call last): File ./idlelib/EditorWindow.py, line 998, in

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-14 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Another thing to note: index does not default to -1 anymore but to 0; bug that should have gone away in Python 2.7. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2377

[issue3493] No Backslash (\) in IDLE 1.2.2

2012-04-14 Thread Ned Deily
Ned Deily n...@acm.org added the comment: The problem of not honoring alternate input methods should no longer be a problem when using a current ActiveState Tcl/Tk 8.5.x on Mac OS X and a Python that is built to link with it, such as the current Python 2.7.x and 3.2.x installers from

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-14 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: So IDLE broke because it was relying on buggy behaviour accidentally left in Python 2.7 and carried forward (plus it was not updated to use best practices like importlib.import_module()). Roger, can you try the patch I have uploaded and see if

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: I tested update_idle.diff and it corrects the issue. While IDLE's use of __import__ may be buggy, I don't see anything in the documentation about deprecation or other warnings about this usage. This is a backwards-incompatible change.

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: I caused a segmentation fault with the following (on Linux): $ mkdir crash $ touch crash/mod.py $ echo __import__('mod', globals(), locals(), [], 1) crash/__init__.py $ ./python3 -m crash -- ___

[issue12436] Missing items in installation/setup instructions

2012-04-14 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12436 ___ ___

[issue12387] IDLE save keyboard shortcut problem

2012-04-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: I can confirm this issue on Linux. This issue is caused by not explicitly binding Control-Key-S to save-window in config-keys.def (and in configHandler.py's GetCoreKeys.) Presently, only Control-key-s binds to save-window. Should all the

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-14 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: I committed the fix. Thanks for testing, Roger. As for the change in semantics, I'm fully aware it is not backwards-compatible. Unfortunately the incorrect usage was not even discovered until I started my bootstrap work because the import

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: Brett, I see your point. The docs for __import__ should be updated to include your two-import fix as well as reference PEP328. http://docs.python.org/dev/library/functions.html?highlight=__import__#__import__ --

[issue14585] Have test_import run more importlib tests

2012-04-14 Thread Brett Cannon
New submission from Brett Cannon br...@python.org: As it stands, test_import runs importlib.test.import_.test_relative_imports. It would probably be better to have test_import run all importlib tests using __import__(), especially since it is already coded up in importlib.test.__main__ to do

[issue14585] Have test_import run more importlib tests

2012-04-14 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- components: +Tests stage: - needs patch versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14585 ___

[issue14585] Have test_import run more importlib tests

2012-04-14 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14585 ___ ___ Python-bugs-list mailing

[issue14585] Have test_import run more importlib tests

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

  1   2   >