[issue8293] HTTPSConnection.close() does not immediately close the connection.

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: issue8524 fixed a similar issue (the timeout of the initial socket was not passed to the ssl socket). Can someone test again with a recent py3k build? -- nosy: +amaury.forgeotdarc resolution: - out of date superseder: - SSL

[issue1441530] socket read() can cause MemoryError in Windows

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I fail to see *why* the patch fixes the issue. You still have to allocate the big string when joining the parts. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http

[issue8343] improve re parse error messages for named groups

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A small but useful addition, patch looks OK to me -- nosy: +amaury.forgeotdarc resolution: - accepted versions: +Python 3.2 -Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org

[issue8035] urllib.request.urlretrieve hangs

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This URL does not seem to return a 302 code. Is there another example? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8035

[issue4510] ValueError for list.remove() not very helpful

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The patch is good, except for two things: when PyObject_Repr() fails, the word 'item' is put instead. This is a good idea, but PyErr_Clear() should be called as soon as possible, before calling another API function. Also, the error

[issue1441530] socket read() can cause MemoryError in Windows

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Which module did you change, and which precise version of python are you using? I wonder if this was fixed with issue2632. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue9320] os.environ is global for threads

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Quoting the wikipedia page: multiple threads within a process share state as well as memory and other resources If you never worked with threads, then you really need a tutorial about threads, or even a general explanation about

[issue8035] urllib.request.urlretrieve hangs

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I would have hoped a Windows way... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8035

