Amaury Forgeot d'Arc added the comment:
Indeed, I can't reproduce the issue anymore
--
resolution: -> out of date
status: open -> closed
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
This is a duplicate of issue10762, and only concerns the Windows C runtime
library.
--
nosy: +amaury.forgeotdarc
resolution: -> duplicate
status: open -> closed
superseder: -> strftime(
Amaury Forgeot d'Arc added the comment:
This is by design and documented:
http://docs.python.org/reference/lexical_analysis.html
"""
String quotes can be escaped with a backslash, but the backslash remains in the
string; for example, r"\"" is a val
Amaury Forgeot d'Arc added the comment:
For the record, the changeset was 433458651eb4
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/iss
Amaury Forgeot d'Arc added the comment:
Most builtin modules keep static references to common objects: exceptions,
types, &co. These references are currently never freed, but are reused by all
sub-interpreters.
It the memory usage stays stable, even after many calls to
Py_NewIn
Amaury Forgeot d'Arc added the comment:
Issue5907 would benefit of this change.
Unfortunately, structseq constructors already have keyword arguments; they are
equivalent to "def __new__(cls, sequence, dict=NULL)".
OTOH these keywords arguments are not documented anywhere.
I su
Changes by Amaury Forgeot d'Arc :
--
dependencies: +Enhance Object/structseq.c to match namedtuple and tuple api
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
Isn't this an exact duplicate of issue6514? Or do you suggest something else?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.o
Amaury Forgeot d'Arc added the comment:
In the patch, _length_ is searched in the class and its base class. But what
happens with a third level?
class my_array3(my_array2):
pass
--
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
This file has a SyntaxError!
A comma is certainly missing at the end of line 47
--
nosy: +amaury.forgeotdarc
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://b
Amaury Forgeot d'Arc added the comment:
It's the very first usage of PyModuleDef::m_free.
Martin, do you agree with the path?
--
nosy: +amaury.forgeotdarc, loewis
___
Python tracker
<http://bugs.python.o
Amaury Forgeot d'Arc added the comment:
Two high-level remarks about the patch:
- IMO there is no reason to put _windows.c in the PC directory. After all,
there is no such distinction for posix-specific modules.
- wxPython already has a submodule named _windows.py. I wonder if this
Amaury Forgeot d'Arc added the comment:
See also issue11564 and issue9614.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
The call to self.__class__() can break subclasses of OrderedDict for two
reasons:
- The subclass constructor may have a different signature
- Attributes set by the subclass.__init__ are removed from the pickle::
import collections, pickle
class M
Amaury Forgeot d'Arc added the comment:
The output is: "3 2" on windows. It is "2 2" on the linux 64bit I tried.
This is consistent with what the usual compilers do on these platforms: MSVC on
windows, and gcc on linux.
The specification of the C language specifi
Amaury Forgeot d'Arc added the comment:
I just found that the extension zope.i18nmessageid:
http://pypi.python.org/pypi/zope.i18nmessageid subclasses unicode at the C
level:
http://svn.zope.org/zope.i18nmessageid/trunk/src/zope/i18nmessageid/_zope_i18nmessageid_message.c?rev=120914
Amaury Forgeot d'Arc added the comment:
This post:
http://stackoverflow.com/questions/3018848/cannot-run-python-script-on-windows-with-output-redirected
suggests that there is a difference between "python test.py > out.log" and
"test.py > out.log".
It also su
Amaury Forgeot d'Arc added the comment:
I've seen the same question/answer on other forums, about Perl, Lua and
Javascript
http://stackoverflow.com/questions/3018848/cannot-run-python-script-on-windows-with-output-redirected
but nobody suggested to set this flag by default. I don
Amaury Forgeot d'Arc added the comment:
The warnings above are a bit old: 027f81579b4a changed Pdata into a
PyVarObject, and the "int length" member is now accessed with the Py_SIZE()
macro.
Unfortunately, the only win64 buildbot is offline, and I could not find any
recent log
Amaury Forgeot d'Arc added the comment:
Yes there are still warnings, but in different places; here is an extract of
the previous buildlog.html file:
..\Modules\_pickle.c(156) : warning C4244:'initializing' : conversion from
'Py_ssize_t' to 'int', possible
New submission from Amaury Forgeot d'Arc :
Since 9cd1036455e7, os.stat() on Windows fills the st_ino member;
it could fill st_dev just as easily;
then os.path.samefile() could be shared with the posix implementation.
--
components: Windows
messages: 134595
nosy: amaury.forgeo
Amaury Forgeot d'Arc added the comment:
The issue is actually in numpy. In numpy/f2py/src/fortranobject.c, function
array_from_pyobj(), there is::
sprintf(mess,"failed to initialize intent(inout|inplace|cache) array"
" -- input must
Amaury Forgeot d'Arc added the comment:
Do you have a test scipt for us to reproduce the issues?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
- How is it an issue? is the number of combinations really important to you?
- Isn't there a greater risk of collisions on a case-insensitive filesystem?
--
nosy: +amaury.forgeotdarc
___
Python trac
Changes by Amaury Forgeot d'Arc :
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue12015>
___
___
Python-bugs-list mailing list
Unsubsc
Amaury Forgeot d'Arc added the comment:
This is not a python issue. Please report your problem to the validator project.
--
nosy: +amaury.forgeotdarc
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://b
Amaury Forgeot d'Arc added the comment:
But according to the initial report, 3.2 does not give the expected behavior.
This zip file actually stores the filename encoded with cp932, which is
incorrect according to the specifications of the ZIP format (only cp437 and
utf8 are valid)
Amaury Forgeot d'Arc added the comment:
The mbcs codec depends on the Windows installation. On most Western Windows it
is similar to cp1252, Japanese Windows will use cp932, and so on.
If we were to provide mbcs on non-windows platform, it should be an alias to
ascii.
--
Amaury Forgeot d'Arc added the comment:
bluag: the script you run contains a list of some modules required to start
Python
(I found a copy here:
https://github.com/pinax/pinax/raw/master/scripts/pinax-boot.py )
This script is obviously out of date wrt the new version of Python. Please
r
Amaury Forgeot d'Arc added the comment:
It's simply because all classes form a cycle (Foo -> Foo.__mro__ -> Foo)
A class and class attributes can only be freed with gc.collect().
Did you disable the garbage collector?
--
nosy: +am
Amaury Forgeot d'Arc added the comment:
Hello,
The Python issue tracker is not here to get help.
You will have better answers from friendly people if you ask your question on
the comp.lang.python newsgroup, or the python-list mailing list:
http://www.python.org/community/
Amaury Forgeot d'Arc added the comment:
Maybe you have created a file named "abc.py" somewhere?
What happens when you type:
C:\Python26>python.exe -c "import abc; print abc"
--
nosy: +amaury.forgeotdarc
___
Python trac
Amaury Forgeot d'Arc added the comment:
Which dll was missing in your case? python27.dll, python32.dll or another one?
Virtualenv usually work on Windows. What did it fail to copy?
There is already PEP387 about a "Python launcher" on Windows. Can you please
read the specifica
Amaury Forgeot d'Arc added the comment:
This happens only on Windows, where multiprocessing has to spawn a new
intepreter; the -O parameter is certainly omitted.
Unix platforms fork() the current interpreter with all its state and don't have
this issue.
--
nosy: +amaury.f
Amaury Forgeot d'Arc added the comment:
Virtualenv only works with an installed Python. This is really a virtualenv
limitation, then; your issue looks similar to this one:
https://github.com/pypa/virtualenv/issues/87
--
resolution: -> invalid
status: open -
Amaury Forgeot d'Arc added the comment:
You are right, the use case is broader than virtualenv.
> The only reason for this split is to allow other programs use dynamic linking
For me the main reason is to support extension modules. On Windows, a DLL (or a
.pyd) cannot resolve symbol
Amaury Forgeot d'Arc added the comment:
Python 3 is not affected: pythonw.exe sets sys.stderr to None, and print()
silently discards the output in this case.
--
___
Python tracker
<http://bugs.python.org/iss
Changes by Amaury Forgeot d'Arc :
--
nosy: +jnoller
___
Python tracker
<http://bugs.python.org/issue12098>
___
___
Python-bugs-list mailing list
Unsubsc
Amaury Forgeot d'Arc added the comment:
These "needed" flags are actually nonstandard extensions of the libc fopen()
function on some platforms.
In python3, one can still use fcntl(f.fileno(), FD_SET, FD_CLOEXEC), but a
"flags" parameter would be more con
Amaury Forgeot d'Arc added the comment:
+1 for the patch!
Note that fdopen is now a simple call to open(), so theses lines are equivalent:
python2.7: open(filename, 're')
python3.3: open(os.open(filename, os.O_RDONLY|os.O_CLOEXEC))
--
resolution: -> accepted
Amaury Forgeot d'Arc added the comment:
Yes, vs2008 requires that variables must be declared at the start of a block,
and IIRC there is a AIX compiler that does not allow // comments.
--
nosy: +amaury.forgeotdarc
___
Python tracker
Amaury Forgeot d'Arc added the comment:
How would you implement this? And would you turn a "disk full" error, for
example, into a ZipError as well?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.pyt
Amaury Forgeot d'Arc added the comment:
I think you did the right thing already. The choice of which errors to catch
and which ones to let throw really depends on the usage
(what about permission or lock errors? other limitations due to a USB stick?
why is "disk full" diffe
Amaury Forgeot d'Arc added the comment:
Looks good to me, except for a 'stings' near the end of the patch.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
Thanks for the patch, it looks good, I have 2 remarks though:
- "under the name name" could be replaced by "under the given name".
- "The *search_function*'s refcount is incremented by this function."
This infor
Amaury Forgeot d'Arc added the comment:
pypy does have a GIL!
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/issue10437>
___
___
Amaury Forgeot d'Arc added the comment:
I reproduce the problem, see the call stack below.
The issue is in the io module: the function _bufferedwriter_flush_unlocked()
runs with the file mutex already acquired, but it calls PyErr_CheckSignals()
which may run any code, including flush() o
Amaury Forgeot d'Arc added the comment:
I doubt this fix will be enough to fix compilation with mingw32.
But IMO it goes in the right direction.
With this patch, "#ifdef MS_WINDOWS" has the meaning of "linked with some
version of MSVCRT". Do we agree on this, or is
Amaury Forgeot d'Arc added the comment:
Since the patch does not completely fix the mingw32 build, I suggest to apply
it only on 3.2, and continue to work on mingw32 support there.
Only after we will be able to discuss whether all the changes can be backported
to 2.7, provided that the
Amaury Forgeot d'Arc added the comment:
But a "strict bugfix" should fix something. Is there something that did not
work before, and will work after this patch? IOW, how do you compile
posixmodule.c with MinGW and does it produce a working module?
Now, I *am* interested in
Amaury Forgeot d'Arc added the comment:
The patch uses the ANSI version, and converts the filename from unicode to
bytes; this will fail for names that cannot be encoded with the "mbcs" codec.
All other functions in the posix module first try the Wide version of the win32
A
Amaury Forgeot d'Arc added the comment:
For the record, this was finally fixed with issue2862: gc.collect() now clears
the free-lists during the collection of the highest generation.
--
nosy: +amaury.forgeotdarc
___
Python tracker
Amaury Forgeot d'Arc added the comment:
issue9200 already proposes a similar change to str.is* methods.
--
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
Careful: the ctypes module is much slower with pypy than with cpython.
In any case, a C extension module is preferred because the (platform-dependent)
details of the liblzma library are defined in a .h header file, not as a ctypes
description. F
Amaury Forgeot d'Arc added the comment:
A .pdb is the "program database" that contain debug info, i.e. the mapping
between assembler positions and source lines, the description of data
structures, and other things that are necessary to
Amaury Forgeot d'Arc added the comment:
I don't agree. "issubclass(1, list)" has always raised an exception.
--
nosy: +amaury.forgeotdarc
resolution: -> invalid
status: open -> closed
___
Python tracker
<http
Amaury Forgeot d'Arc added the comment:
issubclass is for relationship between classes. Did you consider isinstance()
instead?
--
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
Looks good, except that win32_error("link", NULL) should be called instead of
posix_error(). errno is not guaranteed to be correctly set by the win32 api,
and GetLastError() ususally gives more
Amaury Forgeot d'Arc added the comment:
I agree with the intent: package maintainers, or people compiling python for
their own need, should have the right to choose the suffix used by extension
modules.
I suggest another option though, one that directly sets the SOABI used in
extension
Amaury Forgeot d'Arc added the comment:
> Note that the soabi name isn't fixed but changes with other configure options.
The default value, yes.
But my proposal of a --soabi option would not respect this. The caller is
responsible for changing the --soabi value when he adds
Amaury Forgeot d'Arc added the comment:
Here is a first patch that adds the "--with-soabi" option.
--with-soabi=yes or --with-soabi sets SOABI to the computed value
(cpython-32m when I tried it). This is the default behavior on Linux.
--with-soabi=no or --without-soabi
Amaury Forgeot d'Arc added the comment:
The value of get_config_var("SO") is the same as before, something like
".cpython-32.so" by default on Linux. (see, I just moved the line SO=.$SOABI$SO
at the bottom of the patch).
In the C file dynload_shlib.c, I chose
Amaury Forgeot d'Arc added the comment:
Let's test Linux at least, then.
--
___
Python tracker
<http://bugs.python.org/issue10262>
___
___
Python-bugs-l
Amaury Forgeot d'Arc added the comment:
Hmm, not sure.
Try with
set PYTHONPATH=.\a;.\b
sys.path will contains the entries:
\a
\b
a multiplication seems necessary.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
So the presence of os.symlink depends on some dynamic privilege?
It seems to me that it's the first time in Python. For example, os.chroot() is
always available on Unix, even when the user is not root. Of course the call
will fail at runtime
Amaury Forgeot d'Arc added the comment:
The ZIP format specification mentions only cp437 and utf8:
http://www.pkware.com/documents/casestudies/APPNOTE.TXT see Apeendix D.
Do zip files created on Japanese Windows contain some information about the
encoding they use?
Or do some programs
Amaury Forgeot d'Arc added the comment:
> As a consequence, extensions built for the official
> binaries would crash in the MingW build, and vice versa
IMO this is a use case for the new "soabi" tag...
--
nosy: +amaury.forgeotdarc
_
Amaury Forgeot d'Arc added the comment:
> Sure - it actually builds a python.exe which is fully working for me.
> If you need a proof, please let me know, I have no problem uploading
> it somewhere...
This is useless, of course. The build must be reproducible.
Here is wha
Amaury Forgeot d'Arc added the comment:
> > IMO this is a use case for the new "soabi" tag...
> Unfortunately not: these tags are not supported on Windows.
So it's a argument for adding (optional?) soabi tags on Windows!
--
Amaury Forgeot d'Arc added the comment:
Thanks for the explanations! These instructions should be turned into a patch.
Some questions already:
- Why is the generated pyconfig.h not good enough? Could we modify the
./configure script instead?
- the "empty.c" should remain empty
Amaury Forgeot d'Arc added the comment:
I happen to have the same change in my workspace. Please apply this patch, it
fixes the test suite when compiled with VS8.0.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
On Windows, newlines in text files are always translated. Please read
http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-files
--
nosy: +amaury.forgeotdarc
resolution: -> invalid
status: open -
Amaury Forgeot d'Arc added the comment:
Maybe a global registry... implemented with a WeakKeyDictionary?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/issu
Amaury Forgeot d'Arc added the comment:
The soabi tag could be useful on Windows as well, for example if some package
maintainer chooses another version of the compiler, or a custom version of
MSVCRT.
And FWIW, PyPy currently uses "--soabi=pypy-1.4" on all platforms: "im
Amaury Forgeot d'Arc added the comment:
Normally the filename is part of the error message, as you can see below.
It's possible that some operations omit it, though. Which function were you
calling?
>>> open('foo')
Traceback (most recent call last):
File &quo
Amaury Forgeot d'Arc added the comment:
> What is 64-bit safe should be 32-bit safe, not only 31-bit safe
Not here. Python uses "signed size_t" for various lengths and sizes.
On win32 this only gives you 31 bits...
--
nosy: +
Amaury Forgeot d'Arc added the comment:
Err... in r87339 there is a typo in all occurrences of 'Py_ReprEntr':
Py_ReprEnter of course!
--
nosy: +amaury.forgeotdarc
status: closed -> open
___
Python tracker
<http://bugs
Amaury Forgeot d'Arc added the comment:
Why was sys.setsegfaultenabled() omitted?
It may be useful to disable the handler from a script
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
With a release build of python, I have a similar behavior on both 2.5 and 2.7;
the messages are different though:
2.5: WindowsError: [Error -2147483645] One or more arguments are invalid.
2.7: WindowsError: exception: breakpoint encountered
And
Amaury Forgeot d'Arc added the comment:
PyPy has exactly the same issue. PyPy's workaround is to have a custom version
of sysconfig.py, but this is really a hack.
If these config_vars are really determined at compile time, IMO they should be
built in the interpreter (in a _syscon
Amaury Forgeot d'Arc added the comment:
At this point a feature change seems unlikely, but it's not too late to emit a
DeprecationWarning.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.o
Amaury Forgeot d'Arc added the comment:
The patch looks good, I only have stylistic remarks:
- We normally don't use windows-specific types in CPython code. Please use int
instead of BOOL. And C variables are usually lowercase, even module globals. I
suggest something like &
Amaury Forgeot d'Arc added the comment:
But there are probably working usages with unicode strings out there. For
example, I've seen code like struct.pack('<6sHHBBB', 'GIF87a', ...)
Do you suggest to make this 3.1 code stop working in 3.2?
In any case,
Amaury Forgeot d'Arc added the comment:
Since the Release Manager agrees with the change, I withdraw my objection.
I have three remarks to the patch:
- Some examples in the documentation should be fixed:
http://docs.python.org/dev/py3k/library/struct.html#examples
>>
Amaury Forgeot d'Arc added the comment:
Indeed
--
resolution: -> duplicate
status: open -> closed
superseder: -> Avoid parsing pyconfig.h and Makefile by autogenerating
extension module
___
Python tracker
<http://bugs.pyth
Amaury Forgeot d'Arc added the comment:
Tests now fail on windows XP:
http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/3874/steps/test/logs/stdio
os.symlink() may raise NotImplementedError, and test.support.can_symlink()
should catch it.
--
stage: comm
Amaury Forgeot d'Arc added the comment:
Normally you should never call __del__, OTOH the issue is the same with a class
like::
class A:
def close(self):
self.close()
def __del__(self):
self.close()
The problem is not with _infinite_ recursion, though; a depth of
Amaury Forgeot d'Arc added the comment:
Precision: with new-styles classes (or py3k) the limit is
PyTrash_UNWIND_LEVEL-2. This does not change anything to the problem.
--
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
Here is a renewed patch against py3k, with a test.
--
Added file: http://bugs.python.org/file20237/timet_64-2.patch
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
> The only concern is that the test probably fails on FAT
The patch does not show it, but I've put the test under a
'if get_file_system(support.TESTFN) == "NTFS"'
--
___
Python
Amaury Forgeot d'Arc added the comment:
Committed r87666 (py3k), I'll backport to 3.1 and 2.7.
--
resolution: accepted -> fixed
status: open -> pending
___
Python tracker
<http://bugs.p
Amaury Forgeot d'Arc added the comment:
Merged into release31-maint (r87668) and release27-maint (r87669)
--
status: pending -> closed
___
Python tracker
<http://bugs.python.or
Amaury Forgeot d'Arc added the comment:
Btw, I have a failed assertion in the test suite, with "time.ctime(1e12)":
File: loctim64.c
Line: 78
Expression: (*ptime <= _MAX__TIME64_T)
This is a recent py3k, compiled with VS2005.
--
Amaury Forgeot d'Arc added the comment:
r87733 in pyexpat.c modified a call to PyErr_Format with a %zi format code.
This format does not seem to be supported. %zd should be used instead.
--
nosy: +amaury.forgeotdarc
___
Python tracker
Amaury Forgeot d'Arc added the comment:
It's not fixed. range() now uses the tp_index slot, in weakrefs this becomes:
WRAP_UNARY(proxy_index, PyNumber_Index)
and indeed PyNumber_Index does not accept strings.
But try with time.sleep() instead; here the line
WRAP_UNARY(p
Amaury Forgeot d'Arc added the comment:
- unit tests are needed.
- Py_LONG_LONG should be used instead of "long long", and the cast removed.
- The patch assumes that longlong == int64, but is it true on all platforms?
--
nosy: +ama
Amaury Forgeot d'Arc added the comment:
no, DWORD is a 32-bit unsigned integer
http://msdn.microsoft.com/en-us/library/aa383751(VS.85).aspx
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
Is it even possible? Each time I tried, the only solutions involved an external
program like Dependency Walker.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
The code is in Python/dynload_win.c
To load an extension module mymodule.pyd, Python calls
LoadLibrary('/path/to/mymodule.pyd'); when it returns NULL, the code calls
GetLastError() (which returns 126 in this case) then FormatMessage t
Amaury Forgeot d'Arc added the comment:
The script unicode2.py uses the console STD_OUTPUT_HANDLE iff
sys.stdout.fileno()==1.
But is it always the case? What about pythonw.exe?
Also some applications may redirect fd=1: I'm sure that py.test does this
http://pytest.org/capture.ht
501 - 600 of 2691 matches
Mail list logo