[issue14608] Python 2.7.3 x86 msi - msvcr90.dll version mismatch

2012-04-17 Thread Eduard
Eduard added the comment: OTOH, the manifest embedded in python.exe references version 9.0.21022.8 I'm going to delete Microsoft.VC90.CRT.manifest and msvcr90.dll from Python installation folder and postpone py2exe experiments a bit. -- ___ Python

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

2012-04-17 Thread Eric Snow
Eric Snow added the comment: rather, tokenize.detect_encoding() -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

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

2012-04-17 Thread Eric Snow
Eric Snow added the comment: 2 "problems" with that last patch: * the types of the loaders that get returned by _bootstrap._find_module() are not the classes in _bootstrap (e.g. _frozen_importlib._SourceFileLoader). That doesn't smell right. * tokenize.get_encoding? is saying that Lib/test/b

[issue14609] can't modify sys.modules during import with importlib

2012-04-17 Thread Eric Snow
Eric Snow added the comment: _find_and_load() in importlib._bootstrap returns whatever the loader returns, which is the new module object. The old code in import.c pulled it from sys.modules rather than using what the loader returned. In both cases the respective object is what eventually g

[issue14609] can't modify sys.modules during import with importlib

2012-04-17 Thread Eric Snow
Eric Snow added the comment: 3.3.0a2+: >>> import x >>> x >>> import sys >>> sys.modules['x'] 5 >>> x 5 -- ___ Python tracker ___ _

[issue14609] can't modify sys.modules during import with importlib

2012-04-17 Thread Eric Snow
Eric Snow added the comment: Loaders are in charge of adding the module to sys.modules (per PEP 302). importlib codifies this in the module_for_loader() decorator, which the default loaders use. -- nosy: +eric.snow ___ Python tracker

[issue14609] can't modify sys.modules during import with importlib

2012-04-17 Thread Philip Jenvey
Philip Jenvey added the comment: __import__ needs the actual module on hand so it can e.g. attach it to its parent module -- nosy: +pjenvey ___ Python tracker ___ _

[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2012-04-17 Thread Brian Curtin
Brian Curtin added the comment: Here's a patch with better wording, and here's a screenshot of what the feature selection looks like with that text: http://i.imgur.com/k7e12.png -- Added file: http://bugs.python.org/file25255/issue3561_v2.diff ___ P

[issue14609] can't modify sys.modules during import with importlib

2012-04-17 Thread Benjamin Peterson
New submission from Benjamin Peterson : $ cat > x.py import sys sys.modules["x"] = 42 benjamin@localhost ~/dev/python/py3k $ python3 Python 3.2.2 (default, Feb 18 2012, 09:16:28) [GCC 4.5.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import x >>> x 42

[issue14608] Python 2.7.3 x86 msi - msvcr90.dll version mismatch

2012-04-17 Thread Eduard
Eduard added the comment: There is a newer redist available: 9.0.30729.6161 from http://www.microsoft.com/download/en/details.aspx?id=26368 -- ___ Python tracker ___ __

[issue14608] Python 2.7.3 x86 msi - msvcr90.dll version mismatch

2012-04-17 Thread Eduard
Eduard added the comment: I was reading about py2exe and found this old thread: https://groups.google.com/d/msg/wxpython-users/fwHt9zSbnsE/IV3aryIBrd8J I'm not familiar with C++ and redists and stuff, but I find it strange that the manifest from the Python folder requires a specific version,

[issue12599] Use 'is not None' where appropriate in importlib

2012-04-17 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker ___

[issue12599] Use 'is not None' where appropriate in importlib

2012-04-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset c1399cf7bd6a by Brett Cannon in branch 'default': Issue #12599: Be more strict in accepting None vs. a false-like object http://hg.python.org/cpython/rev/c1399cf7bd6a -- nosy: +python-dev ___ Python trac

[issue14575] IDLE crashes after file open in OS X

2012-04-17 Thread Ned Deily
Ned Deily added the comment: By the way, you should have been seeing a warning message in the IDLE shell window when using 2.7.3 with the buggy Apple Tcl/TK 8.5, telling you to check the information at http://www.python.org/download/mac/tcltk/. --

[issue14575] IDLE crashes after file open in OS X

2012-04-17 Thread Ned Deily
Ned Deily added the comment: The crash dump confirms that the buggy Apple Tcl/Tk 8.5 frameworks are being used (/System/Library/Frameworks/Tk.framework/Versions/8.5/Tk). As I mentioned, the easiest solution is to install the most recent ActiveState Tcl/Tk 8.5. The python.org Python 2.7.3 wi

[issue12599] Use 'is not None' where appropriate in importlib

2012-04-17 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14575] IDLE crashes after file open in OS X

2012-04-17 Thread Hugh Gibbons
Hugh Gibbons added the comment: No errors when opening the file that way. However, when I then go to the IDLE file menu and open a file using the file browser ( File -> Open.. ) IDLE terminates with a segmentation fault a few seconds after opening the file. Below, I pasted a copy of the mes

[issue14575] IDLE crashes after file open in OS X

2012-04-17 Thread Hugh Gibbons
Hugh Gibbons added the comment: There were no errors when opening the file that way. On Apr 14, 2012, at 3:30 PM, Roger Serwy wrote: > > Roger Serwy added the comment: > > Hugh, Can you launch IDLE from the terminal and report the error message you > receive? From a regular Terminal, enter

[issue14605] Make import machinery explicit

2012-04-17 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14607] method with special keyword-only argument gives error

