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
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
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
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
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:
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
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
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
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"
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
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
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
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 -
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
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
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
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
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
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
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
Amaury Forgeot d'Arc added the comment:
This looks similar to issue10614
--
___
Python tracker
<http://bugs.python.org/issue10972>
___
___
Python-bugs-list m
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
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
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
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
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
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
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
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
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:
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.
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 ..\
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
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.
--
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
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
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
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
--
___
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
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'
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
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.
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:
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?
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
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.
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
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.
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
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
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
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:
--
assignee: -> amaury.forgeotdarc
___
Python tracker <[EMAIL PROTECTED]>
<http://bu
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
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
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".
_
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
___
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
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
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file10615/weakref_cycle.patch
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.
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
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
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
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
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.
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
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file10616/weakref_cycle.patch
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.
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
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
You forgot the patch :-)
--
nosy: +amaury.forgeotdarc
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.
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
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 &
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:/
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
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
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
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:
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 &
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
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
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
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
Committed change r64389.
--
resolution: -> fixed
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http:/
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
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
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:
--
resolution: -> out of date
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http:/
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
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
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
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
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
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:/
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:
the buildbot "AMD64 W2k8 trunk" systematically fails with the messages:
==
FAIL: test_specialtypes (tes
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
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
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
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
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.
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
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:
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]>
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.
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
601 - 700 of 2691 matches
Mail list logo