Amaury Forgeot d'Arc added the comment:
This function is called quite often. Building a set each time will be expensive.
What about a simpler recursion check with Py_EnterRecursiveCall()?
--
nosy: +amaury.forgeotdarc
___
Python tracker
Amaury Forgeot d'Arc added the comment:
looks similar to issue1856
--
___
Python tracker
<http://bugs.python.org/issue9901>
___
___
Python-bugs-list m
Amaury Forgeot d'Arc added the comment:
This has already been done as part of issue9428 in r83524.
--
nosy: +amaury.forgeotdarc
resolution: -> out of date
status: open -> closed
___
Python tracker
<http://bugs.python
Amaury Forgeot d'Arc added the comment:
Fixed in r84865.
--
nosy: +amaury.forgeotdarc
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.or
Amaury Forgeot d'Arc added the comment:
Indeed, this module has little value now that ast.py is in stdlib.
--
nosy: +amaury.forgeotdarc
resolution: -> out of date
status: open -> closed
___
Python tracker
<http://bugs.python.or
Amaury Forgeot d'Arc added the comment:
This is not specific to ctypes.
Please read
http://docs.python.org/c-api/init.html#thread-state-and-the-global-interpreter-lock
specially the paragraph that says "...when threads are created from C...".
Is it explicit enough? How woul
Amaury Forgeot d'Arc added the comment:
> ctypes performs the initializations in a way that break the
> threading.local functionality.
Not quite. ctypes (or more exactly: the PyGILState_Ensure() and
PyGILState_Release() functions, which are the standard API to do this) is in a
Amaury Forgeot d'Arc added the comment:
issue1744752 describes why it's probably a bug in the C library.
possible workarounds are to open the files in universal mode, to use io.open(),
or to switch to python 3!
--
nosy: +amaury.forgeotdarc
resolution: -> wont fix
Amaury Forgeot d'Arc added the comment:
issue1744752 describes why it's probably a bug in the C library.
possible workarounds are to open the files in universal mode, to use io.open(),
or to switch to python 3!
--
nosy: +amaury.forgeotdarc
resolution: -> wont fix
Amaury Forgeot d'Arc added the comment:
issue1744752 describes why it's probably a bug in the C library.
possible workarounds are to open the files in universal mode, to use io.open(),
or to switch to python 3!
--
nosy: +amaury.forgeotdarc
resolution: -> wont fix
Amaury Forgeot d'Arc added the comment:
I think there's actually a bug in the MSVCRT read() function, which was not too
hard to spot (see explanation below). In short, a CRLF file opened in text
mode may skip a newline after 4GB.
I'm re-closing the issue as "won
Amaury Forgeot d'Arc added the comment:
One more thing:
in the sample code, the thread initializes no PyThreadState. So the ctypes
callback creates a temporary PyThreadState just for the duration of the call.
This explains the difference between threading.local and _threading_
Amaury Forgeot d'Arc added the comment:
I suggest to report this to the Django team.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
You're welcome.
Please join a link to the gcc bug when you have one.
--
resolution: -> invalid
status: open -> pending
___
Python tracker
<http://bugs.p
Amaury Forgeot d'Arc added the comment:
For some reason your file os.pyc is corrupted:
I loaded it with a working python2.7:
import marshal, dis
pyc = open('bados.pyc', 'rb').read()
code = marshal.loads(pyc[8:])
dis.dis(code)
And it appears that all the "jum
Amaury Forgeot d'Arc added the comment:
Maybe a corrupted .pyc file? Can you please attach the file
/usr/local/src/python-2.7-maint-svn/Lib/os.pyc
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
It's the first time I see the _countof() macro. There is no other usage of it
in python codebase. Could you change it for something more easy for non-Windows
readers?
--
nosy: +amaury.forgeotdarc
Amaury Forgeot d'Arc added the comment:
I agree with the change, but the code should be factorized in a function
(normalize_filename for example)
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
This has already been corrected by issue3394, and is at least present in python
2.6.
--
nosy: +amaury.forgeotdarc
resolution: -> out of date
status: open -> closed
superseder: -> zipfile.writestr doesn't set external attri
Amaury Forgeot d'Arc added the comment:
What also worries me is the difference between the "class" statement and the
type() function.
class M_A(type):
def __new__(mcls, name, bases, ns):
print('M_A.__new__', mcls, name, bases)
return super().__ne
Amaury Forgeot d'Arc added the comment:
Applied in r84752.
--
resolution: accepted -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pyt
Changes by Amaury Forgeot d'Arc :
--
assignee: -> amaury.forgeotdarc
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/issue9210>
___
__
Amaury Forgeot d'Arc added the comment:
Fixed in r84685, with tests and doc updates.
--
resolution: accepted -> fixed
stage: unit test needed -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pyt
Amaury Forgeot d'Arc added the comment:
Yes, let's be conservative and reject non-ascii bytes in the format string.
--
___
Python tracker
<http://bugs.python.
Changes by Amaury Forgeot d'Arc :
--
assignee: -> amaury.forgeotdarc
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/issue4617>
___
__
Changes by Amaury Forgeot d'Arc :
--
assignee: -> haypo
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue9819>
___
___
Python-bugs-lis
Amaury Forgeot d'Arc added the comment:
Closing as a duplicate of issue706263.
Instead of changing all print statements, you could set sys.stdout to another
file, for example:
sys.stdout=StringIO()
or another object that simply discards written data.
--
nosy: +amaury.forgeo
Amaury Forgeot d'Arc added the comment:
> BTW: should I be using the .patch extension or .diff extension?
Both extensions are fine and handled the same way
--
___
Python tracker
<http://bugs.python.or
Amaury Forgeot d'Arc added the comment:
The patch is good, and fixes an incorrect call to the mkdir function.
--
nosy: +amaury.forgeotdarc
resolution: -> accepted
___
Python tracker
<http://bugs.python.or
Amaury Forgeot d'Arc added the comment:
You are right; but the data could not be appended to sysconfig.py, because this
file is shared by the different builds.
A new built-in C module is probably necessary.
--
___
Python tracker
Amaury Forgeot d'Arc added the comment:
I agree with the feature and the patch, with two minor nits:
- Py_UCS4 should be used in place of "unsigned long"
- "*p >= 0xD800" is the most selective test and should be the first
Amaury Forgeot d'Arc added the comment:
IMO there should not be any need to fetch information from config.h or the
Makefile.
What about a sys.build_config dictionary containing all the necessary data?
--
nosy: +amaury.forgeotdarc
___
Python tr
Amaury Forgeot d'Arc added the comment:
Python has several known crashers, they are not considered as security holes.
It seems that FreeBSD has a small stack size for threads (64k); did you try to
increase it with thread.stack_size(10**6)?
--
nosy: +amaury.forgeotdarc, l
Amaury Forgeot d'Arc added the comment:
Couldn't the patch use autoInterpreterState instead?
It is already modified at the same times as autoTLSkey.
--
___
Python tracker
<http://bugs.python.
Amaury Forgeot d'Arc added the comment:
> > PyUnicode_FromFormat("%s", text) expects a utf-8 buffer.
> Really?
The *format* looks more like latin-1, right. But the payload of a "%s" item is
decoded as utf-8.
> I don't think that a C file calls
Changes by Amaury Forgeot d'Arc :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pyt
Amaury Forgeot d'Arc added the comment:
Committed r84601. Thanks for the patch and your perseverance!
--
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
I'm currently working on it. I'll certainly commit it shortly with a few
changes:
- no need to say that a function fails with WindowsError, at least in the
docstring.
- return error sooner to reduce indentation.
- in tests, use subpro
Amaury Forgeot d'Arc added the comment:
FNFCIREAD &co are macros to help the definition of callback functions:
http://msdn.microsoft.com/en-us/library/ff797940.aspx
"hf" is defined as INT_PTR, but the value it receives is the result of
FNFCIOPEN(), which fits in int.
It
Changes by Amaury Forgeot d'Arc :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue9748>
___
___
Python-bugs-list mailing li
Amaury Forgeot d'Arc added the comment:
The patch looks good.
Apart from PyGILState_Ensure(), are there other parts of the code that use
these functions?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
I didn't know what "magic space" is. But a quick google search shows that it is
specific to Bash.
in http://www.ukuug.org/events/linux2003/papers/bash_tips/#S16
"""
There are other readline-based programs without this
Amaury Forgeot d'Arc added the comment:
> Python is installed in a directory called b'py3k\xc3\xa9'
> and your locale is C
Do we really want to support this kind of configuration?
--
___
Python tracker
<http://b
Amaury Forgeot d'Arc added the comment:
2 remarks:
- PyUnicode_FromFormat("%s", text) expects a utf-8 buffer.
- Very recently (r84472, r84485), some C files of CPython source code were
converted to utf-8. And most of the time, the format given to
PyUnicode_FromFormat is a
Amaury Forgeot d'Arc added the comment:
This is still the case: on Windows, if foo.py is readonly,
python -c "import foo"
generates foo.pyc with the readonly attribute.
Tested with 3.1 and current py3k (where the file is named
__pycache__\foo.cpython-32.pyc)
Amaury Forgeot d'Arc added the comment:
Does your version control system let the files read-only by default?
In this case, see issue6074.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Changes by Amaury Forgeot d'Arc :
--
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/issue9759>
___
___
Python-bugs-list mailing li
Amaury Forgeot d'Arc added the comment:
The documentation of WSASocket(), and the code of PyBluez
http://code.google.com/p/pybluez/source/browse/trunk/msbt/_msbt.c#374
both suggest to use the FROM_PROTOCOL_INFO constant.
Otherwise, the patch looks
Amaury Forgeot d'Arc added the comment:
test_socket.py passes here.
I run: python_d.exe -m test.regrtest -v test_socket
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
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
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
> 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:
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:
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:
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
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
Changes by Amaury Forgeot d'Arc :
--
keywords: +easy
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/issue843590>
___
___
Python-bug
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
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:
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:
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:
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:
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:
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:
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:
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:
> 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:
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:
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:
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:
No, apparently, r78942 was not included in 3.1.2.
--
___
Python tracker
<http://bugs.python.org/issue9257>
___
___
Amaury Forgeot d'Arc added the comment:
Here is a test + patch, to preserve the separator. Of course this changes the
current behaviour, like:
>>> glob.glob('/tmp/foo*')
['/tmp/foo1', '/tmp/foo2']
--
keywords: +patc
Amaury Forgeot d'Arc added the comment:
Should the change also apply to Windows?
on Windows, there is no "configure" phase, but the file PC/pyconfig.h is
maintained manually.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http
Amaury Forgeot d'Arc added the comment:
Why do you call this "dangerous"? because the object can be iterated only once?
But reversed() does the same thing.
And all iterators objects must also implement the __iter__ method that return
themselves, otherwise they cannot be use
Amaury Forgeot d'Arc added the comment:
Confirmed here:
"python setup.py build_clib -b/some/dir" returns
"error: option -/ not recognized"
All other files (build_ext.py, clean.py) have a '=' after these options names.
Patch is inlined:
Index:
Changes by Amaury Forgeot d'Arc :
--
resolution: -> works for me
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue1506122>
___
__
Amaury Forgeot d'Arc added the comment:
The proposed code may be useful sometimes, but is not generic enough for the
standard library. For example, the f() function can only take one argument,
when g() can accept any number.
Implementations of this kind are so easy to write, They are b
Amaury Forgeot d'Arc added the comment:
Please rename "sam" to something readable, "access" for example.
And the "reserved" parameter should really go, at least not be documented.
--
nosy: +amaury.forgeotdarc
__
Amaury Forgeot d'Arc added the comment:
Profiling only works on functions that actually return; maybe we could
add something about this fact in the documentation
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
The extra space in Grammar was already removed in r82624.
The remaining part of the patch looks good to me.
The lambda thing is not important, if you get an error when trying to compile
the resulting st.
--
nosy: +amaury.forgeo
Amaury Forgeot d'Arc added the comment:
test_xml_etree.py has some tests about bytes input (check_issue6233) but these
are only working cases. Tests with wrong encodings should be added.
--
nosy: +amaury.forgeotdarc
___
Python tracker
Amaury Forgeot d'Arc added the comment:
The patch should be amended for python3, then:
- PyType_Ready() should be used instead of "ob_type = &PyType_Type;"
- The demo contains "Option choisie :" which should be translated :-)
- the call::
PyErr
Amaury Forgeot d'Arc added the comment:
Patch looks good to me.
(Some day the pprint module should grow some way to register repr for user
types, so we can stop adding special cases; but defaultdict() is a builtin)
--
nosy: +amaury.forgeotdarc
resolution: ->
Amaury Forgeot d'Arc added the comment:
All patches seems already applied. Should we close this issue?
--
status: open -> pending
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
The two example classes are used exactly the same way, and don't show the
differences between them. How about a simple change like:
Replace:
"""If the class defines
:meth:`next`, then :meth:`__iter__` can just return ``se
Amaury Forgeot d'Arc added the comment:
I also like the idea; 3 remarks though:
- the patch introduces a new function that returns a PyObject*, but returns
NULL when """the attribute is not found, and the caller should raise
AttributeError""".
This conventi
Amaury Forgeot d'Arc added the comment:
This fileLineIter function looks like a good recipe to me. Can we close the
issue then?
--
nosy: +amaury.forgeotdarc
resolution: -> works for me
status: open -> pending
___
Python tra
Amaury Forgeot d'Arc added the comment:
But what if I want to pass a tuple through xmlrpc?
The function in the test case:
+def execute(server, methodname, *args):
+r = getattr(server, methodname)(args) # params become a tuple
+return r
looks wrong to me. I
Amaury Forgeot d'Arc added the comment:
Technically, since the C module is now named _datetime, it needs to be renamed
in Modules/Setup.dist, and most importantly in PC/config.c (because on Windows
datetime is built in the main interp
Amaury Forgeot d'Arc added the comment:
I would have hoped a Windows way...
--
___
Python tracker
<http://bugs.python.org/issue8035>
___
___
Python-bugs-l
Amaury Forgeot d'Arc added the comment:
Quoting the wikipedia page: """multiple threads within a process share state as
well as memory and other resources"""
If you never worked with threads, then you really need a tutorial about
threads, or even a gen
901 - 1000 of 2691 matches
Mail list logo