2012-04-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 22844ddce57b by Benjamin Peterson in branch 'default': merge 3.2 (#14607) http://hg.python.org/cpython/rev/22844ddce57b -- ___ Python tracker

[issue14607] method with special keyword-only argument gives error

2012-04-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset f8540b8d076c by Benjamin Peterson in branch '3.2': mangle keyword-only argname when loading defaults (closes #14607) http://hg.python.org/cpython/rev/f8540b8d076c -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected stat

[issue1615] descriptor protocol bug

2012-04-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue14606] Memory leak subprocess

2012-04-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Library (Lib), Windows ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue14606] Memory leak subprocess

2012-04-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brian.curtin, tim.golden ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14607] method with special keyword-only argument gives error

2012-04-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue14428] Implementation of the PEP 418

2012-04-17 Thread STINNER Victor
STINNER Victor added the comment: > can you let us know when you think the patch is ready for review? Now! I created a repository for the PEP. I integrated my own last comments. I tested the PEP on Linux 3.3, FreeBSD 8, OpenBSD 5, OpenSolaris and Windows Seven. The implementation is ready fo

[issue14428] Implementation of the PEP 418

2012-04-17 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file25253/aac59a3c11ef.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue12599] Use 'is not None' where appropriate in importlib

2012-04-17 Thread Brett Cannon
Changes by Brett Cannon : -- components: +Library (Lib) keywords: +easy priority: normal -> low versions: -Python 3.2 ___ Python tracker ___

[issue14428] Implementation of the PEP 418

2012-04-17 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file25254/384190bb0bd5.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue2090] __import__ with fromlist=

2012-04-17 Thread Brett Cannon
Brett Cannon added the comment: Importlib does away with this issue. -- resolution: -> out of date stage: -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue14428] Implementation of the PEP 418

2012-04-17 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file25253/aac59a3c11ef.diff ___ Python tracker ___ ___ Python-bugs-list mailing

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

2012-04-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 66bd85bcf916 by Brett Cannon in branch 'default': Issue #13959: Re-implement imp.load_compiled() in imp.py. http://hg.python.org/cpython/rev/66bd85bcf916 -- ___ Python tracker

[issue14608] Python 2.7.3 x86 msi - msvcr90.dll version mismatch

2012-04-17 Thread Martin v . Löwis
Martin v. Löwis added the comment: It's not explicitly intended, but a side effect of how Microsoft distributes patches. The redistributable package comes from %ProgramFiles%\Common Files\Merge Modules, whereas the separate copy comes from %VS90COMNTOOLS%\..\..\VC\redist. Apparently, the Wind

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-17 Thread Brett Cannon
Brett Cannon added the comment: Note: __import__('sys', level=1) no longer works; raises KeyError instead. -- ___ Python tracker ___

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-17 Thread Brett Cannon
Brett Cannon added the comment: SystemError fixed (stemming from a misunderstanding of what PyDict_GetItemWithError() did). -- assignee: -> brett.cannon resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 68f9ad6a3b13 by Brett Cannon in branch 'default': Issue #14592: A relative import will raise a KeyError if __package__ http://hg.python.org/cpython/rev/68f9ad6a3b13 -- nosy: +python-dev ___ Python tracke

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-17 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14600] Change ImportError reference handling, naming

