[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Amaury Forgeot d7;Arc
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

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Amaury Forgeot d7;Arc
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

[issue9759] GzipFile object should raise ValueError on .read() after .close()

2010-09-03 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : -- stage: -> needs patch ___ Python tracker <http://bugs.python.org/issue9759> ___ ___ Python-bugs-list mailing li

[issue9761] stale .pyc files aren't cleaned out

2010-09-03 Thread Amaury Forgeot d7;Arc
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

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2010-09-03 Thread Amaury Forgeot d7;Arc
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)

[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

2010-09-04 Thread Amaury Forgeot d7;Arc
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

[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-04 Thread Amaury Forgeot d7;Arc
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

[issue9748] .inputrc magic-space breaks interactive mode

2010-09-05 Thread Amaury Forgeot d7;Arc
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

[issue9786] Native TLS support for pthreads

2010-09-07 Thread Amaury Forgeot d7;Arc
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

[issue9748] .inputrc magic-space breaks interactive mode

2010-09-07 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue9748> ___ ___ Python-bugs-list mailing li

[issue9784] _msi.c warnings under 64-bit Windows

2010-09-07 Thread Amaury Forgeot d7;Arc
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

[issue6394] getppid support in os module on Windows

2010-09-07 Thread Amaury Forgeot d7;Arc
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

[issue6394] getppid support in os module on Windows

2010-09-07 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Committed r84601. Thanks for the patch and your perseverance! -- ___ Python tracker <http://bugs.python.org/i

[issue6394] getppid support in os module on Windows

2010-09-07 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pyt

[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

2010-09-07 Thread Amaury Forgeot d7;Arc
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

[issue9797] wrong assumption in pystate.c

2010-09-08 Thread Amaury Forgeot d7;Arc
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.

[issue9812] cPickle segfault with nested dicts in threaded env

2010-09-09 Thread Amaury Forgeot d7;Arc
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

[issue9807] deriving configuration information for different builds with the same prefix

2010-09-09 Thread Amaury Forgeot d7;Arc
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

[issue9804] ascii() does not always join surrogate pairs

2010-09-09 Thread Amaury Forgeot d7;Arc
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

[issue9807] deriving configuration information for different builds with the same prefix

2010-09-09 Thread Amaury Forgeot d7;Arc
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

[issue9752] MSVC Compiler warning in Python\import.c

2010-09-09 Thread Amaury Forgeot d7;Arc
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

[issue9752] MSVC Compiler warning in Python\import.c

2010-09-09 Thread Amaury Forgeot d7;Arc
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

[issue9503] print statement hangs Windows service

2010-09-09 Thread Amaury Forgeot d7;Arc
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

[issue9819] TESTFN_UNICODE and TESTFN_UNDECODABLE

2010-09-10 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : -- assignee: -> haypo nosy: +haypo ___ Python tracker <http://bugs.python.org/issue9819> ___ ___ Python-bugs-lis

[issue4617] SyntaxError when free variable name is also an exception target

2010-09-10 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : -- assignee: -> amaury.forgeotdarc resolution: -> accepted ___ Python tracker <http://bugs.python.org/issue4617> ___ __

[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

2010-09-10 Thread Amaury Forgeot d7;Arc
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.

[issue4617] SyntaxError when free variable name is also an exception target

2010-09-10 Thread Amaury Forgeot d7;Arc
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

[issue9210] remove --with-wctype-functions configure option

2010-09-12 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : -- assignee: -> amaury.forgeotdarc resolution: -> accepted ___ Python tracker <http://bugs.python.org/issue9210> ___ __

[issue9210] remove --with-wctype-functions configure option

2010-09-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Applied in r84752. -- resolution: accepted -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pyt

[issue1294232] Error in metaclass search order

2010-09-13 Thread Amaury Forgeot d7;Arc
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

[issue9835] ZipFile unix external attributes incorrect for entry written with writestr

2010-09-14 Thread Amaury Forgeot d7;Arc
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

[issue6839] zipfile can't extract file

2010-09-14 Thread Amaury Forgeot d7;Arc
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

[issue9808] Implement os.getlogin on Windows

2010-09-14 Thread Amaury Forgeot d7;Arc
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

[issue9880] Python 2.7 Won't Build: SystemError: unknown opcode

2010-09-16 Thread Amaury Forgeot d7;Arc
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

[issue9880] Python 2.7 Won't Build: SystemError: unknown opcode

2010-09-17 Thread Amaury Forgeot d7;Arc
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

[issue9880] Python 2.7 Won't Build: SystemError: unknown opcode

2010-09-17 Thread Amaury Forgeot d7;Arc
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

[issue9872] `a.b.my_function is not b.my_function` when `a` and `b` are both on `sys.path`

2010-09-17 Thread Amaury Forgeot d7;Arc
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

[issue6627] threading.local() does not work with C-created threads

2010-09-17 Thread Amaury Forgeot d7;Arc
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_

[issue1744752] Newline skipped in "for line in file" for huge file

2010-09-17 Thread Amaury Forgeot d7;Arc
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&#x

[issue1142] code sample showing errors reading large files with py 2.5/3.0

2010-09-17 Thread Amaury Forgeot d7;Arc
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

[issue1672853] Error reading files larger than 4GB

2010-09-17 Thread Amaury Forgeot d7;Arc
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

[issue1451466] reading very large files

2010-09-17 Thread Amaury Forgeot d7;Arc
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

[issue6627] threading.local() does not work with C-created threads

2010-09-17 Thread Amaury Forgeot d7;Arc
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

[issue6627] threading.local() does not work with C-created threads

2010-09-17 Thread Amaury Forgeot d7;Arc
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

[issue1706323] Updated ASTVisitor Classes

2010-09-17 Thread Amaury Forgeot d7;Arc
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

[issue1730136] tkFont.__eq__ gives type error

2010-09-17 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Fixed in r84865. -- nosy: +amaury.forgeotdarc resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.or

[issue9898] cProfile.runctx doesn't allow sort argument

2010-09-19 Thread Amaury Forgeot d7;Arc
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

[issue9901] GIL destruction can fail

2010-09-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: looks similar to issue1856 -- ___ Python tracker <http://bugs.python.org/issue9901> ___ ___ Python-bugs-list m

[issue1838] Ctypes C-level infinite recursion

2010-09-20 Thread Amaury Forgeot d7;Arc
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

[issue2016] Crash when modifying the **kwargs passed to a function.

2010-09-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The fix was applied to trunk before the creation of the 2.7 branch. There is nothing to backport -- status: open -> closed ___ Python tracker <http://bugs.python.or

[issue2091] file accepts 'rU+' as a mode

2010-09-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Of course, the implementation is now in the io module: Modules/_io/_iomodule.c *and* Lib/_pyio.py -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/i

[issue9898] cProfile.runctx doesn't allow sort argument

2010-09-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: yes, as you can see in the diffs, it's already in 3.2alpha2. -- ___ Python tracker <http://bugs.python.

[issue1953] Compact int and float freelists

2010-09-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The remarks above haven't been addressed. The feature is OK, but the patch is not yet perfect. -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.

[issue9862] PIPE_BUF is invalid on AIX

2010-09-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Removing select.PIPE_BUF does not seem a good idea to me because this breaks compatibility. I suggest to simply set it to 512 on AIX. (An ideal solution would be to really determine the actual buffer size in ./configure; this is probably ove

[issue9912] Fail when vsvarsall.bat produces stderr

2010-09-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: A non-empty stderr does not mean that a command failed. For example, the Microsoft compiler "cl.exe" prints the version string to stderr. -- nosy: +amaury.forgeotdarc ___ Python

[issue1962] ctypes feature request: Automatic type conversion of input arguments to C functions

2010-09-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I don't think this should happen by default. but what the user wants is already possible, by using the from_param() method. For example, the AutoStrParam type converts everything to a string (and a char*): from ctypes import * class Au

[issue9912] Fail when vsvarsall.bat produces stderr

2010-09-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: yes, displaying the stderr content is a good idea. -- stage: -> needs patch ___ Python tracker <http://bugs.python.or

[issue1962] ctypes feature request: Automatic type conversion of input arguments to C functions

2010-09-21 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : Removed file: http://bugs.python.org/file18958/unnamed ___ Python tracker <http://bugs.python.org/issue1962> ___ ___ Python-bugs-l

[issue1962] ctypes feature request: Automatic type conversion of input arguments to C functions

2010-09-21 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : -- nosy: -BreamoreBoy ___ Python tracker <http://bugs.python.org/issue1962> ___ ___ Python-bugs-list mailing list Unsubsc

[issue1962] ctypes feature request: Automatic type conversion of input arguments to C functions

2010-09-21 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : -- Removed message: http://bugs.python.org/msg117111 ___ Python tracker <http://bugs.python.org/issue1962> ___ ___ Pytho

[issue9919] gdbinit lineno result is one line in excess

2010-09-22 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Can you show an example which shows an incorrect lineno? -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/i

[issue9919] gdbinit lineno result is one line in excess

2010-09-22 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: OK, I reproduce the issue. It is now clear to me as well that r39492 was slightly wrong: the replacement of "break" should avoid to execute the end of the loop. The following patch fixes the issue for me, can someone with better gdb kno

[issue1257] atexit errors should result in nonzero exit code

2010-09-22 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: exit code = 128 + # of failed atexits I don't agree with the feature. Do we need something so complex? -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.

[issue9808] Implement os.getlogin on Windows

2010-09-22 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The patch looks good. -- ___ Python tracker <http://bugs.python.org/issue9808> ___ ___ Python-bugs-list mailing list

[issue9890] Visual C++ Runtime Library Error is there a fix?

2010-09-23 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Can you try to open a Command Prompt and type (with the quotes): "C:\Program Files\Python\python.exe" "C:\Program Files\Python\Lib\idle\idle.py" Do you see error messages? --

[issue9905] subprocess.Popen fails with stdout=PIPE, stderr=PIPE if standard descriptors (0, 1, 2) are closed.

2010-09-23 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: issue6610 looks very similar. issue9074 may also be related. -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/i

[issue9888] int overflow in datetime causes seg fault from datetime.ctime()

2010-09-23 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: yes, this was fixed by issue7150. -- nosy: +amaury.forgeotdarc resolution: -> out of date status: open -> closed superseder: -> datetime operations spanning MINYEAR give bad results ___ Python

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The _multiprocessing module already have similar objects. _multiprocessing.Connection is based on file descriptors (and initialized with the result of os.pipe()) _multiprocessing.PipeConnection uses Windows named pipes. --

[issue9940] Strange error reporting with "with" statement

2010-09-24 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Of course, you get the same error with: >>> f = open('foo', 'wb') >>> x, y = f Traceback (most recent call last): File "", line 1, in IOError: File not open for reading i.e. the tuple

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-24 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: With CPython, even objects that don't change see their reference counter modified quite frequently, just by looking at them. What kind of memory would you mark this way? -- nosy: +amaury.f

[issue9915] speeding up sorting with a key

2010-09-24 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > the random data you run in interpreter 1 won't be the same data > you run in interpreter 2 what about adding a simple "random.seed(12345)" -- nosy: +amaury.forgeotdarc ___

[issue9784] _msi.c warnings under 64-bit Windows

2010-09-24 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Which "SDK Example" are you referring to? I could not find any example. -- ___ Python tracker <http://bugs.py

[issue9958] (c)elementTree missing children

2010-09-27 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The given script yields an item on a "start" event; but the element may not be fully populated at this point. please read http://docs.python.org/library/xml.etree.elementtree.html#xml.etree.ElementTree.iterparse You should use the "

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

2010-09-27 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: the OP is right: str.upper is supposed to be locale-dependent http://docs.python.org/library/stdtypes.html#str.upper But the implementation uses _toupper() which is a macro with Visual Studio, and obviously not locale-dependent: #define _toupper(

[issue9518] PyModuleDef_HEAD_INIT does not explicitly initialize all fields of m_base

2010-09-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: the patch looks OK, but out of curiosity: do you really declare all the fields of a PyTypeObject? This structure is really designed so that newer members are left at the end; most types don't need to initialize them, C standard ensures that th

[issue7346] Redirected stdout fires [Errno 9]

2010-09-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Yes, mingw uses a different C runtime (msvcrt.dll) than Python (msvcr90.dll), so file descriptors are completely different and this causes the error. I can see two solutions: - Use the same compiler as python26; I've also heard about a wa

[issue7938] makesetup interprets macros -DA=B as a Make variable definition

2010-09-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: "man sh" does not list [[:alpha:]]* as an accepted pattern. This is a glob pattern, not a regular expression. While the proposed patch may work for some environments, we should find a more compatible way. Maybe a new case "

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: +1 from me as well. But shouldn't PyUnicode_AsWideCharString() merge surrogate pairs when it can? The implementation doesn't do this. -- nosy: +amaury.forgeotdarc ___ Python tracker <http

[issue10000] mark more tests as CPython specific

2010-09-30 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc : When porting pypy to 2.7, we found that many tests actually exercise features specific to CPython, either the garbage collector, or the precise memory layout (__sizeof__). They should be marked as such, and skipped when run with

[issue10009] Automated MSI installation does not work

2010-10-01 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc : >From an old post on python-dev: 2010/08/04 Paul Kippes: > For the most part, the information at > http://www.python.org/download/releases/2.4/msi/ assisted me with > automating a 2.7 installation on Windows XP.  The following initial &

[issue1195571] simple callback system for Py_FatalError

2010-10-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Here is a new patch; I lifted the pre-Py_Initialize() restriction, because it seems to me that a wxPython application, for example, could use it. A wxPython application is not embedded, but it already often redirects stdout and even installs a seg

[issue1195571] simple callback system for Py_FatalError

2010-10-01 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : Added file: http://bugs.python.org/file19096/fatalhook-2.patch ___ Python tracker <http://bugs.python.org/issue1195571> ___ ___

[issue1195571] simple callback system for Py_FatalError

2010-10-01 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : Removed file: http://bugs.python.org/file19096/fatalhook-2.patch ___ Python tracker <http://bugs.python.org/issue1195571> ___ ___

[issue1195571] simple callback system for Py_FatalError

2010-10-01 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : Added file: http://bugs.python.org/file19098/fatalhook-2.patch ___ Python tracker <http://bugs.python.org/issue1195571> ___ ___

[issue6691] Support for nested classes and function for pyclbr

2010-10-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Too late for version 2. I updated patch for 3.2, and tried to improve the documentation a little bit. -- nosy: +amaury.forgeotdarc versions: -Python 2.7, Python 3.1 Added file: http://bugs.python.org/file19100/pyclbr_nested_objects-py3k.

[issue6612] 'import site' fails when called from an unlinked directory

2010-10-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: A unit test is needed. Not to check the code, but to ensure that we don't break it in the future. -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.

[issue1767933] Badly formed XML using etree and utf-16

2010-10-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Python 3.1 improves the situation, the file looks more like utf-16, except that the BOM ("\xff\xfe") is repeated all the time, probably on every internal call to file.write(). Here is a test script that should work on both 2.7 and 3.1.

[issue8792] Support Apache extensions to XML-RPC in xmlrpclib

2010-10-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: It's easy enough to subclass the Transport type and add custom types to the dispatcher object, see the script below. Attila, Bhargav, is this solution acceptable to you? from xmlrpclib import Transport, ServerProxy class MyTransport

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-10-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Martin, what do you think about this kind of changes? Are there possible regressions or incompatibilities? -- nosy: +amaury.forgeotdarc, loewis ___ Python tracker <http://bugs.python.org/i

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-10-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Thanks for the confirmation! -- resolution: -> accepted ___ Python tracker <http://bugs.python.org/issue9369> ___

[issue10019] json.dumps with indent = 0 not adding newlines

2010-10-03 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The C encoder should not be used when indent=0. Here is a patch+test for 2.7. Note that json.dump (into a file object) already correctly emit newlines. -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file

[issue10026] xml.dom.pulldom strange behavior

2010-10-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Please read http://docs.python.org/library/xml.etree.elementtree.html?highlight=elementtree#xml.etree.ElementTree.iterparse At START_ELEMENT, the element is not guaranteed to be fully populated; you should handle the END_ELEMENT event instead.

[issue10026] xml.dom.pulldom strange behavior

2010-10-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Yes, sax parsers may split CHARACTER events. See also the discussion: http://www.mail-archive.com/xml-...@python.org/msg00234.html Again, the END_ELEMENT event is guaranteed to return the complete

[issue4872] Python will not co-exist with MFC (memory leak)

2010-10-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: - The "memory leaks" are reported in the IDE output window when the process exits; this lists all non deallocated blocks of memory. This feature is not enabled by default. Creating a CString probably initializes this feature. - Py_Fin

[issue9060] Python/dup2.c doesn't compile on (at least) newlib

2010-10-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > but Python 2.x doesn't appear to actually bother > to compile dup2.c even if the system lacks dup2 Is it sure? The file configure.in has the same command in both versions: AC_REPLACE_FUNCS(dup2 getcwd strdup) Added the #include

[issue9017] doctest option flag to enable/disable some chunk of doctests?

2010-10-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: There is already doctest.SKIP. Isn't it already what you want? -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.

[issue2892] improve cElementTree iterparse error handling

2010-10-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: If it's a regression, it should be fixed in some 2.7.x release Is there a patch somewhere? -- nosy: +amaury.forgeotdarc stage: -> needs patch ___ Python tracker <http://bugs.pyth

[issue4487] Add utf8 alias for email charsets

2010-10-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: David, can this issue be closed? -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/i

[issue2982] more tests for pyexpat

2010-10-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Adapted patch for py3k and applied in r85239. Maciek, if you have another tests for error handling, please open a new issue. -- nosy: +amaury.forgeotdarc resolution: -> fixed status: open -> closed ___

[issue9017] doctest option flag to enable/disable some chunk of doctests?

2010-10-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I'm not a great doctest user, but did you try to disable the SKIP directive at the end? something like "doctest: -SKIP" -- ___ Python tracker <http://bu

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