[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Technically, since the C module is now named _datetime, it needs to be renamed in Modules/Setup.dist, and most importantly in PC/config.c (because on Windows datetime is built in the main interpreter

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-07-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: multiple inheritance should not be a problem: there can be only one dominant base, which is 'int' in this case. someone with a debugger should step into this call to PyType_Ready() and see why it does not set the flag correctly

[issue6686] xml.sax.xmlreader.XMLReader.getProperty (xml.sax.handler.property_xml_string) returns bytes

2010-07-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A unit test (or even a sample script) showing the desired feature is needed. -- nosy: +amaury.forgeotdarc stage: - unit test needed ___ Python tracker rep...@bugs.python.org http

[issue8192] SQLite3 PRAGMA table_info doesn't respect database on Win32

2010-07-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: python2.7 includes a newer version of sqlite. Does the problem still reproduces there? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8192

[issue9314] inconsistent result when concatenating list with iterators

2010-07-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This actually works for any iterator: l = [] l += 'abc' l ['a', 'b', 'c'] -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9314

[issue9314] inconsistent result when concatenating list with iterators

2010-07-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: for any *iterable*! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9314

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-07-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Py_TPFLAGS_INT_SUBCLASS is an implementation detail, and extension modules should not have to be aware of it. Does Numpy correctly call PyType_Ready()? -- nosy: +amaury.forgeotdarc status: pending - open

[issue9257] cElementTree iterparse requires events as bytes; ElementTree uses strings

2010-07-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It seems that this has been fixed in the py3k branch (r78942). Now both bytes and unicode are accepted. Can someone check? -- nosy: +amaury.forgeotdarc stage: - needs patch ___ Python

[issue7645] test_distutils fails on Windows XP

2010-07-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It's just a data file missing from the .msi installer. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7645

[issue9271] Python throws `IOError: [Errno 27] File too large' on long file names

2010-07-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The file name is only 106 characters long, it's not too long. [Errno 27] File too large probably refers to a big file larger than 2Gb. Does your OS support large files? -- nosy: +amaury.forgeotdarc

[issue8988] import + coding = failure (3.1.2/win32)

2010-07-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Then please tell us how to reproduce the SyntaxError case -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8988

[issue1428655] Use PyOS_snprintf for static buffers

2010-07-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Most usages of sprintf here cannot cause buffer overruns: the output is bounded in size (%d, %8.8x, %.200s), and the buffer is large enough. Moreover, some of them were already replaced by functions of the _FromFormat() family, which

[issue9241] SAXParseError on unicode (Japanese) file

2010-07-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Your file contains the byte \x1a == EOF. You should not open it in text mode, but in binary mode, otherwise it's truncated. import xml.sax xml.sax.parse(open(ff1a.xml, 'rb'), xml.sax.ContentHandler()) works on all versions I tried

[issue8988] import + coding = failure (3.1.2/win32)

2010-07-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Just fine! It's either another bug in python or 3.1.1 specifics. What do you mean? what is 'it'? The error I in the session above shows the bug we described first (strange letters in the path makes the program unusable), and shows

[issue1076790] test test_codecs failed

2010-07-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The OP compiled python with --with-wctype-functions, and the libc wctype functions work differently depending on the locale. I suggest closing this issue as won't fix, and favor the removal of the --with-wctype-functions option

[issue1147646] Windows deadlock with PyEval_ReleaseLock

2010-07-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This is actually the same issue as issue1720250 -- resolution: - duplicate status: open - closed superseder: - PyGILState_Ensure does not acquires GIL ___ Python tracker rep

[issue1720250] PyGILState_Ensure does not acquires GIL

2010-07-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This is still the case: the documentation should mention that PyEval_ReleaseLock() is not the correct function to release the GIL, both the interpreter lock *and* the current thread state have to be released. -- assignee: - d

[issue2528] Change os.access to check ACLs under Windows

2010-07-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: But what are the benefits of this change? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2528

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: str.isprintable() co are not changed by this patch, because they enumerate Py_UNICODE units and do not join surrogates. See issue9200 -- ___ Python tracker rep...@bugs.python.org http

[issue9210] remove --with-wctype-functions configure option

2010-07-09 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: Quoting Marc-Andre Lemburg: The support for the wctype functions should have been remove long ago, since they cause subtle incompatibilities between Python builds. I should have probably never added it in the first place... people

[issue9210] remove --with-wctype-functions configure option

2010-07-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Patch attached. -- keywords: +patch Added file: http://bugs.python.org/file17919/kill-wctype.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9210

[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-07-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Also, GetFinalPathNameByHandle() is called 5 times with VOLUME_NAME_DOS, and once with VOLUME_NAME_NT. This one looks suspect to me. [I noticed this because these symbols are not defined with the SDK shipped with VS8.0. I'll propose

[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-07-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Hm, the patch could be more pythonic. Something like: symlink_exception = (AttributeError,) try: symlink_exception += (NotImplementedError, WindowsError) except NameError: pass try: ... except symlink_exception

[issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status)

2010-07-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Yes, py3k r82745 still shows the problem -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5321

[issue1147646] Windows deadlock with PyEval_ReleaseLock

2010-07-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This issue looks invalid to me: PyEval_ReleaseLock manipulates the interpreter lock, but not the thread state. Both have to be released/reset before another thread can install its own thread state and run. In other words

[issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status)

2010-07-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The issue is that when close() calls flush(), errors are silently discarded. I'm sure a similar issue was already filed, but could not find it. -- nosy: +pitrou ___ Python tracker rep

[issue9200] str.isprintable() is always False for large code points

2010-07-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A proof of concept patch, which shows the macros used to walk a unicode string and uses them in unicode_repr() (should not change behaviour) and in unicode_isprintable() (should fix the issue). Other functions should be changed

[issue5556] interactive interpreter, source encoding

2010-07-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I fail to see the issue. runsource() takes a (unicode) string because a Python script is a text; you cannot pass a bytes object, it must be decoded before. -- ___ Python tracker rep

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: In this 6th patch, the wctype part was changed as suggested. there is one more condition, Py_UNICODE_WIDE: -#if defined(HAVE_USABLE_WCHAR_T) defined(WANT_WCTYPE_FUNCTIONS) +#if defined(WANT_WCTYPE_FUNCTIONS) defined

[issue9198] Should repr() print unicode characters outside the BMP?

2010-07-08 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: On wide unicode builds, '\U0001'.isprintable() returns True, and repr() returns the character unmodified. Is it a good behavior, given that very few fonts have can display this character? Marc-Andre Lemburg wrote: The printable

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I suggest to go ahead and apply this patch, at least it correctly selects printable characters, whatever this means. I filed issue9198 to decide whether chr(0x1) should be printable

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: consider replacing the tab characters before the comments with spaces It's actually already the case in my working copy. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue9198] Should repr() print unicode characters outside the BMP?

2010-07-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A more accurate approach would be to actually try to encode the string and escape only the chars that can't be encoded This is already the case with sys.stderr, it uses the backslashreplace error handler. Do you suggest the same

[issue9198] Should repr() print unicode characters outside the BMP?

2010-07-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Yes, repr() should not depend on the user's terminal. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9198

[issue9198] Should repr() print unicode characters outside the BMP?

2010-07-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The chapter Rationale in PEP3138 explains why sys.stdout uses strict encoding, when sys.stderr uses backslashreplace. It would be possible to use backslashreplace for stdout as well for interactive sessions, but the PEP also rejected

[issue9197] subprocess module causing crash

2010-07-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I reproduce the problem on Linux (./configure --enable-shared), after I modified the source code a bit to directly use Python.h and to link with libpython3.2.so (no call to dlopen). In gdb the stack trace has exactly the same symbols

[issue9197] subprocess module causing crash

2010-07-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: We definitely need unit tests about embedded python interpreter, I think there are none. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9197

[issue9200] str.isprintable() is always False for large code points

2010-07-08 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: On narrow unicode builds: unicodedata.category(chr(0x1)) == 'Lo' # correct Py_UNICODE_ISPRINTABLE(0x1)== 1 # correct str.isprintable(chr(0x1)) == False # inconsistent On narrow unicode builds, large code

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A new patch, generated on top of r82662 -- Added file: http://bugs.python.org/file17909/unicodectype_ucs4_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5127

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A new patch that doesn't remove an important check, avoids a crash when the C macro is called with a huge number. thanks Ezio. -- Added file: http://bugs.python.org/file17911/unicodectype_ucs4_5.patch

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Could you explain what this bit is about ? -#if defined(HAVE_USABLE_WCHAR_T) defined(WANT_WCTYPE_FUNCTIONS) +#if defined(Py_UNICODE_WIDE) defined(WANT_WCTYPE_FUNCTIONS) On Windows at least, HAVE_USABLE_WCHAR_T is True, this means

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-07 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- assignee: - amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5127

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Now I wonder whether it's reasonable to consider this character U+1 (LINEAR B SYLLABLE B008 A) as printable with repr(). Yes, its category is Lo, but is there a font which can display

[issue9170] zipfile cannot read AES encrypted files

2010-07-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: zipfile only supports the Traditional PKWARE Encryption method. Support for other encryption methods would be useful. -- nosy: +amaury.forgeotdarc stage: - needs patch title: zipfile.extractall raises runtime error on correct

[issue8988] import + coding = failure (3.1.2/win32)

2010-07-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Here is what I did, on a machine running Windows XP, with python 3.1.1: - I used 7-zip to extract the attached zip file, in the c:\temp directory. - Then I opened a command prompt, here is an exact copy of the session: C:cd \temp\█ C

[issue9148] os.execve puts process to background on windows

2010-07-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: on Windows, exec() does not really replace the current process. It creates a new process (with a new pid), and exits the current one. Hence the calling program only sees that the script has terminated. I don't see any easy solution

[issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping

2010-07-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: And what about this? x.update(self=5) -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9137

[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: assert daysecondswhole == int(daysecondswhole) # can't overflow Since int is long in 3.x, this assert does not check anything Even with 2.5 int(x) cannot overflow, and returns a long when needed! This assert probably checks

[issue4925] Improve error message of subprocess when cannot open

2010-06-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: in PC/_subprocess.c, it should be enough to use PyErr_SetFromWindowsErrWithFilename() instead of PyErr_SetFromWindowsErr() -- keywords: +easy nosy: +amaury.forgeotdarc ___ Python tracker rep

[issue9098] MSYS build fails with `S_IXGRP' undeclared

2010-06-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I don't think MSYS (or mingw32) is supported at all. I'm even surprised that the build went so far. -- assignee: - loewis nosy: +amaury.forgeotdarc, loewis ___ Python tracker rep

[issue9107] PyModule_Create not working properly

2010-06-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The issue tracker is not here to get help. Please ask your question on the comp.lang.python newgroup, or the python-list mailing list. There, I think you will have to show part of your code; there will certainly be several people

[issue4804] Python on Windows disables all C runtime library assertions

2010-06-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Why is this issue still open? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4804

[issue8988] import + coding = failure (3.1.2/win32)

2010-06-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: File F:\1home\С\u201e\a.py, line 1, in module And what the hell is this u201e? That should have been a letter! It's probably this symbol: http://www.eki.ee/letter/chardata.cgi?ucode=201e but it has no representation in the console

[issue8988] import + coding = failure (3.1.2/win32)

2010-06-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: But the case has begun from cyrillic letters in the NTFS path, which I do not use, but the users of my soft do. So putting the program into such directory makes the former unuseable; until the sources are in utf anyway. I agree

[issue9064] pdb enhancement up/down traversals

2010-06-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This is a good idea, but tab characters are disallowed in core python code; please replace them with spaces. Then, please provide an unified diff patch (with diff -u), and name it with the .patch extension, this will make it easier

[issue9064] pdb enhancement up/down traversals

2010-06-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Two remarks: - when int(arg) fails, an error message should be printed, like with the function do_commmands(). - the for loop seems unnecessary, something like self.curindex -= nup should be enough

[issue9059] Backwards compatibility

2010-06-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: as stated in http://www.python.org/download/releases/3.1.2/ python 3 is designed to be backwards incompatible. I suggest you to follow the link Conversion tool for Python 2.x code. -- nosy: +amaury.forgeotdarc resolution

[issue8988] import + coding = failure (3.1.2/win32)

2010-06-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: now tell me how the hell can file system encoding be related to file content encoding?! Why do you say so? I can reproduce your issue, but changing the first line of a.py: # coding: cp1252 to: # coding: utf-8 did not change anything

[issue9055] test_issue_8959_b fails when run from a service

2010-06-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: To test windows callbacks, I suggest to use EnumResourceTypes() instead, which is more likely to work in any condition: def test(): from ctypes.wintypes import BOOL, HMODULE, LONG, LPARAM import ctypes EnumResourceTypes

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: One, we should not blindly pull in the PyPy code without some core PyPy developer being in on this You can count me among the PyPy developers. I concur. Much of PyPy code is written for a restricted subset of Python instead

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: If both implementations can exist in the same interpreter, how will they cooperate? For example, Time instances created with datetime.py won't pass PyTime_Check(). -- ___ Python tracker rep

[issue6543] traceback presented in wrong encoding

2010-06-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: In issue3343, we chose to mark this function as private. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6543

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Even from pypy perspective, a pure python implementation is not ideal because it makes it difficult to implement the C API. -- nosy: +amaury.forgeotdarc ___ Python tracker rep

[issue3173] external strftime for Python?

2010-06-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: PyPy also calls the platform's strftime(). -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3173

[issue6470] Tkinter import fails when running Python.exe from a network share

2010-06-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: to reproduce: on Vista, start \\%COMPUTERNAME%\c$\python26\python.exe -c import Tkinter; print Tkinter In this case, the path returned by GetFinalPathNameByHandle starts with \\?\UNC

[issue8869] execfile does not work with UNC paths

2010-06-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Reproduced on WinXP. execfile() does not work because it calls the system function stat(); this function does accept UNC paths (like \\machine\share\file), but not paths which contain a wildcard character ('?' or '*') I suggest

[issue8793] IDLE crashes on opening invalid file

2010-05-31 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: When running IDLE in a console, I get the error: Exception in Tkinter callback Traceback (most recent call last): File c:\prod\python\lib\lib-tk\Tkinter.py, line 1410, in __call__ return self.func(*args) File c:\prod\python\lib

[issue2920] Patch to print symbolic value or errno in EnvironmentError.__str__()

2010-05-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I don't like the import errno while printing an exception... It would be much more robust to store errorcode_dict in a static variable when python starts, and reuse it directly. -- nosy: +amaury.forgeotdarc

[issue4810] timeit needs official '--' flag

2010-05-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This -- trick is implemented by the getopt module. OTOH on my system, 'grep' also recognizes this, and I could not find any documentation about it, neither with grep --help nor man grep. -- nosy: +amaury.forgeotdarc

[issue8787] warnings inside PyRun_SimpleString() display argv[1]

2010-05-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Yes, the warnings module tries to display the file name. Inside PyRun_SimpleString(), globals()['__name__'] == '__main__', and the warnings module supposes that argv[1] is the name of the script. I wonder whether __file__ would

[issue8765] Tests unwillingly writing unicocde to raw streams

2010-05-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The 3.1 version does it correctly since issue7785, but this was not backported to 2.x. Python 3.x uses the y* format code to accept bytes and not unicode; this code does not exist in 2.x, and was replaced with s*, which accepts unicode

[issue6715] xz compressor support

2010-05-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I will happily review any implementation, and I can help with inclusion into python trunk. ...the LGPL liblzma... Can you check which licences cover the different parts of the module? I think that you will have to contribute your

[issue8760] Python 2.6.5 fails to build on AIX 5.3

2010-05-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Do you have set the PYTHONHOME environment variable? this does not work from a build directory. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8760

[issue8760] Python 2.6.5 fails to build on AIX 5.3

2010-05-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Closing as Invalid. PYTHONHOME should not be set when building Python. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue8776] Bytes version of sys.argv

2010-05-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: sys.argv is decoded with the file system encoding IIRC this is not exact. Py_Main signature is Py_Main(int argc, wchar_t **argv) then PyUnicode_FromWideChar is used, and there is no conversion (except from UCS4 to UCS2

[issue8760] Python 2.6.5 fails to build on AIX 5.3

2010-05-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: There is a message:: 'import site' failed; use -v for traceback what do you get when you run ./python -v? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http

[issue4388] test_cmd_line fails on MacOS X

2010-05-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: What if os.system(), os.execvp() and friends used wcstombs (or locale.preferredencoding) to convert arguments from unicode to bytes? this would at least guarantee round-trip when spawning another python interpreter. An interesting

[issue8760] Python 2.6.5 fails to build on AIX 5.3

2010-05-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: no, the input is not the same, there is ImportError: No module named site. I have tree more questions: - Do you have a file named: /sw_install/python-2.6.5/Lib/site.py - what it the output when you type import sys; print sys.path

[issue8734] msvcrt get_osfhandle crash on bad FD

2010-05-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The second patch looks good to me. -- resolution: - accepted stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8734

[issue8737] ssl.RAND_add() should only accept bytes (not str)

2010-05-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This function is here to add entropy to the random numbers generator. the kind of data is not important, and no matter which encoding is used, this will not change the quality of the entropy. -- nosy: +amaury.forgeotdarc

[issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None

2010-05-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: since the prompt is written to stderr, why is sys.stdout.encoding used instead of sys.stderr.encoding? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8256

[issue8256] TypeError: bad argument type for built-in operation

2010-05-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The patch is wrong: _PyUnicode_AsString(Py_None) should not return utf8! I suggest that since PyOS_Readline() write the prompt to stderr, the conversion uses the encoding of stderr. -- nosy: +amaury.forgeotdarc

[issue8666] Allow ConfigParser.get*() to take a default value

2010-05-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: what is this raise_on_bad additional argument? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8666

Re: crash in Py_EnterRecursiveCall

2010-05-06 Thread Amaury Forgeot d'Arc
newsgroup, or the o python-l...@python.org mailing list. [maybe a hint for your issue: ensure that the current thread owns the GIL before calling a function of the Python C API] -- Amaury Forgeot d'Arc ___ Python-bugs-list mailing list Unsubscribe: http

[issue8313] unprintable AssertionError object message in unittest tracebacks

2010-05-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Very recently, issue8533 changed regrtest.py to use 'backslashreplace' when printing errors. This issue seems very similar -- nosy: +amaury.forgeotdarc, haypo ___ Python tracker rep

[issue8393] subprocess: support undecodable current working directory on POSIX OS

2010-04-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It does not work on Windows: subprocess.Popen(c:/windows/notepad.exe, cwd=b'c:/temp') Traceback (most recent call last): File stdin, line 1, in module File D:\afa\python\py3k-1\lib\subprocess.py, line 681, in __init__

[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It does not work on Windows: ctypes.CDLL(b'kernel32') Traceback (most recent call last): File stdin, line 1, in module File D:\afa\python\py3k-1\lib\ctypes\__init__.py, line 350, in __init__ self._handle = _dlopen(self._name

[issue8393] subprocess: support undecodable current working directory on POSIX OS

2010-04-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: PEP 277 explicitly states that unicode strings should be passed to wide-character functions, whereas byte strings use standard functions. This is done in posixmodule.c, for example. The current locale is a moving thing

[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: yes, except that TCHAR* depends on compilation settings (it resolves to wchar_t when UNICODE is #defined); simply use char*. -- ___ Python tracker rep...@bugs.python.org http

[issue8393] subprocess: support undecodable current working directory on POSIX OS

2010-04-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: mbcs is not a fixed encoding and may change between Windows sessions, see the Rationale in PEP277 http://www.python.org/dev/peps/pep-0277/ The mixed case is interesting. We could use CreateProcessW when at least one string is Unicode

[issue8384] Distutils C extension build with MinGW on Windows fails

2010-04-14 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8384 ___ ___ Python-bugs-list

[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: PyUnicode_FSConverter returns bytes and bytearray objects unchanged; otherwise it always return bytes. Your patch should handle the case when name2 is a bytearray. -- nosy: +amaury.forgeotdarc

<    6   7   8   9   10   11   12   13   14   15   >