[issue4225] unicode_literals doesn't work in exec

2008-10-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The attached patch works, but can be simplified by using a stack variable: Index: pythonrun.c === --- pythonrun.c (revision 66902) +++ pythonrun.c (working copy) @@ -1284,7

[issue1982] Feature: extend strftime to accept milliseconds

2008-10-29 Thread Wang Chun
Wang Chun <[EMAIL PROTECTED]> added the comment: Ruby recently added support of millisecond and nanosecond to strftime. This is their changeset: http://redmine.ruby-lang.org/repositories/revision/ruby-19?rev=18731 To use the extended strftime, one can do: >> Time.now.strftime('%Y-%m-%dT%H:%M:

[issue4227] unicode_literals and print_function do not work together.

2008-10-29 Thread Wang Chun
New submission from Wang Chun <[EMAIL PROTECTED]>: If "from __future__ import unicode_literals, print_function", unicode_literals works, but not print_function; If "from __future__ import print_function, unicode_literals", print_function works, but not unicode_literals. -- components:

[issue4227] unicode_literals and print_function do not work together.

2008-10-29 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: The bug has been fixed a couple of days ago. The fix will be in the next release of Python 2.6. Thanks. -- nosy: +christian.heimes resolution: -> out of date status: open -> closed ___ Python tr

[issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler)

