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

2010-07-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 <http://bugs.python.org/issu

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

2010-07-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 m

[issue8035] urllib.request.urlretrieve hangs

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

[issue8343] improve re parse error messages for named groups

2010-07-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 <http://bugs.python.or

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

2010-07-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 <http://bugs.python.org/issu

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

2010-07-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 soc

[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2010-07-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The patch looks correct, it's now a matter of unit tests. for example, I'd test the case where the length is around 1000.. -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.py

[issue6751] Default return value in ConfigParser

2010-07-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The idea is fine (dict.get also has a 'default' parameter) but this patch is very incomplete: - the enhancement should be applied to the three Parsers - it needs unit tests. -- nosy: +ama

[issue5758] fileinput.hook_compressed returning bytes from gz file

2010-07-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: gzip.open() only implements the "rb" mode, and returns bytes. fileinput could certainly wrap it with a io.TextIOWrapper. Then the encoding issue arises. fileinput.FileInput should grow an "encoding" parameter instead of alway

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The patch actually does 2 things: - it prevents the usage of '=' in putenv, which is is good because the putenv() system call handles this badly. - it will raise an error when unsetting a nonexistent variable. This is a change in behavio

[issue9320] os.environ is global for threads

2010-07-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: >> I'm not sure where you'd put this. The defining characteristic of threads is >> that _all_ objects are shared among them. > Where is this defining characteristic of threads is described? in http://docs.python.org/libr

[issue8258] Multiple Python Interpreter Memory Leak

2010-07-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: It's actually the same issue as issue1635741 -- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> Interpreter seems to leak references after finalization ___

[issue1635741] Interpreter seems to leak references after finalization

2010-07-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Yes, some objects are not cleaned in finalization. This is not a problem in usual cases though, when the interpreter is started only once. -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue5804] Add an 'offset' argument to zlib.decompress

2010-07-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The function returns different kind of data depending on the value of the last parameter. I don't like it at all. Why is decompressobj not enough? -- nosy: +amaury.forgeotdarc ___ Python trac

[issue9314] inconsistent result when concatenating list with iterators

2010-07-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: for any *iterable*! -- ___ Python tracker <http://bugs.python.org/issue9314> ___ ___ Python-bugs-list mailing list

[issue9314] inconsistent result when concatenating list with iterators

2010-07-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This actually works for any iterator: >>> l = [] >>> l += 'abc' >>> l ['a', 'b', 'c'] -- nosy: +amaury.forgeotdarc _

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

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

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

2010-07-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 <http://bugs.python.or

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

2010-07-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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

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

2010-07-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 -&

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

2010-07-17 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 tracke

[issue1428655] Use PyOS_snprintf for static buffers

2010-07-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 can handle un

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

2010-07-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Then please tell us how to reproduce the "SyntaxError" case -- ___ Python tracker <http://bugs.py

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

2010-07-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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:

[issue7645] test_distutils fails on Windows XP

2010-07-15 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: It's just a data file missing from the .msi installer. -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.

[issue9241] SAXParseError on unicode (Japanese) file

2010-07-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 vers

[issue1076790] test test_codecs failed

2010-07-11 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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"

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

2010-07-11 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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),

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

2010-07-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: But what are the benefits of this change? -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/i

[issue1720250] PyGILState_Ensure does not acquires GIL

2010-07-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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:

[issue1147646] Windows deadlock with PyEval_ReleaseLock

2010-07-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 <http:

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

