[issue20210] Provide configure options to enable/disable Python modules and extensions

2014-01-09 Thread Thomas Petazzoni
Changes by Thomas Petazzoni : Added file: http://bugs.python.org/file33390/0011-Add-an-option-to-disable-unicodedata.patch ___ Python tracker ___ ___

[issue19077] More robust TemporaryDirectory cleanup

2014-01-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note the finalize-based patch can only work on 3.4. -- nosy: +pitrou ___ Python tracker ___ ___ Pyth

[issue19077] More robust TemporaryDirectory cleanup

2014-01-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a working patch for the finalize-based approach. -- Added file: http://bugs.python.org/file33392/tempdir_finalize.patch ___ Python tracker _

[issue20211] setup.py: do not add invalid header locations

2014-01-09 Thread Thomas Petazzoni
New submission from Thomas Petazzoni: In the cross-compilation case, setup.py incorrectly adds /usr/include to self.compiler.include_dirs, and results in the following invalid compilation line: /home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc -fPIC -Wno-unused-re

[issue20212] distutils: fix build_ext check to find whether we're building Python or not

2014-01-09 Thread Thomas Petazzoni
New submission from Thomas Petazzoni: The build_ext logic uses sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")) to determine whether we're building a third-party Python extension, or a built-in Python extension. However, this check is wrong in cross-compilation mode, because the

[issue20213] Change the install location of _sysconfigdata.py

2014-01-09 Thread Thomas Petazzoni
New submission from Thomas Petazzoni: The _sysconfigdata.py module contains definitions that are needed when building Python modules. In cross-compilation mode, when building Python extensions for the target, we need to use the _sysconfigdata.py of the target Python while executing the host Py

[issue20207] Disable SSLv2 in Python 2.x

2014-01-09 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue9924] sqlite3 SELECT does not BEGIN a transaction, but should according to spec

2014-01-09 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list ma

[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1f3242fb0c9c by Brett Cannon in branch 'default': Issue #20152: import.c now uses Argument Clinic. http://hg.python.org/cpython/rev/1f3242fb0c9c -- nosy: +python-dev ___ Python tracker

[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-01-09 Thread Brett Cannon
Brett Cannon added the comment: Now it's: Modules/cmathmodule.c: 8 sites Modules/cjkcodecs/multibytecodec.c: 8 sites Modules/arraymodule.c: 8 sites Modules/pyexpat.c: 7 sites Modules/fcntlmodule.c: 7 sites Modules/pwdmodule.c: 2 sites Modules/spwdmodule.c: 1 sites

[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-01-09 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: larry -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue20012] Re: Allow Path.relative_to() to accept non-ancestor paths

2014-01-09 Thread Alexander Boyd
Alexander Boyd added the comment: Then perhaps the docstring of relative_to could note this (like relpath does), or a separate method that's explicitly not symlink safe created. Or better yet, what about a function that does (or at least tries to) give the correct answer in the face of symlink

[issue20214] Argument Clinic rollup fixes

2014-01-09 Thread Larry Hastings
New submission from Larry Hastings: Miscellaneous Argument Clinic fixes: * Added default value type verification for almost all return converters. * Added return converters for float, dobule, unsigned long, unsigned int, short, and unsigned short. * Py_buffer converter improvements:

[issue20200] Argument Clinic howto: custom self_converter example broken

2014-01-09 Thread Larry Hastings
Larry Hastings added the comment: LGTM. Check it in please! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20201] Argument Clinic: rwbuffer support broken

2014-01-09 Thread Larry Hastings
Larry Hastings added the comment: LGTM. To be honest I don't understand what the hell 'w*' is for. -- ___ Python tracker ___ ___ Pyth

[issue20202] ArgumentClinic howto: document change in Py_buffer lifecycle management

2014-01-09 Thread Larry Hastings
Larry Hastings added the comment: I've got a bunch of doc improvements in the rollup patch in #20214. I invite you to give it a review. If that looks suitable please close this issue. As for a verb, I've been using "convert". "zlibmodule has already been converted to work with Argument Clin

[issue20203] ArgumentClinic: support middle optional argument

2014-01-09 Thread Larry Hastings
Larry Hastings added the comment: Oh . socket.sendto can't currently be converted to Argument Clinic. There's legacy, and then there's the cruelty that only 1993-style argument parsing can inflict. (socket.sendto's argument parsing was checked in in revision ac3c80abbf43 from 1993 by Guido.

[issue20122] Move CallTips tests to idle_tests

2014-01-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: The existing tests in CallTips.py, half of which I wrote based on the ones that existed, have one or two deficiencies that are copied in the patch. First, they are not proper unittests. They test get_argspec indirectly by calling .fetch_tip and get_entity. Thi

[issue20196] Argument Clinic generates invalid code for optional parameter

2014-01-09 Thread Larry Hastings
Changes by Larry Hastings : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue20196] Argument Clinic generates invalid code for optional parameter

2014-01-09 Thread Larry Hastings
Larry Hastings added the comment: Here's a fix. Works for me, let me know if it works for you. -- Added file: http://bugs.python.org/file33397/larry.zero.positional.parameters.patch.1.txt ___ Python tracker _

[issue19976] Argument Clinic: generate second arg for METH_NOARGS

2014-01-09 Thread Larry Hastings
Changes by Larry Hastings : -- assignee: -> larry resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue20215] Python2.7 socketserver can not listen IPv6 address

2014-01-09 Thread dzyu
New submission from dzyu: I see, in python 2.7, in SocketServer.py the TCPServer implementation is hard-coded to use ipv4, can not handle IPv6 case. it hard-coded set address_family as socket.AF_INET. so when binding IPv6 host, it will throw "gaierror: [Errno -9] Address family for hostname no