2008-10-29 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: FWIW, ctypes builds on trunk and all its tests pass with Sun Studio 12. I suspect this issue can be closed but will leave that for Thomas to decide. -- nosy: +skip.montanaro ___ Python tracker <[E

[issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler)

2008-10-29 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: Though I should note that ctypes 1.0.2 won't build with Sun Studio 12 on Python 2.4 without some patches for the __i386 macro in ffitarget.h. I added this check near the top of ffitarget.h: #ifdef __i386 /* Sun Studio 12 */ #defi

[issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler)

2008-10-29 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: *argh* segfault running tests w/ Sun Studio 12 compiled version of ctypes 1.0.2: % python ctypes/test/runtests.py -v sh: objdump: not found find_library('c') -> sh: objdump: not found None find_library('m') -> sh: objdump: no

[issue4228] struct.pack('L', -1)

2008-10-29 Thread Armin Rigo
New submission from Armin Rigo <[EMAIL PROTECTED]>: struct.pack('L', -1) raises a DeprecationWarning since Python 2.5, as it should. However, it also returns a different (and nonsensical) result than Python <= 2.4 used to: it returns '\x00\x00\x00\x00' instead of '\xff\xff\xff\xff'. This might

[issue4228] struct.pack('L', -1)

2008-10-29 Thread Armin Rigo
Armin Rigo <[EMAIL PROTECTED]> added the comment: Ah, I should also mention that a fix of zipfile for 2.5 to no longer use the deprecated feature (and thus no longer cause DeprecationWarnings) also sounds like a good idea, in addition to the fix to the struct module.

[issue4229] Can't Start Python

2008-10-29 Thread Clifford Burtown
New submission from Clifford Burtown <[EMAIL PROTECTED]>: I just got Python, in order to do some game modding that required it. However, I can't open Python files in my computer, neither can I edit them with IDLE. I'm using Vista. Is this common? -- messages: 75321 nosy: CliffB severity:

[issue4230] "__getattr__" can't be a descriptor

2008-10-29 Thread Armin Rigo
New submission from Armin Rigo <[EMAIL PROTECTED]>: The attached example works in the __add__ and __getattribute__ cases on CPython, but fails in the __getattr__ case. All three cases work as the semantics say they should on Jython, IronPython and PyPy. It's admittedly an obscure use case. Th

[issue1109963] bdist_wininst ignores build_lib from build command

2008-10-29 Thread Anthony Tuininga
Anthony Tuininga <[EMAIL PROTECTED]> added the comment: This problem also occurs in the bdist_msi command. -- versions: +Python 2.5, Python 2.6 ___ Python tracker <[EMAIL PROTECTED]> __

[issue902061] pydoc insists upon producing file: URLs

2008-10-29 Thread René Liebscher
René Liebscher <[EMAIL PROTECTED]> added the comment: I would like to see this change introducing a method of class HTMLDoc. It has already some such methods as: def namelink(self, name, *dicts): def classlink(self, object, modname): def modulelink(self, object): def modpkglink(

[issue4229] Can't Start Python

2008-10-29 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: You need to install "for all users", not "just for me" (the latter is not supported on Vista), or alternatively install 2.5.2. This will be fixed in 2.6.1. -- nosy: +loewis resolution: -> fixed status: open -> closed __

[issue4231] print " should be print("

2008-10-29 Thread David W. Lambert
New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/reference/datamodel.html >>> class Meta(type): ...def __getattribute__(*args): ... print "Metaclass getattribute invoked" xxx ... print "Class getattribute invoked" perhaps there's a way

[issue4232] tempfile.gettempdir() availability not documented

2008-10-29 Thread Ville Skyttä
New submission from Ville Skyttä <[EMAIL PROTECTED]>: The documentation for tempfile.gettempdir() at http://docs.python.org/library/tempfile.html#module-tempfile does not mention in which version the function was added. Based on browsing older docs, looks like "New in version 2.3." should be add

[issue4226] Should 2to3 know that file type is gone?

2008-10-29 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: I'm going to close this because inferring the correct type to replace here is really beyond 2to3's capabilities. (I would recommend you look at the io library for a replacement.) -- nosy: +benjamin.peterson resolution: -> rejected

[issue4232] tempfile.gettempdir() availability not documented

2008-10-29 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Fixed in r67041. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> __

[issue4231] print " should be print("

2008-10-29 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Fixed in r67043. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> __

[issue4226] Should 2to3 know that file type is gone? Python core crashes with associated files.

2008-10-29 Thread David W. Lambert
David W. Lambert <[EMAIL PROTECTED]> added the comment: While trying to find a "file" replacement in the io library I managed to get py3k to crash. Please look at the file associated with the issue. Thanks, Dave. -- title: Should 2to3 know that file type is gone? -> Should 2to3 know th

[issue4225] unicode_literals doesn't work in exec

2008-10-29 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: This patch uses heap variables and tries to catch more places. Added file: http://bugs.python.org/file11906/pass_flags.patch ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4226] Python core crashes with associated files.

2008-10-29 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- components: +Interpreter Core -2to3 (2.x to 3.0 conversion tool) priority: -> critical resolution: rejected -> status: closed -> open title: Should 2to3 know that file type is gone? Python core crashes with associated files. -> Pyt

[issue4225] unicode_literals doesn't work in exec

2008-10-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The newer patch is good. I found another use of PyAST_FromNode() with NULL flags, and which has the same problem: import parser s=parser.suite( "from __future__ import unicode_literals; print type('')") eval(s.compile()) But I d

[issue3816] __newobj__ pickle feature is not documented

2008-10-29 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Could explain me how this feature could be used, other than for providing the efficient and backward-compatible pickling mechanism for new-style classes? -- nosy: +alexandre.vassalotti ___ Py

[issue3816] __newobj__ pickle feature is not documented

2008-10-29 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Alexandre Vassalotti wrote: > Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: > > Could explain me how this feature could be used, other than for > providing the efficient and backward-compatible pickling mechanism for > new-sty

[issue3816] __newobj__ pickle feature is not documented

2008-10-29 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Christian Heimes wrote: > Christian Heimes <[EMAIL PROTECTED]> added the comment: > > Alexandre Vassalotti wrote: >> Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: >> >> Could explain me how this feature could be used, other th

[issue4233] open(0, closefd=False) prints 3 warnings

2008-10-29 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: This happens with a recent py3k build: >>> x = open(0, closefd=False) >>> del x C:\dev\python\py3k\lib\io.py:1461: RuntimeWarning: Trying to close unclosable fd! self.buffer.close() C:\dev\python\py3k\lib\io.py:389: RuntimeWarning:

[issue3723] Py_NewInterpreter does not work

2008-10-29 Thread Graham Dumpleton
Graham Dumpleton <[EMAIL PROTECTED]> added the comment: In conjunction with #4213, the attached subinterpreter.patch appears to fix issue for mod_wsgi. ___ Python tracker <[EMAIL PROTECTED]> _

[issue4200] atexit module not safe in Python 3.0 with multiple interpreters

2008-10-29 Thread Graham Dumpleton
Graham Dumpleton <[EMAIL PROTECTED]> added the comment: In conjunction with #3723 and #4213, the attached atexit_modulestate.patch appears to fix issue for mod_wsgi. ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4234] bin missing from documentation

2008-10-29 Thread Glenn Linderman
New submission from Glenn Linderman <[EMAIL PROTECTED]>: Py3.0 has bin(x) Convert an integer number to a binary string. The result is a valid Python expression. If x is not a Python int object, it has to define an __index__() method that returns an integer. Py2.6 doesn't document builtin bin.

[issue4235] Crash when iImporting a builtin module crashes

2008-10-29 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Some object deallocator (file_dealloc) sometimes call PyErr_WarnEx. This can happen on interpreter shutdown. But this function may try to -- messages: 75341 nosy: amaury.forgeotdarc severity: normal status: open title: Crash w

[issue4235] Crash when iImporting a builtin module crashes

2008-10-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Sorry, bad issue creation -- resolution: -> invalid status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue4234] bin missing from documentation

2008-10-29 Thread Glenn Linderman
Glenn Linderman <[EMAIL PROTECTED]> added the comment: Perhaps there are other 3.0 builtins that were also missed, in the 2.6 docs? ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue4236] Crash when importing builtin module during interpreter shutdown

