[issue18122] RuntimeError: not holding the import lock

2013-06-02 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18122 ___ ___ Python-bugs-list

[issue18100] socket.sendall() cannot send buffers of 2GB or more

2013-05-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: int len = pbuf.len; Why doesn't gcc emit a warning here? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18100

[issue18090] dict_contains first argument declared register, and shouldn't be

2013-05-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: If register is irrelevant to calling convention, then why would the C standard preclude using it in an external declaration? Maybe here external is the opposite of static: register is OK in a single translation unit (where the calling convention does

[issue18087] os.listdir don't show hidden option

2013-05-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The concept of hidden file depends on the platform, and is independent of the listdir() function. The first thing is to agree on an implementation of the hidden property, and expose it as os.path.ishidden. Then we can consider an option to os.listdir

[issue18085] Verifying refcounts.dat

2013-05-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: And is it necessary to list all functions there? Many functions share the same behavior: they don't change the ownership of PyObject* passed as argument, and return a new reference. Only document functions that don't conform to this rule, like

[issue18097] spam

2013-05-29 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- resolution: - invalid status: open - closed title: Check out my profile on LinkedIn - spam ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18097

[issue592703] HTTPS does not handle pipelined requests

2013-05-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Tried with python2.7.3 I used http://code.activestate.com/recipes/576673-python-http-pipelining/ just replacing the initial call to HTTPConnection() by HTTPSConnection(). The example succeeeds, fetches the three pages, and I checked with strace

[issue592703] HTTPS does not handle pipelined requests

2013-05-26 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- resolution: - works for me status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue592703

[issue592703] HTTPS does not handle pipelined requests

2013-05-26 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue592703 ___ ___ Python

[issue923697] SAX2 'property_encoding' feature not supported

2013-05-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Mark, the http://www.python.org/sax/properties/encoding; is not meant to be a web page. It's like an attribute name, but fully qualified so that attributes given by different organizations don't clash. (There may be different usages of encoding

[issue877121] configure detects incorrect compiler optimization

2013-05-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The 3.2 change r85656 removes OPT:Olimit, IMO this should not be backported. But 2.7 already has this warning fixed for icc: http://hg.python.org/cpython/rev/e7c96c1d144b/ We should do the same here. What's the correct way to detect Oracle Studio

[issue706406] fix bug #685846: raw_input defers signals

2013-05-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Closing as fixed. I tested with python2.7 and 3.2, both with and without a readline module. Behavior is consistent and looks correct to me: the signal is honored (message printed after 5s), and does not stop the raw_input(), except when it raises

[issue18059] Add multibyte encoding support to pyexpat

2013-05-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I guess GB18030 can't be supported at all? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18059

[issue18059] Add multibyte encoding support to pyexpat

2013-05-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Then you should also remove the Make it as simple as possible comment :-/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18059

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The patch goes in the right direction: consistently reject non-8bit encodings which the current implementation does not support. - please add a unit test - remove usage of PyUnicodeObject and the Stupid to access directly comment, they are outdated

[issue17973] FAQ entry for: '+=' on a list inside tuple both succeeds and raises an exception

2013-05-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: what if we try the assignment, and catch TypeError only if __iadd__ returned self? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17973

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: encoding=GBK causes a buffer overflow in PyUnknownEncodingHandler, because the result of PyUnicode_Decode() is only 192 characters long. Exact behavior is not defined... -- ___ Python tracker rep

[issue17206] Py_XDECREF() expands its argument multiple times

2013-05-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The last patch (17206-3.diff) has tests for the 4 macros, and looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17206

[issue17979] Cannot build 2.7 with --enable-unicode=no

2013-05-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Can't build here with after ./configure --disable-unicode. Serhiy, which OS did you try? I'm running Debian 64bit, with gcc 4.6.3 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17979

[issue17970] Mutlithread XML parsing cause segfault

2013-05-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: In my opinion it's not fine to let Python crash. The implementation could be similar to the one in bufferedio.c, it's quite lightweight. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue17979] Cannot build 2.7 with --enable-unicode=no

2013-05-14 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc: python2.7 can't be compiled with --enable-unicode=no Because of a crash in the re module. It's a regression from 2.7.3. $ ./python -c 'import re; re.compile(([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*))' Traceback (most recent call last): File string, line 1

[issue17978] Python crashes if Py_Initialize/Py_Finalize are called multiple times