2012-04-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7a32b9380ffd by Brian Curtin in branch 'default': Fix #14600. Correct reference handling and naming of ImportError convenience function http://hg.python.org/cpython/rev/7a32b9380ffd -- nosy: +python-dev ___

[issue14608] Python 2.7.3 x86 msi - msvcr90.dll version mismatch

2012-04-17 Thread Florent Xicluna
Changes by Florent Xicluna : -- components: +Windows nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue14428] Implementation of the PEP 418

2012-04-17 Thread STINNER Victor
Changes by STINNER Victor : -- hgrepos: +118 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14608] Python 2.7.3 x86 msi - msvcr90.dll version mismatch

2012-04-17 Thread Eduard
New submission from Eduard : After installing Python 2.7.3, inside the Python folder I have version 9.0.30729.1 of msvcr90.dll, but it seems that the embeded redistributable package contains the 9.0.21022.8 version of msvcm90.dll, msvcp90.dll, and msvcr90.dll Is this the intended behavior? -

[issue14607] method with special keyword-only argument gives error

2012-04-17 Thread Florent Xicluna
New submission from Florent Xicluna : This is probably a bug. >>> class A: ... def f(self, __a=42): ... pass ... >>> A().f() >>> class A: ... def f(self, *, __a=42): ... pass ... >>> A().f() Traceback (most recent call last): File "", line 1, in TypeError: f() needs keyword-onl

[issue14548] garbage collection just after multiprocessing's fork causes exceptions

2012-04-17 Thread Charles-François Natali
Charles-François Natali added the comment: > Alternative patch which records pid when Finalize object is created. Looks good to me. Note that it could eventually be rewritten to use an atfork() module, when we finally merge your patch for this other issue :-) -- stage: -> commit revi

[issue9762] PEP 3149 related build failures

2012-04-17 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Apr 17, 2012, at 01:56 PM, Senthil Kumaran wrote: >I stumbled upon this bug when trying to compile Python2.6 from source on >Ubuntu 11.10. If this bug report or the related one issue11715 is a problem >due to Ubuntu changes, I think, it is good inform in th

[issue9762] Multiarch related build failures on Ubuntu >= 11.04

2012-04-17 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- title: PEP 3149 related build failures -> Multiarch related build failures on Ubuntu >= 11.04 ___ Python tracker ___ _

[issue14606] Memory leak subprocess

2012-04-17 Thread Roland
New submission from Roland : subprocess leaks memory on win 7 64bit (Python 2.7.3 32bit). The following code snippet will fill up memory slowly but completely after running it multiple times. When python exits the memory is not freed. >> import subprocess import shlex for i in range(0

[issue14606] Memory leak subprocess

2012-04-17 Thread Roland
Changes by Roland : -- nosy: rfs priority: normal severity: normal status: open title: Memory leak subprocess type: resource usage versions: Python 2.7 ___ Python tracker ___ ___

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

2012-04-17 Thread Martin v . Löwis
Martin v. Löwis added the comment: What's the status of your contrib form? -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2012-04-17 Thread Charles-François Natali
Charles-François Natali added the comment: Committed, thanks. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 2.6 ___ Python tracker

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2012-04-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8a4c9a168d09 by Charles-François Natali in branch '2.7': Issue #5113: Fix a test_posix failure on HP-UX, where non-root users can http://hg.python.org/cpython/rev/8a4c9a168d09 New changeset 428bece48029 by Charles-François Natali in branch '3.2': I

[issue9141] Allow objects to decide if they can be collected by GC

2012-04-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > On Tue, Apr 17, 2012 at 4:08 AM, Antoine Pitrou > wrote: > > has_finalizer() in gcmodule.c doesn't check for weakref callbacks, so a > > weakref callback can still be invoked from tp_dealloc. > > Unless I'm mistaken, weakrefs will be handled and removed by

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

2012-04-17 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue9141] Allow objects to decide if they can be collected by GC

2012-04-17 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: On Tue, Apr 17, 2012 at 4:08 AM, Antoine Pitrou wrote: > has_finalizer() in gcmodule.c doesn't check for weakref callbacks, so a > weakref callback can still be invoked from tp_dealloc. Unless I'm mistaken, weakrefs will be handled and removed by handle_weak