2008-10-29 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: The following interactive session crashes the interpreter on shutdown: >>> class C: ... def __del__(self): ... import warnings ... >>> C() <__main__.C object at 0x00C29D58> >>> ^Z Fatal Python error: Interpreter not initialized

[issue4226] Python core crashes with associated files.

2008-10-29 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Closing in favor of #4236. -- resolution: -> duplicate status: open -> closed superseder: -> Crash when importing builtin module during interpreter shutdown ___ Python tracker <[EMAIL PROTECTE

[issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning

2008-10-29 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: >>> import io >>> io.FileIO('foo', 'rt') __main__:1: RuntimeWarning: Trying to close unclosable fd! Traceback (most recent call last): File "", line 1, in ValueError: invalid mode: rt The ValueError is expected, but the warning is

[issue4236] Crash when importing builtin module during interpreter shutdown

2008-10-29 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: I can reproduce the same output with CTRL+D on Linux. $ python3.0 Python 3.0rc1+ (py3k:67029M, Oct 26 2008, 23:48:21) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> c

[issue4226] Python core crashes with associated files.

2008-10-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: There are actually three distinct issues here: issue4233, issue4236, issue4237 Nice shot, David ;-) -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]>

[issue4226] Python core crashes with associated files.

2008-10-29 Thread Christian Heimes
Changes by Christian Heimes <[EMAIL PROTECTED]>: -- nosy: +christian.heimes resolution: duplicate -> status: closed -> open ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning

2008-10-29 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Verified. The issue should be easy to fix. I wonder why 'rt' is an invalid mode. Python 2.x supports 'rt'. -- nosy: +christian.heimes priority: -> normal ___ Python tracker <[EMAIL PROTECTED]>

[issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning

2008-10-29 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: I propose to move self->closefd closer to the top of the function: Index: Modules/_fileio.c === --- Modules/_fileio.c (Revision 67040) +++ Modules/_fileio.c (Arbeitskopie)

[issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning

2008-10-29 Thread David W. Lambert
Changes by David W. Lambert <[EMAIL PROTECTED]>: -- nosy: +LambertDW ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mai

[issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning

2008-10-29 Thread David W. Lambert
David W. Lambert <[EMAIL PROTECTED]> added the comment: >>> print(io.read.__doc__) ... The default mode is 'rt' (open for reading text). ... ___ Python tracker <[EMAIL PROTECTED]> _

[issue3816] __newobj__ pickle feature is not documented

2008-10-29 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: > Without the __reduce__ method the information in __dict__ and > the class would be lost. Are you sure about that? Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 >>> class mydict(dict

[issue4238] BSD support for multiprocessing.cpu_count

2008-10-29 Thread Eric Gillespie
New submission from Eric Gillespie <[EMAIL PROTECTED]>: Tested on NetBSD, but should work on any; sysctl goes back to 4.4BSD. -- components: Library (Lib) files: diff messages: 75353 nosy: epg severity: normal status: open title: BSD support for multiprocessing.cpu_count versions: Python

[issue4239] Email example should use SMTP.quit() rather than SMTP.close()

2008-10-29 Thread Matt Johnston
New submission from Matt Johnston <[EMAIL PROTECTED]>: The email module example has "s.close()", while the smtplib docs say to use .quit() The latter is probably correct? -- assignee: georg.brandl components: Documentation messages: 75354 nosy: georg.brandl, matt severity: normal status

[issue4239] Email example should use SMTP.quit() rather than SMTP.close()

2008-10-29 Thread Matt Johnston
Matt Johnston <[EMAIL PROTECTED]> added the comment: Another problem with that example - the .connect() isn't required and causes the SMTP session to fail to send anything and time out. ___ Python tracker <[EMAIL PROTECTED]>