[issue10880] do_mkvalue and 'boolean'

2011-01-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: What makes you think it should be a boolean? in http://docs.python.org/py3k/c-api/arg.html#Py_BuildValue "b" means "byte" and is processed as a tiny integer. Now, that's true that Py_BuildValue could have a format for

[issue10880] do_mkvalue and 'boolean'

2011-01-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This is the right place to ask... but it will be faster if someone provides a patch. -- keywords: +easy stage: -> needs patch ___ Python tracker <http://bugs.python.org

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Even if python.exe starts normally, py.test for example uses os.dup2() to redirect the file descriptors 1 and 2 to temporary files. sys.stdout.fileno() is still 1, the STD_OUTPUT_HANDLE did not change, but normal print() now goes to a file; bu

[issue10892] segfault with "del X.__abstractmethods__"

2011-01-12 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc : A short crasher:: class X(object): pass del X.__abstractmethods__ All versions since 2.6 are affected. The fix is probably simple: the setter function type_set_abstractmethods() in typeobject.c should check for a NULL

[issue10905] zipfile: fix arcname with leading '///' or '..'

2011-01-14 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: What happens when the archive contains both 'foo' and '../foo'? They seem to be extracted at the same place. -- nosy: +amaury.forgeotdarc ___ Python tracker <http:

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

2011-01-14 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: r78942 is quite large unfortunately. But just patching _elementree.c::xmlparser_setevents() should be possible. This would at least fix the "invalid event tuple" error. -- ___ Python

[issue10914] Python sub-interpreter test

2011-01-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: +1 for this kind of tests. But I would not have their source in the "official" Modules directory. I expect that there will be several tests of this kind, each one with different modules to import, functions to run, global settings to ch

[issue10914] Python sub-interpreter test

2011-01-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: In distutils.command.config, config().try_run(body) is probably what we need. Now, I don't know how to use it... -- ___ Python tracker <http://bugs.python.o

[issue10930] dict.setdefault: Bug: default argument is ALWAYS evaluated, i.e. no short-circuit eval

2011-01-18 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: setdefault() is a method, its arguments are evaluated then the function is called. This is not a bug, and this behavior cannot change. If you are trying to "cache" the computation of a function, you should try "memoizing"

[issue10931] print() from pipe enclosed between {b'} and {'}-pair on python3

2011-01-18 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: It's a feature. Subprocess output is binary data, not text; and since python3, the string type is now what python2 called unicode! Please read http://docs.python.org/py3k/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit for an expl

[issue10923] Python 2.7 hangs on Unicode+threading

2011-01-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > "import child_directory" Then it's certainly an effect of the "import lock": http://docs.python.org/library/threading.html#importing-in-threaded-code In your case, the first call to encode('utf8') indirectly

[issue10923] Deadlock because of the import lock when loading the utf8 codec