[issue14087] multiprocessing.Condition.wait_for missing

2012-04-17 Thread Charles-François Natali
Charles-François Natali added the comment: Committed. Thanks for the patch, and sorry for the delay! -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker __

[issue4600] __class__ assignment: new-style? heap? == confusing

2012-04-17 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14428] Implementation of the PEP 418

2012-04-17 Thread Charles-François Natali
Charles-François Natali added the comment: Victor, can you let us know when you think the patch is ready for review? -- ___ Python tracker ___ __

[issue14087] multiprocessing.Condition.wait_for missing

2012-04-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5606ee052783 by Charles-François Natali in branch 'default': Issue #14087: multiprocessing: add Condition.wait_for(). Patch by sbt. http://hg.python.org/cpython/rev/5606ee052783 -- nosy: +python-dev ___

[issue1615] descriptor protocol bug

2012-04-17 Thread Micah Friesen
Micah Friesen added the comment: I ran into this recently, as well, and have lost probably a day's worth of time debugging it. I submit that this is not a feature - I can't imagine a real-world scenario where you actually want to write debuggable code where a descriptor defers to __getattr__

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

2012-04-17 Thread Brett Cannon
Brett Cannon added the comment: I doubt I will beat you to it, Eric, but I did want to say that your overall design was what I had in my head when I was thinking about how to re-implement the function, so keep at it! -- ___ Python tracker

[issue14551] imp.load_source docs removed from python3 docs...is this correct?

2012-04-17 Thread Brett Cannon
Brett Cannon added the comment: On Tue, Apr 17, 2012 at 06:51, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > > Well, I want backwards-compatibility *now*, not forever. > > I don't think changing a function signature in an incompatible way is > generally acceptable. I don't t

[issue14605] Make import machinery explicit

2012-04-17 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-17 Thread Brett Cannon
Brett Cannon added the comment: Detecting if you are in a package is as simple as ``'.' in __name__ or hasattr(mod, '__path__')`` or alternatively for the last guard, ``__name__ == __package__``. As for the failure, I will have a look. -- ___ Pyth

[issue14605] Make import machinery explicit

2012-04-17 Thread Brett Cannon
New submission from Brett Cannon : There should no longer be any implicit part of import when there doesn't have to be. To make import fully explicit, some things need to happen (in context to importlib): * Expose FileLoader * Expose SourceFileLoader * Expose PathFinder * Expose the extension

[issue14604] spurious stat() calls in importlib

2012-04-17 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue13684] httplib tunnel infinite loop

2012-04-17 Thread luzakiru
luzakiru added the comment: Although perhaps not optimal, the patch is consistent with the rest of the code and fixes the reasonably severe issue. Could this patch be applied in lieu of a better one that can come later? -- ___ Python tracker

[issue9762] PEP 3149 related build failures

2012-04-17 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hi Barry, I stumbled upon this bug when trying to compile Python2.6 from source on Ubuntu 11.10. If this bug report or the related one issue11715 is a problem due to Ubuntu changes, I think, it is good inform in the download or news page. People try previo

[issue11750] Mutualize win32 functions

2012-04-17 Thread sbt
sbt added the comment: > Overlapped's naming is still lagging behind :-) Argh. And a string in winapi_module too. Yet another patch. -- Added file: http://bugs.python.org/file25252/winapi_module.patch ___ Python tracker

[issue14586] TypeError: truncate() takes no keyword arguments

2012-04-17 Thread R. David Murray
R. David Murray added the comment: macro, function...something automated, anyway :) -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue14586] TypeError: truncate() takes no keyword arguments

2012-04-17 Thread R. David Murray
R. David Murray added the comment: Ah, I'm glad someone else chimed in. I was going to say that I was pretty sure we had a macro for doing this, but I don't do much C level coding so I didn't have a reference handy. -- ___ Python tracker

[issue14604] spurious stat() calls in importlib