[issue20174] Derby #5: Convert 50 sites to Argument Clinic across 3 files

2014-01-09 Thread Larry Hastings
Larry Hastings added the comment: While it's dandy to add docstrings, your patch doesn't have any Argument Clinic stuff in it. I don't mind if you add docstrings as part of the process of converting to Argument Clinic, but I'm not interested in this patch as it stands. -- __

[issue16630] IDLE: Calltip fails if __getattr__ raises exception

2014-01-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Get_entity already has try-except to block exceptions propagating from eval failure, so wrapping it is redundant. We only need worry about get_argspec. I presume the failure is in get_argspec in the remote process: if hasattr(ob, '__call__'): This can be re

[issue7883] CallTips.py _find_constructor does not work

2014-01-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: The 3.x changes will not affect 2.7, which currently still uses _find_constructor. I suspect the .__func__ is needed for old-style classes, but I will try to check. -- versions: +Python 3.4 -Python 3.2 ___ Python tr

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-09 Thread Larry Hastings
Larry Hastings added the comment: That METH_O is working perfectly. You seem to be confused by it. The original code was kind of dumb. The function only takes two parameters: self, and a second "obj" parameter which can be any kind of object. CPython has special support for exactly this kin

[issue20216] Misleading docs for sha1, sha256, sha512 modules

2014-01-09 Thread Vajrasky Kok
New submission from Vajrasky Kok: Misleading doc number 1: >>> import _sha1 >>> _sha1.sha1.__doc__ 'Return a new SHA1 hash object; optionally initialized with a string.' >>> _sha1.sha1('cutecat') Traceback (most recent call last): File "", line 1, in TypeError: Unicode-objects must be encoded

[issue20215] Python2.7 socketserver can not listen IPv6 address

2014-01-09 Thread R. David Murray
R. David Murray added the comment: The *default* is AF_INET. If you are requesting a more convenient API than subclassing (which for IPV6 support I think would be a reasonable request), that would be a new feature. -- nosy: +r.david.murray type: behavior -> enhancement versions: +Pyth

[issue20175] Derby #6: Convert 50 sites to Argument Clinic across 8 files

2014-01-09 Thread Larry Hastings
Larry Hastings added the comment: Oops, sorry kbk. -- assignee: kbk -> nosy: -kbk ___ Python tracker ___ ___ Python-bugs-list mailin

[issue20175] Derby #6: Convert 50 sites to Argument Clinic across 8 files

2014-01-09 Thread Larry Hastings
Larry Hastings added the comment: Go for it! That's weird. Why can't I assign it to you? Have you not signed and submitted a Python contributor agreement? -- assignee: -> kbk nosy: +kbk ___ Python tracker

[issue20190] dict() in dict(foo='bar').keys() raises

2014-01-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I think the problem is that the API of dict.keys() is surprising. > One gets back something that behaves like a list, the name 'keys' > suggests that it is a list and for lists there is no requirement > that their containing items need to be hasheable. The

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: But METH_O makes the update method does not work. >>> _sha1.sha1().update(b'a') Traceback (most recent call last): File "", line 1, in SystemError: new style getargs format but argument is not a tuple But if you change METH_O to METH_VARARGS, it works again. I

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-09 Thread Larry Hastings
Larry Hastings added the comment: Right, it doesn't work because you left the PyArg_ParseTuple call in your impl function. Remove that and it should work. Rule 1: Argument Clinic handles all argument parsing for you. Your "impl" function should never call PyArg_ParseTuple or PyArg_ParseTuple

[issue20216] Misleading docs for sha1, sha256, sha512, md5 modules

2014-01-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: Added md5 module to this ticket. -- title: Misleading docs for sha1, sha256, sha512 modules -> Misleading docs for sha1, sha256, sha512, md5 modules Added file: http://bugs.python.org/file33399/fix_doc_sha_module_v2.patch

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: This is the current behaviour of sha1 constructor. It rejects None value. >>> import _sha1 >>> _sha1.sha1() <_sha1.sha1 object at 0x7f7fa7f0dea0> >>> _sha1.sha1(None) Traceback (most recent call last): File "", line 1, in TypeError: object supporting the buffer

[issue20200] Argument Clinic howto: custom self_converter example broken

2014-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5a8301002f5a by Zachary Ware in branch 'default': Closes #20200: Argument Clinic custom converter example should be in a http://hg.python.org/cpython/rev/5a8301002f5a -- nosy: +python-dev resolution: -> fixed stage: patch review -> committe

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: >Rule 1: Argument Clinic handles all argument parsing for you. Your "impl" >function should never call PyArg_ParseTuple or PyArg_ParseTupleAndKeywords. Ah, got it. Here is the third patch. Everything works fine except for the issue whether sha1 constructor shou

[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)

2014-01-09 Thread Zachary Ware
Zachary Ware added the comment: Thanks, Larry. Conversion proceeds apace in winreg.c, but I have a couple questions. 1) Since the comment above CConverter.format_unit says all custom converters should use 'O&' instead of defining format_unit, there must be another way to do this: /*[python

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-09 Thread Ethan Furman
Ethan Furman added the comment: Could somebody explain this? === ethan@media:~/source/python/issue19995_depr$ ./python -W error Python 3.4.0b1 (default:2f81f0e331f6+, Jan 9 2014, 20:30:18) [GCC 4.7.3] on linux Type "hel

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for sha256. It got the same issue as sha1. After being clinic-ed, the constructor accepts None value happily. -- Added file: http://bugs.python.org/file33401/clinic_sha256module.patch ___ Python track

<    1   2