2013-05-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The official way to build without unicode is ./configure --enable-unicode=no But see issue17979. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17978

[issue17970] Mutlithread XML parsing cause segfault

2013-05-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Expat is not thread-safe at the object level, a single Parser cannot be used from multiple threads. Pyexpat could add locks to Parser objects. -- nosy: +amaury.forgeotdarc stage: - needs patch ___ Python

[issue17970] Mutlithread XML parsing cause segfault

2013-05-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: But this would break working code which already uses locks correctly (or some kind of pool of cached parsers) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17970

[issue17927] Argument copied into cell still referenced by frame

2013-05-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: with a unit test maybe? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17927

[issue17922] Crash in clear_weakref

2013-05-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: swigpyobject_type is a static PyTypeObject variable (similar to all static PyTypeObject structures we write in extension modules, but inside a function) It should never be deallocated... There may be a refcount issue with this object. -- nosy

[issue17922] Crash in clear_weakref

2013-05-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Right. But this is an embedded interpreter, and SWIG does not call PyType_Ready() again; the old type is returned instead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17922

[issue17922] Crash in clear_weakref

2013-05-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Python remembers SWIG types because SWIG generates code like this: PyTypeObject * SwigPyObject_TypeOnce(void) { static PyTypeObject swigpyobject_type; static int type_init = 0; if (!type_init) { // ... initialization code

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-04-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: And does it cause an issue later? How? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17797

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-04-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Maybe check_fd(fd) could be used in initstdio as well. Can you check whether it's the same for the other files? What are the values for fileno(stdout) and fileno(stderr)? -- ___ Python tracker rep

[issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4

2013-04-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: At the time the Py_AtExit functions are called, the thread state is NULL I'd say this is the root cause. It's a bad thing to call Py_DECREF without a thread state. Was it the case in previous versions? -- nosy: +amaury.forgeotdarc

[issue17206] Py_XDECREF() expands its argument multiple times

2013-04-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: As I wrote in issue17589, there are some extension modules (pytables) that which assume that Py_INCREF is an expression: return Py_INCREF(x), x; and Py_RETURN_NONE is also defined with a comma expression. Oh, and Cython: #define __Pyx_PyBool_FromLong(b

[issue17658] pythonw.exe crashes on opening IDLE

2013-04-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Hum, do you have any environment variable that refer to Python27? In a terminal window (cmd.exe), try the following command: set | findstr /i python -- nosy: +amaury.forgeotdarc ___ Python tracker rep

[issue17658] pythonw.exe crashes on opening IDLE

2013-04-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Please remove the PYTHONPATH environment variable. I don't know how it came here, but it's certainly not needed: these directories are computed at runtime when the python27 interpreter starts; it can only do harm when another interpreter is installed

[issue17589] Make documentation about macros in C API explicit about rvalue vs statement

2013-04-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: There are some extension modules (pytables) that do return Py_INREF(x), x; and Py_RETURN_NONE is also defined with a comma expression. Oh, and Cython: #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False

[issue17671] io.BufferedRWPair can use uninitialized members

2013-04-08 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc: This segfaults on all Python versions: io.BufferedRWPair.__new__(io.BufferedRWPair).read() The various _forward_call methods should check that the reader and writer objects are correctly initialized. Not NULL, at the very least

[issue14010] deeply nested filter segfaults

2013-04-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Or you could try to create some general purpose stack overflow protection that periodically makes sure there is enough stack remaining for C Python to function correctly. Isn't it exactly what Py_EnterRecursiveCall does

[issue6743] Add function compatible with print to pprint module

2013-04-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: But it can't work. pprint() uses all the width for a single object. How are you supposed to print multiple objects? On multiple lines? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue1634774] locale 1251 does not convert to upper case properly

2013-04-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: With Python3 .upper() is locale-independent for unicode and bytes strings. For serious work with non-ascii text Python3 is strongly recommended anyway, so I suggest to close this issue. -- resolution: - wont fix status: open - pending

[issue6743] Add function compatible with print to pprint module

2013-04-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Maybe pprint.print() should specify sep='\n' by default? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6743

[issue17588] runpy cannot run Unicode path on Windows

2013-04-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The issue is actually with compile(): compile('x=1', '\u222b.py', 'exec') fails on my Western Windows machine (mbcs = cp1252). This conversion should not be necessary, since the filename is only used for error messages (and decoded again

[issue17588] runpy cannot run Unicode path on Windows

2013-04-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I have a similar issue with a directory '∫' ('\u222b') containing a file foo.py: sys.path.insert(0, '\u222b') import foo Traceback (most recent call last): File stdin, line 1, in module File frozen importlib._bootstrap, line 1564, in _find_and_load

[issue17588] runpy cannot run Unicode path on Windows

2013-04-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: No need to use weird characters. Greek or Cyrillic letters are enough. Suppose I download a library with language modules such as Русский.py or Ελληνικά.py; they are allowed as identifiers and can be regularly imported... on utf8 system at least

[issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values

2013-03-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: minidom may be broken, but what's the issue with ElementTree? import xml.etree.cElementTree as etree doc = etree.fromstring('xml /') doc.set('attr', multiline\nvalue) etree.tostring(doc) 'xml attr=multiline#10;value /' -- nosy

[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The previous title, rename type returned by locals() to livedict did not describe the reality, since locals() returns a regular dict. [Would you call x.__dict__ a livedict?] So either this issue should be closed as invalid, because it's based

[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Normal dict in Python is updated by user code (which I as a user can see and can inspect for further troubleshooting) and for locals's dict this is not correct. Do you have an example? -- ___ Python tracker

[issue17551] Windows - accessing drive with nothing mounted forces user interaction

2013-03-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Does it change something if you insert in your script (in 3.3): import msvcrt msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS) -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org

[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This is expected: zc = xxx updates locals! but not the copy. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17546

[issue16754] Incorrect shared library extension on linux

2013-03-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: So sysconfig.get_config_var('SO') will change in a micro release? Won't this break working user code? Give unexpected file names? -- nosy: +amaury.forgeotdarc status: pending - open ___ Python tracker rep

[issue17544] regex code re-raises exceptions on success

2013-03-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The returned value and the global indicator are not independent. C functions should not set an error while returning a valid value. The same behavior will occur in random places -- for example, for x in range(2): pass also triggers the issue

[issue14010] deeply nested filter segfaults

2013-03-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: - The tests with range(100) seems to duplicate those with recursion limit. - zip_iter should would be simpler with a goto error; LGTM otherwise. -- ___ Python tracker rep...@bugs.python.org http

[issue16475] Support object instancing and recursion in marshal

2013-03-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Sorry, what does instancing mean? And does this change bring interesting features? And is there an impact on regular .pyc files? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http

[issue16475] Support object instancing and recursion in marshal

2013-03-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The size of the pyc files may decrease This is very good news! Indeed, I noticed decimal.cpython-34.pyc going from 212k to 178k. 17% less! This is worth an entry in whatsnew/3.4.rst IMO. -- ___ Python

[issue17527] PATCH as valid request method in wsgiref.validator

2013-03-23 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- nosy: +pje ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17527 ___ ___ Python-bugs-list

[issue15005] corrupted contents of stdout result from subprocess call under a trace

2013-03-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: So the issue can be closed: - subprocess was rewritten in C on Python3 for good reasons: it's wrong (and dangerous) to run Python code between fork() and exec(); this bug report is another example. - This change is too large to be merged to 2.7

[issue17520] Except(ValueError) on Integer returns the input value as 1

2013-03-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Hi, The Python bug tracker is not designed to get help. Please ask your questions on the python-list mailing list, or the comp.lang.python newsgroup. A hint though: when there is an exception the num = part is not even executed, so num contains its

[issue16123] IDLE - deprecate running without a subprocess

2013-03-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The issue is usually with firewalls, security software, socket issues, etc Surely nowadays there are better ways than sockets to communicate between processes? Pipes? -- nosy: +amaury.forgeotdarc ___ Python

[issue17503] replace mode is always on in console

2013-03-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Python has absolutely no code to control the Windows console. It has always used fgets(). On the other hand, Windows keeps independent settings per shortcut or executable, so if you started Python directly from the start menu (or by opening

[issue17206] Py_XDECREF() expands its argument multiple times

2013-03-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: - The patch contains a #ifdef OLD_17206 that should be removed. - I know that these macros are already used everywhere, but a test for the new feature would be nice (in _testcapimodule.c) For example, Py_DECREF(PyLong_FromLong(0)) does not fail or leak

[issue17503] replace mode is always on in console

2013-03-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I don't know Far Manager. Maybe it starts everything in overwrite mode (and check its console settings) pyreadline completely overrides Python's input methods and bypasses the console, so behavior is completely independent

[issue17320] os.path.abspath in window7, return error

2013-03-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The string '\xe7\x8e\xb0' is the utf-8 encoded version of u'现' (=u'\u73b0') But your Windows system uses the cp936 code page to encode file names. '\xe7\x8e\xb0' is invalid in this code page: the last character is an incomplete multibyte sequence

[issue14010] deeply nested filter segfaults

2013-03-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Py_TRASHCAN_SAFE_BEGIN/Py_TRASHCAN_SAFE_END macros can help: http://hg.python.org/cpython/file/57c6435ca03b/Python/traceback.c#l44 -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http

[issue17468] Generator memory leak

2013-03-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Well, there is a __del__: the one from the generator function. And it's part of the cycle. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17468

[issue17295] __slots__ on PyVarObject subclass

2013-03-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Probably a duplicate of issue1173475. Do you want to work on the patch there? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17295

[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

2013-03-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Sorry, I asked the wrong question; callback_t is a function pointer, so 8 bytes is expected. What is sizeof(myst_args) both in C and Python? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue17466] I can't make assignments to a list.

2013-03-18 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17466

[issue17320] os.path.abspath in window7, return error

2013-03-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: There may be an issue with the GetFullPathName system call. Could you copy the result of these functions: import sys, locale print(locale.getdefaultlocale()) print(sys.getdefaultencoding()) -- nosy: +amaury.forgeotdarc

[issue17408] second python execution fails when embedding

2013-03-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: In 3.2, typeobject.c did not cache the copyreg module in import_copyreg(); PyImport_Import was always called. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17408

[issue17440] Some IO related problems on x86 windows

2013-03-16 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- resolution: - invalid status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17440

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Anatoly, your last question about re.sub is covered by the documentation: re.sub will process the replacement string, and interpret the sequence \ 0 as the NUL character. So you get the NUL character in the returned string. This is unrelated to raw

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: It's not a double replacement: chr(92)+chr(0) is processed only once. And the second paragraph of the re documentation already contains such a warning. -- ___ Python tracker rep...@bugs.python.org http

[issue17366] os.chdir win32

2013-03-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: My expectation was that a platform os.chdir would parse the string for these characters and do something intelligent with them i.e a legal path from any of the systems (mac, linux or windows) passed in as a string to os.chdir would be converted

[issue17380] initproc return value is unclear

2013-03-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Note that all these cases are compatible with tp_init returns 0 on success and -1 on error. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17380

[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

2013-03-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Is _pack_ = 1 correct? Did you compile your C library with /Zp1 or similar? Also check that ctypes.sizeof(callback_t) matches the one given by the C compiler. -- ___ Python tracker rep...@bugs.python.org http

[issue17408] second python execution fails when embedding

2013-03-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Reproduced on Linux. The reason is in Objects/typeobject.c: import_copyreg() has a static cache of the copyreg module. When the interpreter stops, the module is filled with None... but gets reused in the next instance. Resetting this mod_copyreg

[issue17404] ValueError: can't have unbuffered text I/O for io.open(1, 'wt', 0)

2013-03-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The proposed workaround seems to work (wb instead of wt!), with the following restrictions: - it's not really unbuffered: the encoder has its own buffers (OK, in the stdlib only 'idna' encoding will retain data) - it won't work for reading

[issue17404] ValueError: can't have unbuffered text I/O for io.open(1, 'wt', 0)

2013-03-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: But that will still be within the TextIOWrapper itself, right? Yes. And I just noticed that the _io module (the C version) will also buffer encoded bytes, up to f._CHUNK_SIZE. On the other hand, TextIOWrapper is broken for buffering codecs, encode

[issue17380] initproc return value is unclear

2013-03-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The return value for error conditions should be -1. - typeobject.c checks with 0 - in _iomodule.c, there is == -1 - and pygobject/gobject/gobjectmodule.c just does:: if (...tp_init(...)) PyErr_Print(); -- nosy: +amaury.forgeotdarc

[issue17374] Remove restriction against Semaphore having a negative value

2013-03-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: 3. When a thread increments the semaphore, if there are other threads waiting, one of the waiting threads gets unblocked. Is a condition missing here? if the resulting count is positive Since the use case is different from a regular Semaphore, I

[issue17366] os.chdir win32

2013-03-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The backslash \ has a special meaning in strings: \n is the new line character, and \t is the tab character: http://docs.python.org/2/reference/lexical_analysis.html#string-literals Try to print the string! You could use \\, or raw strings rlike

[issue3329] API for setting the memory allocator used by Python

2013-03-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Some customizable memory allocators I know have an extra parameter void *opaque that is passed to all functions: - in zlib: zalloc and zfree: http://www.zlib.net/manual.html#Usage - same thing for bz2. - lzma's ISzAlloc: http://www.asawicki.info

[issue17170] string method lookup is too slow

2013-02-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I left some comments on Rietveld. I wonder if PyArg_ParseTupleAndKeywords can be replaced by something that would compute and cache the set of keywords; a bit like _Py_IDENTIFIER. -- nosy: +amaury.forgeotdarc

[issue17028] launcher does not read shebang line when arguments are given

2013-01-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: An entry in Misc/NEWS would be nice. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17028

[issue12939] Add new io.FileIO using the native Windows API

2013-01-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Added some comments on Rietveld. The .fileno() method is missing. Can this cause a problem when the file is passed to stdlib functions? subprocess for example? -- ___ Python tracker rep...@bugs.python.org http

[issue16865] ctypes arrays =2GB in length causes exception

2013-01-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: In _ctypes.c there are (only!) two occurrences of the long type... both are related to ctypes arrays and look suspect. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16865

[issue16899] Add support for C99 complex type (_Complex) as ctypes.c_complex

2013-01-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: libffi still has no support for _Complex. Did you try with a pure Python solution, like the one suggested in http://objectmix.com/python/112374-re-ctypes-c99-complex-numbers.html -- nosy: +amaury.forgeotdarc

[issue16718] Mysterious atexit fail

2012-12-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I don't know, you should probably ask there. One blocker is to make builtin and extension modules participate in GC, search pep3121 to see the many intermediate issues. -- ___ Python tracker rep

[issue16724] Rename `data` argument names to `bytes`

2012-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Why? The binascii module consistently uses data to refer to binary data. For example: Return the hexadecimal representation of the binary data. Every byte of data is converted ... -- nosy: +amaury.forgeotdarc

[issue16723] io.TextIOWrapper on urllib.request.urlopen terminates prematurely

2012-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Hum, io objects are not supposed to close themselves when they run out of data. Even if HTTPResponse chooses to close the underlying socket (to clean unused resources?), it should not report itself as a closed io.IOBase. Subsequent calls read() should

[issue16723] io.TextIOWrapper on urllib.request.urlopen terminates prematurely

2012-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: buffer.read() never returns empty data in this case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16723

[issue16724] Rename `data` argument names to `bytes`

2012-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: If hexlify is not accepting anything except bytes, it is better be explicit. But it is very explicit in the link you provided: both a note at the top, and the words binary data in the description of every function

[issue16724] Rename `data` argument names to `bytes`

2012-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: If hexlify is not accepting anything except bytes, it is better be explicit. But it is very explicit in the link you provided: both a note at the top, and the words binary data in the description of every function

[issue16728] collections.abc.Sequence shoud provide __subclasshook__

2012-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Careful, though: dict also provides these methods, but I would not consider it a Sequence. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16728

[issue16727] Windows installers for 2.7.3 don't install python27.dll correctly

2012-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Did you select an option like install for all users/install just for me at some point? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16727

[issue16724] Rename `data` argument names to `bytes`

2012-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: When people use docs as a reference, they don't read top notes. Maybe, but they can read some words beyond the function name, can't they? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue16724] Define `binary data` representation in Python

2012-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Isn't such a definition already present in the top-level paragraphs? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16724

[issue16718] Mysterious atexit fail

2012-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Infortunately, the behaviour is the same in 2.7 and 3.2, and only changes with 3.3, which means that this is probably related to the new implementation of the import system. This won't be backported. [It would be interesting to understand why

[issue16718] Mysterious atexit fail

2012-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: OK, found the difference between 3.2 and 3.3: The ImportError exception is still alive when atexit handlers are called, with its __traceback__, and all local variables in Python frames. And since 3.3 the import system is built with Python functions

[issue16718] Mysterious atexit fail

2012-12-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: See issue812369 for the shutdown procedure and modules cleanup. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16718

[issue16710] json encode/decode error

2012-12-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Unlike Python dictionaries, keys of Json objects are always strings. There is a note in the documentation: http://docs.python.org/2/library/json.html#json.dumps -- nosy: +amaury.forgeotdarc resolution: - invalid status: open - closed

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