Amaury Forgeot d'Arc added the comment:
sys.path is probably not relevant here (it's used to import python modules).
Can you print the value of os.environ['PATH'] instead?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<
Amaury Forgeot d'Arc added the comment:
Even in "raw" unicode strings, \u is processed as an escape sequence; see the
very last paragraph of
http://docs.python.org/reference/lexical_analysis.html#string-literals
Yes, this can be surprising, and was changed with Python 3.
Py
Amaury Forgeot d'Arc added the comment:
Is "socat" a cygwin utility? In this case, you should use the python
interpreter built for the cygwin platform.
I'm quite certain that the standard win32 python cannot work the way you want.
Keep in mind that on Windows, file desc
Amaury Forgeot d'Arc added the comment:
Yes, that's probably how the cygwin runtime library works. But this method is
difficult to use from a shell script.
--
___
Python tracker
<http://bugs.python.o
Amaury Forgeot d'Arc added the comment:
Is it possible that the problem is related to floating point exceptions?
A quick Google search showed similar issue in another embedded library:
http://www.softintegration.com/support/faq/embed.html#borland
It seems important to add this instru
Amaury Forgeot d'Arc added the comment:
This was changed a long time ago with 565012d1123d
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
Sorry, the documentation in the patch is wrong. It should be: "Cause
:cfunc:`Py_FatalError` to invoke the given function before printing to standard
error and aborting out of the process."
I don't think it's worth making
Amaury Forgeot d'Arc added the comment:
Sadly, marshal.load() looks broken:
- The function starts with the comment
/* XXX Quick hack -- need to do this differently */
- It starts by calling f.read() which consumes the whole file (and explains the
issue reported here)
- The cod
Changes by Amaury Forgeot d'Arc :
--
resolution: -> out of date
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12292>
___
___
Amaury Forgeot d'Arc added the comment:
- Please replace tabs characters by space
- "//" comments are not accepted by some picky C89 compilers
Also, calling f.read(1) for each character may have a large performance impact.
I don't know how this
Amaury Forgeot d'Arc added the comment:
Anatoly,
Even if I remove all sarcasm from your previous answer, I don't see what it
brings to the current issue.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.
Amaury Forgeot d'Arc added the comment:
> I don't understand if socket file descriptors are different than
> (classic) file descriptors.
On Windows, sockets are completely independent from file descriptors.
A socket id can be large (typically over 1000), fortunately a fd_set
Amaury Forgeot d'Arc added the comment:
This change is reasonable for the long term. But it *will* break a lot of code.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
The change to sys.platform=='linux' would break code even on current platforms.
OTOH, we have sys.platform=='win32' even on Windows 64bit; would this favor
keeping 'linux2
Amaury Forgeot d'Arc added the comment:
What is the use of these code_page_encode() functions?
--
___
Python tracker
<http://bugs.python.org/issue12281>
___
___
Amaury Forgeot d'Arc added the comment:
> I don't know yet how Windows do decode bytes filenames
> (especially how it handles undecodable bytes),
> I suppose that it uses MultiByteToWideChar using cp=CP_ACP and flags=0.
It's likely, yes. But you don't need a new
Amaury Forgeot d'Arc added the comment:
IMO the cause is actually the same as the one for issue9390, i.e. a bug in the
Windows console.
--
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
"The file association for .py is pythonw"
Really? http://docs.python.org/using/windows.html#executing-scripts
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.pyt
Amaury Forgeot d'Arc added the comment:
Already fixed with issue11272, which will be included in 3.2.1 and 3.3.
--
nosy: +amaury.forgeotdarc
resolution: -> out of date
status: open -> closed
superseder: -> input() has trailing carriage ret
Changes by Amaury Forgeot d'Arc :
--
nosy: +haypo, lemburg
___
Python tracker
<http://bugs.python.org/issue12446>
___
___
Python-bugs-list mailing list
Amaury Forgeot d'Arc added the comment:
Did you try the "not" operator?
http://docs.python.org/reference/expressions.html#boolean-operations
>>> not True
False
>>> not False
True
--
nosy: +amaury.forgeotdarc
resolution: -
New submission from Amaury Forgeot d'Arc :
Reported by Michael Ford in msg139402:
http://www.serpentine.com/blog/2011/06/29/here-be-dragons-advances-in-problems-you-didnt-even-know-you-had/
describes a new algorithm for float<->str conversions.
It would be interesting to see if i
Amaury Forgeot d'Arc added the comment:
I've filed issue12450 to track this last idea.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.
Amaury Forgeot d'Arc added the comment:
Agreed. If some volunteer wants to work on it, I suggest to make an extension
module first, so that everybody can try and compare with the current routines.
--
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
-1. Besides compatibility issues, defaultdict is a dict: it contains data, and
is not meant to consume CPU when accessing items. Its "default" function should
return initial values, like 0 or an empty list.
I think what you want is &
Amaury Forgeot d'Arc added the comment:
This looks a lot like the crasher described in
Lib/test/crashers/underlying_dict.py
For the record, the similar issue1517663 was closed even though there was a
patch, with a comment of the "if it hurts, don't do it" ki
Amaury Forgeot d'Arc added the comment:
Can you suggest a patch?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/issue12476>
___
___
Amaury Forgeot d'Arc added the comment:
pypy did not use a structseq in this case. Fixed in (pypy's repo) dded6e510044
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.o
Amaury Forgeot d'Arc added the comment:
You are certainly using Python 2 with code designed for Python 3...
Can you check?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
This gives the correct result:
decode_header('=?iso-8859-1?B?QW5tZWxkdW5nIE5ldHphbnNjaGx1c3MgU/xkcmluZzNwLmpwZw==?=')
(I replaced _ with /)
The header was probably generated by a variant of the base64 encoding, like
this one: http://www.d
Amaury Forgeot d'Arc added the comment:
About the patch: the function should not be passed to the constructor, it could
be a regular method that can be overridden in subclasses.
--
nosy: +amaury.forgeotdarc
___
Python tracker
Amaury Forgeot d'Arc added the comment:
Is there a unit test about the actual feature: that the bytes are actually
swapped in the structure?
For example, with a
class T(BigEndianStructure): _fields_ = [("a", c_int), ("b", c_int)]
cast a pointer to T into a point
Amaury Forgeot d'Arc added the comment:
There remains a difference between open() and gzip.open():
open(filename, 'r', encoding=None) is a text file (with a default encoding),
gzip.open() with the same arguments returns a binary file.
Don't know how to fix this thou
Amaury Forgeot d'Arc added the comment:
It seems that a fix was merged in the 3.1 branch, somewhere between 3.1.2 and
3.1.3.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
The fix was c073f3c3276e (thanks to hg bisect)
the variable operation_cstr is not used before the call to
pysqlite_cache_get(), which also tries to encode the statement into utf8 and
correctly raises an exception.
In early 3.1.2, the segfault came
Amaury Forgeot d'Arc added the comment:
My review of the patch: http://bugs.python.org/review/12528/show
--
nosy: +amaury.forgeotdarc
stage: -> patch review
___
Python tracker
<http://bugs.python.org
Amaury Forgeot d'Arc added the comment:
"write_through" is not used in _pyio.py, is it expected?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.pyt
Amaury Forgeot d'Arc added the comment:
Looks good, then.
--
___
Python tracker
<http://bugs.python.org/issue12591>
___
___
Python-bugs-list mailing list
Amaury Forgeot d'Arc added the comment:
First, a call to abort() is not a GPF: it's not an interrupt from the kernel or
the OS, it's just an explicit (albeit brutal) way to exit from an application.
There is no potential back door here.
Then, the "Fatal Python error:
Amaury Forgeot d'Arc added the comment:
What is the output of this command?
./python -m test.regrtest -v test_uuid
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
hum, maybe an issue with the MAC address of your virtual server? What do you
get if you run:
ifconfig -a | grep -i -e hwaddr -e ether
--
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
Well, without a valid MAC address the function cannot work...
On the other hand, I would not worry too much: uuid._ifconfig_getnode() is an
internal function; and since all the other tests pass, uuid.getnode() probably
has other ways to get a u
Amaury Forgeot d'Arc added the comment:
> @@ -10330,26 +10899,34 @@ INITFUNC(void)
I know that it's only an increase of 5%, but I feel that posixmodule.c is
already large enough.
Does this feature belongs to the os module?
Or is it time to split posixmodule.c in s
Amaury Forgeot d'Arc added the comment:
+def starmapstar(args):
+return list(itertools.starmap(args[0], args[1]))
Is your new function restricted to 2 arguments?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
Are you sure that counter.next() cannot release the GIL? Remember that any
DECREF can trigger the garbage collector and execute arbitrary code...
--
nosy: +amaury.forgeotdarc
___
Python tracker
Amaury Forgeot d'Arc added the comment:
Yes, the patch looks good!
--
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/issue11241>
___
Amaury Forgeot d'Arc added the comment:
Can you please give more context? From the information you gave:
- Python is embedded in some program "adem.exe".
- Memory seems corrupted, and a C call to PyString_FromStringAndSize()
segfaults in PyObject_Malloc().
Most of the time
New submission from Amaury Forgeot d'Arc :
This crashes on python 3.3::
class S(ctypes.Structure):
_fields_ = [(b'x', ctypes.c_int)]
This also crashes on python 2.7::
class S(ctypes.Structure):
_fields_ = [(u'x\xe9', ctypes.c_int)]
The caus
Amaury Forgeot d'Arc added the comment:
With a buffer overrun anything can happen... Here, I would recommend
PyErr_Format() instead.
But it also may be some other corruption happening before!
--
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
Which version of Python did you test with?
Can you try with version 3.2?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
A third idea is to find a way to override the low-level open() function (the
one that returns a fd).
openat() seems to exist only on Linux, so I'm -1 on adding new parameters to
support this function only.
--
nosy: +amaury.f
Amaury Forgeot d'Arc added the comment:
This issue and #5127 should not be backported to 2.7: narrow builds don't even
accept unichar(0x1).
Only python 3 can slowly pretend to implement utf-16 features.
--
___
Python trac
Amaury Forgeot d'Arc added the comment:
> - os.open followed by os.fdopen is easy: it isn't that easy to get
> the incantation right (the pure Python open() in _pyio is 70 lines
> of code), especially if you want the file object to have the right
> "name" attrib
Amaury Forgeot d'Arc added the comment:
Note that this file is not written by hand. It's generated by PC/generrmap.c,
which uses the _dosmaperr() function provided by the msvcrt.
If we want to modify it, this should be clearly marked
Amaury Forgeot d'Arc added the comment:
If you have a copy of Visual Studio, you can see the code of _dosmaperr() in
VC/crt/src/dosmap.c.
Otherwise the Google query "inurl:dosmap.c" returns some online copies of this
file.
--
___
Amaury Forgeot d'Arc added the comment:
Unfortunately, it won't work. _dosmaperr() is not exported by msvcrt.dll, it is
only available when you link against the static version of the C runtime.
--
___
Python tracker
<http://bu
Amaury Forgeot d'Arc added the comment:
You should call the .flush() method when switching from writes to reads.
Nothing really overflows, but the fread() function may return uninitialized
memory. In versions 2.x, python uses the fopen, fread and fwrite function
(from the C library) a
Changes by Amaury Forgeot d'Arc :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pyt
Changes by Amaury Forgeot d'Arc :
--
resolution: accepted -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pyth
Amaury Forgeot d'Arc added the comment:
This is a duplicate of issue9291.
--
nosy: +amaury.forgeotdarc
resolution: -> duplicate
status: open -> closed
superseder: -> mimetypes initialization fails on Windows because of non-Latin
characte
Amaury Forgeot d'Arc added the comment:
Please run the "make" command again. It will list the modules that were
skipped and not compiled. Which modules do you see there?
Also, which version of OpenSSL is installed?
--
nosy: +ama
Amaury Forgeot d'Arc added the comment:
The setup.py script does not look correct when openssl is not installed:
the _sha256 and _sha512 modules are compiled under this condition::
if COMPILED_WITH_PYDEBUG or openssl_ver < min_sha2_openssl_ver:
By comparison, the _md5 module
Amaury Forgeot d'Arc added the comment:
Well, readline is supposed to be used with a console, and there is only one
usually. Why would you want to use readline from multiple threads?
--
nosy: +amaury.forgeotdarc
___
Python tracker
Amaury Forgeot d'Arc added the comment:
Actually it already fails with 3.1 (I tried "hg up v3.1")
Then I played with "hg bisect", and unsurprisingly it answered:
Traceback (most recent call last):
File "", line 1, in
AttributeError: '_io.Str
Amaury Forgeot d'Arc added the comment:
Is it a crash, or do you get a exception with a nice message?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
Certainly the effect of some "alloca" call with a large value, then the stack
overflows.
--
___
Python tracker
<http://bugs.pyt
Amaury Forgeot d'Arc added the comment:
> O_CLOEXEC is not linux-only. Windows has the same flag.
> In file-opening functions there is lpSecurityAttributes argument
How do you suggest to use it? Even on Windows, python calls open(). And
lpSecurityAttributes is an argument of Create
Amaury Forgeot d'Arc added the comment:
> Why not to use CreateFile() on Windows platform?
Good idea! Please open a separate issue for it.
--
___
Python tracker
<http://bugs.python.org
Amaury Forgeot d'Arc added the comment:
See also
http://docs.python.org/faq/programming.html#how-do-i-create-a-multidimensional-list
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
No, apparently, r78942 was not included in 3.1.2.
--
___
Python tracker
<http://bugs.python.org/issue9257>
___
___
Amaury Forgeot d'Arc added the comment:
Can someone explain why among the 6 calls to Py_GetFinalPathNameByHandle, 5 of
them use VOLUME_NAME_DOS and only one uses VOLUME_NAME_NT?
--
nosy: +amaury.forgeotdarc
status: closed -> pending
__
Amaury Forgeot d'Arc added the comment:
The calls to Py_GetFinalPathNameByHandle come in pairs: one to get the length,
the other to retrieve the value. They should at least be consistent.
There are two other issues:
- in all three places, it's possible for the function to return af
Amaury Forgeot d'Arc added the comment:
Please be more descriptive about the problem you have.
What were you trying to do?
On which operating system?
How could we try to reproduce the problem?
--
nosy: +amaury.forgeotdarc
___
Python tracker
Amaury Forgeot d'Arc added the comment:
> In the meantime I have switched to Python 2.6.5,
> but the problem that I described above is still there.
The fix was made for 2.7, and not backported to 2.6.
> Another problem that brought the patch is, that when I move a frame up
> i
Amaury Forgeot d'Arc added the comment:
The warnings at lines 284, 301, 461, 647 are benign. The attached patch fixes
them.
The others (lines 628, 1320, 1558, 1806) are real issues: pickle will fail when
given a list, a tuple or a dict larger than INT_MAX, or when the memo is too
Amaury Forgeot d'Arc added the comment:
Ah, the patch is buggy; it was corrected with r71019 which indeed fixes "up"
and "down". You could try to apply this change to your local copy.
Also consider upgrading to 2.7, where eve
Amaury Forgeot d'Arc added the comment:
Right, this last problem still exists with 2.7 or 3.1. Please open a new
tracker item for it, and let's close this one.
--
___
Python tracker
<http://bugs.python.
Amaury Forgeot d'Arc added the comment:
No, nothing changed in this aspect since python 2.2.
With 2.7, I get the same error.txt file containing the "Bad file descriptor"
message.
--
resolution: out of date ->
status: closed -> open
_
Amaury Forgeot d'Arc added the comment:
I use Windows XP.
Note that nothing is displayed on screen. there is just a error.txt file in the
current directory.
--
___
Python tracker
<http://bugs.python.org/iss
Amaury Forgeot d'Arc added the comment:
I would rename the feature to something like "redecode-modules": the filenames
were decoded with the wrong encoding, and must be decoded again.
--
nosy: +amaury.forgeotdarc
___
Python
Amaury Forgeot d'Arc added the comment:
Some thoughts: since the modules were successfully imported, surely it means
that their filenames where correctly computed and encoded? So why is the
__filename__ attribute wrong?
--
___
Python tr
Amaury Forgeot d'Arc added the comment:
It's true that for now, MS_WINDOWS implies HAVE_USABLE_WCHAR_T and
PyUnicodeObject directly used as a WCHAR array.
I'd prefer a new symbol though. Why not something like HAVE_MBCS_CODEC?
--
nosy: +ama
Amaury Forgeot d'Arc added the comment:
Committed with r84177.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pyt
Changes by Amaury Forgeot d'Arc :
--
keywords: +easy
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/issue843590>
___
___
Python-bug
New submission from Amaury Forgeot d'Arc :
The file Modules/getpath.c computes sys.prefix and the initial sys.path.
The Windows version uses its own copy of this file, with a lot of similarities,
but also non-obvious differences.
I propose to merge both files, this would ease maintenanc
Amaury Forgeot d'Arc added the comment:
Hmm, it looks like a web server problem to me.
urllib2 uses the HTTP/1.1 protocol, and sends the "Connection: close" header. I
hacked urllib2: when this header is not sent, the content is retrieved normally.
This page:
http://www.mail
Amaury Forgeot d'Arc added the comment:
Confirmed on all versions since 2.6. Patch attached.
--
keywords: +patch
nosy: +amaury.forgeotdarc
stage: -> patch review
Added file: http://bugs.python.org/file18595/ctypes-buffer.patch
___
Python
Amaury Forgeot d'Arc added the comment:
At the time, zipfile.py did not support the ZIP64 format...
--
nosy: +amaury.forgeotdarc
resolution: -> out of date
status: open -> closed
___
Python tracker
<http://bugs.python.or
Amaury Forgeot d'Arc added the comment:
> the changes are small
which patch are you referring to? They look quite large to me.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
The _io module appears both in setup.py and Modules/Setup.dist. Is it normal?
IMO if the _io module is built-in, it should not be built as an extension
module.
--
nosy: +amaury.forgeotdarc
___
Python tr
Amaury Forgeot d'Arc added the comment:
Indeed, with 3.1:
>>> def f(x, y): pass
...
>>> inspect.formatargspec(inspect.getargspec(f))
TypeError: object of type 'map' has no len()
--
nosy: +amaury.forgeotdarc
type: -> behavior
__
Amaury Forgeot d'Arc added the comment:
IMO the code is not correct: how does ElementTree know which encoding is used
for the attribute value? Even 2.5 prints a different content when the script
is saved with a different encoding.
The line should look like:
oDoc.set( "ATTR&quo
Amaury Forgeot d'Arc added the comment:
Testing with python 2.5: oDoc.set("ATTR", "ÄÖÜ") uses the encoding used by the
source code (with "# -*- coding:";) If I use utf-8 instead, the output is:
which contains the n
Amaury Forgeot d'Arc added the comment:
The spawn* functions return intptr_t, because it's the process handle.
But _getpid() returns an int.
Both seem to be correctly handled.
Which part do you suspect to truncate data?
--
nosy: +amaury.f
Amaury Forgeot d'Arc added the comment:
Why is a run-time exception better than a SyntaxError in this case?
And your patch now allows:
x = None
return x
What's the rationale of this change?
--
nosy: +amaury.forgeotdarc
___
Pyth
Amaury Forgeot d'Arc added the comment:
Jay, is one of these links relevant to your case:
http://www.appdeploy.com/msierrors/detail.asp?id=130
http://blog.colinmackay.net/archive/2007/06/21/36.aspx
--
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
You really should use the same version of Visual Studio than the one used to
compile python.
"stdout" points to a FILE object created by your version of the compiler
(VS2010); it cannot be passed to PyObject_Print(), which uses defini
Amaury Forgeot d'Arc added the comment:
Aren't there tools that extract only the first line of help?
--
assignee: -> d...@python
components: +Documentation -Extension Modules
nosy: +amaury.forgeotdarc, d...@python
___
Python t
Amaury Forgeot d'Arc added the comment:
It seems that httplib is exactly what you need:
http://docs.python.org/library/httplib.html#examples
--
nosy: +amaury.forgeotdarc
resolution: -> works for me
status: open -> pending
___
Python tra
Amaury Forgeot d'Arc added the comment:
On Windows, a stack overflow often causes the program to silently exit.
Try to add some print statement at the end and see if it executes.
--
nosy: +amaury.forgeotdarc
___
Python tracker
201 - 300 of 2691 matches
Mail list logo