2011-01-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > can't we raise a RuntimeError on a deadlock? Deadlock detection is difficult, and probably impossible if the involved locks don't use the same underlying mechanism. (A lock can be a pthread object, a file opened with os.O_EXCL, an

[issue10958] stat.S_ISLNK() does not wok!

2011-01-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: os.stat() follows symbolic links. You probably want to use os.lstat() instead: http://docs.python.org/library/os.html#os.lstat -- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -

[issue10955] Possible regression with stdlib in zipfile

2011-01-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: About the patch: """Break out of this dependency by assuming that the path to the encodings module is ASCII-only.""" The 'path' here is the entry inside the zip file (and does not include the location of the

[issue10955] Possible regression with stdlib in zipfile

2011-01-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: No, your change is in the read_directory() function, which reads the whole archive the first time it's used. -- ___ Python tracker <http://bugs.python.o

[issue10955] Possible regression with stdlib in zipfile

2011-01-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: What about tools that builds one .zip file for all modules, like py2exe? A cp437 decoder is not so ugly to implement in C. It's just a charmap. -- ___ Python tracker <http://bugs.python.o

[issue10968] Timer class inheritance issue

2011-01-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I can't reproduce the error. Do you have a script that shows the issue? What is the complete traceback? -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.o

[issue10968] Timer class inheritance issue

2011-01-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Ah, got it. It's about threading.Timer, which looks like a class, but is actually a function. -- ___ Python tracker <http://bugs.python.o

[issue10968] Timer class inheritance issue

2011-01-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: It seems to be by design: from the documentation: http://docs.python.org/py3k/library/threading.html "Timer is a subclass of Thread", and a Thread subclass should "only override the __init__() and run() methods". What

[issue10955] Possible regression with stdlib in zipfile

2011-01-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > We are only talking about bootstrap-time importing of encodings modules. Again, the whole zip central directory is loaded on first import. If the zip file contains non-ascii filenames, nothing can be

[issue10972] zipfile: add "unicode" option to the force the filename encoding to UTF-8

2011-01-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This looks similar to issue10614 -- ___ Python tracker <http://bugs.python.org/issue10972> ___ ___ Python-bugs-list m

[issue11007] stack tracebacks should give the relevant class name

2011-01-26 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: trace.py has a hack for this: it uses gc.get_referrers() to crawl back from the code object to the encloding class. I would not trust this gc.get_referrers() though; it is probably slow, and there are even some crashers related to this function; I

[issue8036] Interpreter crashes on invalid arg to spawnl on Windows

2011-01-26 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: No, the issue can be fixed by better checking the arguments. -- ___ Python tracker <http://bugs.python.org/i

[issue11034] Build problem on Windows with MSVC++ Express 2008

2011-01-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > Could this be some bizzarre bug in the quote parser of cmd.exe? Yes, this is even documented with "cmd /?": """ [...]If you specify /c or /k, cmd processes the remainder of string and quotation marks are prese

[issue11035] Segmentation fault

2011-01-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I don't reproduce the issue. Could you run python under gdb and give us the C backtrace? -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.o

[issue11039] Use of 'L' specifier is inconsistent when printing long integers

2011-01-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Python objects can have two textual representations: see the difference between str() and repr(): http://docs.python.org/tutorial/inputoutput.html And indeed, Python3 chose to drop the 'L' suffix. -- nosy: +ama

[issue9197] Crash when importing an extension after Py_Initialize, Py_Finalize and Py_Initialize

2011-01-31 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Here are the files I used to reproduce the crash. See "build.sh" for the build command, there may be better ways... -- Added file: http://bugs.python.org/file20631/simpletest.zip ___ Python

[issue11094] Runtime error

2011-02-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: For this kind of question you'd better ask on the comp.lang.python newsgroup. The bug tracker is not designed to get help. A remark though: to really debug the RuntimeError a C debugger is needed (and a debug build of Python). You'd bet

[issue11108] Intermittent AttributeError when using time.strptime in threads

2011-02-03 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: It's a duplicate of issue7980. One workaround is to call strptime() once in the main thread. -- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> time.strpt

[issue11114] file.tell extremely slow

2011-02-04 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I found that adding "infile._CHUNK_SIZE = 20" makes the test much faster - 'only' 5 times slower than 2.7. -- nosy: +amaury.forgeotdarc, pitrou ___ Python tracker <http:

[issue11123] problem with packaged dependency extracter script, pdeps

2011-02-04 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This script is indeed unusable. Here is a proper patch file, tested by running it on a few files. -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file20681/pdeps.

[issue11145] '%o' % user-defined instance

2011-02-07 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: And this code will crash a debug build: >>> class X(long): ... def __oct__(self): ... return 'foo'.upper() ... >>> '%o' % X() Assertion failed: buf[sign] == '0', file ..\

[issue11175] allow argparse FileType to accept encoding and errors arguments

2011-02-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The encoding and errors arguments are probably useful, but why would you use the codecs module? -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/is

[issue11228] raw unicode strings interpret \u and \U (but not \n, \xHH, ...)

2011-02-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This has changed in python 3, and is even documented: http://docs.python.org/dev/py3k/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit (6th bullet) Python 2.x could not be changed, for compatibility reasons. --

[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows

2011-02-17 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Using multiprocessing on Windows can be different; please read http://docs.python.org/library/multiprocessing.html#windows especially the part named "Safe importing of main module". On Windows, fork() does not exist, so a new inte

[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows

2011-02-17 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > It seems as if the multiprocessing module is starting new Windows > processes by duplicating the command line of the original process. It does not. The spawned processes use the command:: python.exe -c 'from multiprocessing.forking i

[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows

2011-02-18 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Nose works correctly for me with multiprocessing. In a directory, I have: == run_nose.py = from nose import main if __name__ == '__main__': main() == test_me.py == from

[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows

2011-02-18 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Ah, is 'nosetests' a .exe file? A frozen executable? In this case, can you try the solution proposed at http://docs.python.org/library/multiprocessing.html#multiprocessing.freeze_support -- ___

[issue2841] Windows: "Runtime Error!" crash from pythonw.exe (3.0a5)

2008-05-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The 0x4015 code and the message you get are typical of a call to abort(). Ideed, I can reproduce the problem on windows 2000: - start IDLE - menu "File / New Window" - close both windows When running with py

[issue2833] __exit__ silences the active exception

2008-05-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Note that the problem is not related to "with", but with nested exception handlers: try: raise Exception("foo") except: try: pass except: pass raise # in Py2.5 throws 'foo'

[issue2890] O_ASYNC and FASYNC should be defined for *nix systems

2008-05-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Platform-specific values are not a problem. On win32 os.O_NOINHERIT == 128, and on linux os.O_EXCL has the same value. Python just exposes the available #defines at the module level. (btw, the posix module is also available

[issue2955] Python 2.5 Documentation error in Tutorial section 8.3

2008-05-24 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: What makes you think that the code does not match the description? -- nosy: +amaury.forgeotdarc __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1948] Cant open python gui using VISTA

2008-05-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Please open a Command Prompt, and run the script: c:\Python25\Lib\idlelib\idle.py Do you see any error message there? -- nosy: +amaury.forgeotdarc resolution: works for me -> status:

[issue2975] VS8 include dirs grow without bound

2008-05-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I don't understand where the problem comes from: query_vcvarsall() is called only once, when the distutils.msvc9compiler module is imported. Or is the module somehow reloaded or removed from sys.modules?

[issue2997] PyNumberMethods has left-over fields in Py3

2008-06-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Let me quote a comment from GvR about the similar issue1185: """ Can you redo the patch while keeping the slot *position* (though not the name or type)? The wasted space is minimal (4-8 bytes per type or cl

[issue1342] Crash on Windows if Python runs from a directory with umlauts

2008-06-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Here is a quick fix, that decodes filenames using Py_FileSystemDefaultEncoding, to let the release pass. I am still working on a version that keep PyObjects* as long as possible, but it will be a major change.

[issue3076] test_xmlrpc_net fails on Darwin

2008-06-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: It's not a python issue: the web site at http://www.xmlrpc.com is completely broken! The ExpatError occurs because the returned HTML page is not strict XML. -- nosy: +amaury.forgeotdarc resolut

[issue3076] test_xmlrpc_net fails on Darwin

2008-06-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: But (try a Google search) xmlrpc.com is the main site for xml-rpc resources! What kind of site should we use for testing? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue2065] trunk version does not compile with vs8 and vc6

2008-06-11 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: First, thank you for keeping these patches up to date. - The patch for 2.5 is OK for me. We could just add the a paragraph that appears in your patch for trunk (PC/VC6/readme.txt): +_msi +_msi.c. You need to inst

[issue3080] Full unicode import system

2008-06-11 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: This is the most difficult part of issue1342: """ On Windows, don't use the FileSystemEncoding on Windows for sys.path items. Instead, it should use the wide API to perform all system calls. Py3k sho

[issue1342] Crash on Windows if Python runs from a directory with umlauts

2008-06-11 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Fixed as r64126, using Py_FileSystemDefaultEncoding. I close this issue, and open issue3080 to rewrite all functions in import.c with full unicode in mind. -- status: ope

[issue2065] trunk version does not compile with vs8 and vc6

2008-06-12 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- assignee: -> amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]> <http://bu

[issue2065] trunk version does not compile with vs8 and vc6

2008-06-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I just committed r64214, that can compile with vc6. When compiled with a separate SDK, socket.ioctl is available. With the stock vc6, the function is disabled ___ Python tracker <[E

[issue3099] On windows, "import nul" always succeed

2008-06-12 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: on Windows, the stat() function always returns True for some special device names (nul, con, com1, lpt1...), even when followed by an extension. Thus "import con" manages to find that "con.py" exists, a

[issue2065] trunk version does not compile with vs8 and vc6

2008-06-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Committed r64215 on py3k branch. Now both trunk and py3k compile with VC6, VS8 and VS9. I cannot run VS7.1; I will do 2.5 shortly. I also filed issue3099 about the funny "import nul". _

[issue3100] weakref subclass segfault

2008-06-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: All the versions I tried (2.4, 2.5, 2.6, 3.0) crash with the given script -- components: +Interpreter Core -Extension Modules nosy: +amaury.forgeotdarc versions: +Python 2.5 ___

[issue3098] sys.sizeof test fails with wide unicode

2008-06-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I'm sure there wasn't any a few months ago. -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]> <ht

[issue3100] weakref subclass segfault

2008-06-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: It seems enough to simply skip deleted weakrefs in PyObject_ClearWeakRefs. Here is a tentative patch. Added file: http://bugs.python.org/file10615/weakref_cycle.patch ___ Python trac

[issue3100] weakref subclass segfault

2008-06-13 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10615/weakref_cycle.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3100] weakref subclass segfault

2008-06-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: A new version of the patch, which tests the case of multiple weakrefs on the same object, that get deleted together: tp_dealloc of one weakref calls tp_dealloc of the second weakref, which calls tp_dealloc of the refere

[issue1407] [performance] Too many closed() checkings

2008-06-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I reproduce almost the same output. "function.closed" often come in pair, because TextIOWrapper.closed is a property which delegates to self.buffer.closed I think that the first check in TextIOWrapper.wri

[issue2065] trunk version does not compile with vs8 and vc6

2008-06-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: > Probably need to add _multiprocessing module, but not done yet. Yes, and I also forgot to "svn add" the new .vcproj in VS8.0 :-( ___ Python tracker <[EMAIL PROTECTE

[issue3099] On windows, "import nul" always succeed

2008-06-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Sorry, I was not clear. With python 2.5.2, "import nul" correctly raises ImportError, even if the error message is slightly misleading. With a recent release25-maint (and all other branches), "import nul&quo

[issue3099] On windows, "import nul" always succeed

2008-06-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I was wrong. It seems that an installed python works correctly, but a python running from its build directory has the problem. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3099] On windows, "import nul" always succeed

2008-06-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: OK, I think I got is now. The difference is between debug and release builds. Explanation: - in release build, "import nul" calls stat("nul.pyd") which succeeds. It then tries LoadLibrary("nul.pyd&q

[issue3100] weakref subclass segfault

2008-06-13 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10616/weakref_cycle.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3100] weakref subclass segfault

2008-06-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: > you're asserting cbcalled, but you're not using the generic callback, > so it's meaningless. The new patch corrects this Added file: http://bugs.python.o

[issue3115] os.listdir randomly fails on occasions when it shouldn't

2008-06-15 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: You forgot the patch :-) -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3124] test_multiprocessing segfaults on Windows

2008-06-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Can you check whether the patch for issue3100 corrects the problem? (see PyObject_ClearWeakRefs in the call stack) -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PRO

[issue3100] weakref subclass segfault

2008-06-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Committed r64309, with the suggested whitespace change. Will backport. Concerning the INCREF patch: would a simple "assert(refcnt>0)" be enough? ___ Python tracker &

[issue3124] test_multiprocessing segfaults on Windows

2008-06-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: This is a duplicate of #3100, which has been corrected by r64309. -- resolution: -> duplicate status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http:/

[issue3127] Segfault provoked by generators and exceptions

2008-06-17 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: This is right, but there won't be any more 2.4 release. Either apply the patch to your local copy of the sources, or simply upgrade to 2.5. -- nosy: +amaury.forgeotdarc resolution: -> out of date sta

[issue3128] Regex causes python to hang up? / loop infinite?

2008-06-17 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: To optimize your query, you could remove '^.*' and '.*$', and replace match() with search(). Now it returns instantly... -- nosy: +amaury.forgeotdarc ___ P

[issue3128] Regex causes python to hang up? / loop infinite?

2008-06-17 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Are you sure your regexp will return what you want? The best match for the first part of the alternative is ("14", "D:\projects\retest\ver_700\modules\sapekl\__init__.py, line 21" ) The best match for t

[issue3128] Regex causes python to hang up? / loop infinite?

2008-06-17 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Yes, this can happen. See http://www.regular-expressions.info/catastrophic.html I am sure your regexp belongs to the same category. -- resolution: -> invalid status:

[issue3133] CGIHTTPRequestHandler does not work on windows

2008-06-18 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: On windows, test_httpservers fails with the error: File "C:\python\py3k\Lib\http\server.py", line 1104, in run_cgi exec(open(scriptfile).read(), {"__name__": "__main__"}) File &

[issue3133] CGIHTTPRequestHandler does not work on windows

2008-06-18 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The attached patch uses subprocess when fork is not available. test_httpservers now passes on windows -- keywords: +patch Added file: http://bugs.python.org/file10651/https

[issue3125] test_multiprocessing causes test_ctypes to fail

2008-06-18 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: But why this is win32 specific? Is it because windows cannot fork(), so data has to be copied through the pickle mechanism? In this case let's remove the "if win32" statement, and always execute

[issue3125] test_multiprocessing causes test_ctypes to fail

2008-06-18 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: roudkerk wrote: > Yes, on Windows pickling is needed to pass data to a child process. In > other contexts these objects are NOT picklable because you would have to > worry about garbage collection of the original ob

[issue3133] CGIHTTPRequestHandler does not work on windows

2008-06-18 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Committed change r64389. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http:/

[issue1489] test_socket_ssl hanhs on Windows (deadlock)

2008-06-18 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Kind of fixed: test_socket_ssl was removed in both trunk and py3k branches. "tests are now in test_ssl.py" -- nosy: +amaury.forgeotdarc resolution: -> fixe

[issue3138] Hang when calling get() on an empty queue in the queue module

2008-06-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: 2.5 has the same behavior: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more informatio

[issue3121] test_urllibnet fails

2008-06-19 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- resolution: -> out of date status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http:/

[issue3139] print is not thread safe

2008-06-19 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: I found this problem when adding "print" statements to multi-threaded code. When applying the attached diff to a py3k installation, the output on screen always contains some garbage. The following code is an ex

[issue3139] print is not thread safe

2008-06-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The problem is not only about concurrent prints. It is about invalid pointer passed to a C function. Here is an example that reliably crashes the interpreter on my windows machine: import bz2, threading bz2c = bz2.BZ2Com

[issue3125] test_multiprocessing causes test_ctypes to fail

2008-06-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Why not use a custom Pickler in this case? It would to be enough to copy the self.dispatch dictionary, and add the special types there. ___ Python tracker <[EMAIL PROTECTED]> <ht

[issue3144] popen / popen[234] inconsistent fd behavior

2008-06-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: This is so true that these functions are now documented as deprecated: http://docs.python.org/dev/library/os.html#os.popen2 Please use the subprocess.Popen class instead, which gives a much better interface t

[issue3145] help> modules os raises UnicodeDecodeError

2008-06-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I added some print statements, and it appears that the function is trying to read get the source of "test.badsyntax_pep3120" ! -- nosy: +amaury.forgeotdarc ___ P

[issue3145] help> modules os raises UnicodeDecodeError

2008-06-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Corrected with r64411. Thanks for the report! -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http:/

[issue3147] tests for sys.getsizeof fail on win64

2008-06-19 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: the buildbot "AMD64 W2k8 trunk" systematically fails with the messages: == FAIL: test_specialtypes (tes

[issue3125] test_multiprocessing causes test_ctypes to fail

2008-06-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Here is a patch that implements a custom pickler for multiprocessing.forking. copy_reg has been completely replaced by calls to ForkingPickler.register(): the global registry is not modified. Added file: http://bugs

[issue3008] Let bin() show floats

2008-06-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I don't like this modification of a PyString object: + n = PyString_GET_SIZE(conv); + conv_str = PyString_AS_STRING(conv); + /* Remove the trailing 'L' if present */ + if

[issue3151] elementtree serialization bug for weird namespace urls

2008-06-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: A one-letter fix :-) (the localname cannot contain special characters) -- assignee: -> effbot keywords: +patch nosy: +amaury.forgeotdarc, effbot Added file: http://bugs.python.org/file106

[issue3158] Doctest fails to find doctests in extension modules

2008-06-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: For me, a 'function' is written in Python, a 'builtin' is written in C. The fact that it is defined in an extension module is irrelevant, and depends on the implementation: zlib is an extension modul

[issue2378] UnboundLocalError when trying to raise exceptions inside execfile

2008-06-23 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The problem seems to have been introduced by r53954. -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue2378] UnboundLocalError when trying to raise exceptions inside execfile

2008-06-23 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The problem is in PyFrame_LocalsToFast. (As I understand it: "Locals" refers to the locals() dictionary of the frame; "Fast" refers to an optimization where local variables are stored in an array. Eac

[issue3176] result error for 2/5 and 4/5

2008-06-23 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: This is normal, and due to the floating point representation of numbers. Please see http://www.python.org/doc/faq/general/#why-are-floating-point-calculations-so-inaccurate -- nosy: +amaury.forgeotdarc resolution:

[issue3178] __radd__(self, other) isn't called if self and other are of the same class

2008-06-23 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: As Andrii said, this behaviour is by design. -- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed ___ Python tracker <[EMAIL PROTECTED]>

[issue3187] os.walk - strange bug

2008-06-24 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Could you tell us what this 1665th line should be? Maybe the 1665th directory has something special (a filename with spaces or non-ascii chars...) Can you try with an older version of python? -- nosy: +amaury.

[issue3139] bytearrays are not thread safe

2008-06-24 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- title: print is not thread safe -> bytearrays are not thread safe ___ Python tracker <[EMAIL PROTECTED]> <http://bu

<    2   3   4   5   6   7   8   9   10   11   >