2010-07-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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(HAVE_USABLE

[issue5556] interactive interpreter, source encoding

2010-07-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 <http://bugs.py

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

2010-07-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 t

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

2010-07-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 <http://bu

[issue1147646] Windows deadlock with PyEval_ReleaseLock

2010-07-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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, PyEval_SaveThread() shou

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

2010-07-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Yes, py3k r82745 still shows the problem -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/i

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

2010-07-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 sy

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

2010-07-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 another

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

2010-07-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Patch attached. -- keywords: +patch Added file: http://bugs.python.org/file17919/kill-wctype.patch ___ Python tracker <http://bugs.python.org/i

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

2010-07-09 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc : 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... peopl

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

2010-07-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 <http://bugs.python.o

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

2010-07-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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_WC

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

2010-07-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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_uc

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

2010-07-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: A new patch, generated on top of r82662 -- Added file: http://bugs.python.org/file17909/unicodectype_ucs4_4.patch ___ Python tracker <http://bugs.python.org/i

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

2010-07-08 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc : 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 po

[issue9197] subprocess module causing crash

2010-07-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: We definitely need unit tests about embedded python interpreter, I think there are none. -- ___ Python tracker <http://bugs.python.org/i

[issue9197] subprocess module causing crash

2010-07-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 as the att

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

2010-07-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 interac

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

2010-07-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Yes, repr() should not depend on the user's terminal. -- ___ Python tracker <http://bugs.python.org/issue9198> ___ __

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

2010-07-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 sugge

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

2010-07-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 <http://bugs.pyth

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

2010-07-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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. -- ___

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

2010-07-08 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc : 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 "p

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

2010-07-07 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 w

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

2010-07-07 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : -- assignee: -> amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/issue5127> ___ ___ Python-bugs-lis

[issue9170] zipfile cannot read AES encrypted files

2010-07-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 o

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

2010-07-03 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 on Windo

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

2010-07-03 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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:\temp\█

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

2010-07-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 that t

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

2010-07-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: And what about this? >>> x.update(self=5) -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.pyt

[issue4925] Improve error message of subprocess when cannot open

2010-06-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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

[issue9107] PyModule_Create not working properly

2010-06-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 willing to hel

[issue9098] MSYS build fails with `S_IXGRP' undeclared

2010-06-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 <h

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

2010-06-26 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 ag

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

2010-06-26 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > File "F:\1home\С\u201e\a.py", line 1, in > 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 con

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

2010-06-26 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Why is this issue still open? -- ___ Python tracker <http://bugs.python.org/issue4804> ___ ___ Python-bugs-list m

[issue9064] pdb enhancement up/down traversals

2010-06-24 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 -= nu

[issue9064] pdb enhancement up/down traversals

2010-06-24 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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" extensio

[issue9059] Backwards compatibility

2010-06-23 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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: -&

[issue9055] test_issue_8959_b fails when run from a service

2010-06-22 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 EnumResource

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

2010-06-22 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 anythi

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

2010-06-18 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 trac

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

2010-06-18 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 >

[issue6543] traceback presented in wrong encoding

2010-06-15 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: In issue3343, we chose to mark this function as private. -- ___ Python tracker <http://bugs.python.org/issue6543> ___ ___

[issue3173] external strftime for Python?

2010-06-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: PyPy also calls the platform's strftime(). -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.

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

2010-06-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 <http://bugs.python.org/i

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

2010-06-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 d7;Arc
Amaury Forgeot d'Arc 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 sugg

[issue8793] IDLE crashes on opening invalid file

2010-05-31 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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:\pro

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

2010-05-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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:

[issue4810] timeit needs "official" '--' flag

2010-05-26 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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

[issue6715] xz compressor support

2010-05-25 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 code u

[issue8765] Tests unwillingly writing unicocde to raw streams

2010-05-25 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 a

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

2010-05-25 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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__ woul

[issue8760] Python 2.6.5 fails to build on AIX 5.3

2010-05-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Closing as Invalid. PYTHONHOME should not be set when building Python. -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python

[issue8760] Python 2.6.5 fails to build on AIX 5.3

2010-05-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Do you have set the PYTHONHOME environment variable? this does not work from a build directory. -- ___ Python tracker <http://bugs.python.org/i

[issue8760] Python 2.6.5 fails to build on AIX 5.3

2010-05-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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.pat

[issue4388] test_cmd_line fails on MacOS X

2010-05-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 tes

[issue8760] Python 2.6.5 fails to build on AIX 5.3

2010-05-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 <http

[issue8776] Bytes version of sys.argv

2010-05-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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). The wchar_t

[issue8734] msvcrt get_osfhandle crash on bad FD

2010-05-17 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The second patch looks good to me. -- resolution: -> accepted stage: patch review -> commit review ___ Python tracker <http://bugs.python

[issue8734] msvcrt get_osfhandle crash on bad FD

2010-05-17 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I agree with the fix. However the patch should test for "sys.platform == 'win32'" before importing msvcrt. And there is an extra space on another line. -- nosy: +amaury.forgeotdar

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

2010-05-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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.forgeo

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

2010-05-14 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: since the prompt is written to stderr, why is sys.stdout.encoding used instead of sys.stderr.encoding? -- ___ Python tracker <http://bugs.python.org/i

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

2010-05-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: what is this "raise_on_bad" additional argument? -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.py

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

2010-05-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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: +ama

Re: crash in Py_EnterRecursiveCall

2010-05-06 Thread Amaury Forgeot d7;Arc
up, 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] message in unittest tracebacks

2010-05-04 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 <http

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

2010-04-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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

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