2012-04-17 Thread Antoine Pitrou
New submission from Antoine Pitrou : It seems importlib does multiple stat() calls on py files: stat("/home/antoine/cpython/opt/Lib", {st_mode=S_IFDIR|0775, st_size=12288, ...}) = 0 stat("/home/antoine/cpython/opt/Lib/_sysconfigdata.py", {st_mode=S_IFREG|0664, st_size=16032, ...}) = 0 stat("/h

[issue14428] Implementation of the PEP 418

2012-04-17 Thread STINNER Victor
STINNER Victor added the comment: FreeBSD doesn't provide CLOCK_PROCESS_CPUTIME_ID, but CLOCK_PROF. CLOCK_PROF can be used instead of getrusage(), its precision can be read using clock_getres(). Something like "> #if defined(CLOCK_PROF) && defined(__FreeBSD__)" can be used. (By the way, "#if

[issue12081] Remove distributed copy of libffi

2012-04-17 Thread Matthias Klose
Matthias Klose added the comment: The last time I merged libffi, we were not able to build the MacOS X and Windows libffi from the upstream sources, but used the internal copy of the copy. Now that libffi 3.0.11 is released, we could - update to this new version, see if the MacOS X and Windo

[issue14339] Optimizing bin, oct and hex

2012-04-17 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue9141] Allow objects to decide if they can be collected by GC

2012-04-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Look again. gcmodule specifically takes any objects reachable from > ob_clear and sees if any of them have side effects when Py_DECREF'd. has_finalizer() in gcmodule.c doesn't check for weakref callbacks, so a weakref callback can still be invoked from tp_de

[issue9141] Allow objects to decide if they can be collected by GC

2012-04-17 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: >I don't believe it. I don't see what's magical about being called by the >gc. Again, a Py_DECREF in tp_dealloc can invoke arbitrary Python code. Look again. gcmodule specifically takes any objects reachable from ob_clear and sees if any of them have

[issue14551] imp.load_source docs removed from python3 docs...is this correct?

2012-04-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Well, I want backwards-compatibility *now*, not forever. I don't think changing a function signature in an incompatible way is generally acceptable. You might make one of the arguments optional, though (but keeping the current semantics when the argument *is*

[issue9141] Allow objects to decide if they can be collected by GC

2012-04-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I _think_ the only python related things you can do from tp_clear() is > Py_DECREF(), this is what I mean by trivial. Well, Py_DECREF is not trivial at all, since it can invoke arbitrary Python code (through e.g. weakref callbacks, or by releasing the GIL). T

[issue11750] Mutualize win32 functions

2012-04-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > sbt added the comment: > > s/_win32/_winapi/g Overlapped's naming is still lagging behind :-) Other than that, a comment: +def Close(self): +if not self.closed: +self.closed = True +_winapi.CloseHandle(s

[issue9141] Allow objects to decide if they can be collected by GC

2012-04-17 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I _think_ the only python related things you can do from tp_clear() is Py_DECREF(), this is what I mean by trivial. This is the reason, for example, that special care was done with generators. An IO object could of course do non-python operations such

[issue9141] Allow objects to decide if they can be collected by GC

2012-04-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Surely, if these objects define non-trivial 'close' members, they must > not be called during garbage collection. Define "non-trivial". There are various tests for it in test_io. Not ending up in gc.garbage is *by design*. Making file objects uncollectable

[issue14593] PyErr_SetFromImportErrorWithNameAndPath lacks error checking

2012-04-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> duplicate status: open -> closed superseder: -> Change ImportError reference handling, naming ___ Python tracker ___ _

[issue14600] Change ImportError reference handling, naming

2012-04-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: You probably want to check args and kwargs for NULL-ness too. Otherwise, looks good. -- ___ Python tracker ___ ___

[issue14586] TypeError: truncate() takes no keyword arguments

2012-04-17 Thread Guy Taylor
Guy Taylor added the comment: @Brandl truncate() was the issue I ran into, no other reason. I have started on the rest of the IO module tho. I know the patch is not working but I ran into problems with getting cpython to change functions from positional to keyword. @all cpython

[issue14576] IDLE cannot connect to subprocess - New solution

2012-04-17 Thread clikkeb
clikkeb added the comment: It is one of the possible solutions. In combination with the "writable flag" solution, you might create a class variable in IdleConf (e.g. "user_cfg") that contains the user's home directory; such variable will be initialized to an empty string by IdleConf.__init__. O

[issue14087] multiprocessing.Condition.wait_for missing

2012-04-17 Thread Charles-François Natali
Charles-François Natali added the comment: > Charles-François, will you take this one? :) Yes :-) -- ___ Python tracker ___ ___ Pyth