[issue17933] test_ftp failure / ftplib error formatting issue

2013-07-18 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I think raise URLError('ftp error: %s' % reason) from reason is just fine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17933 ___

[issue17933] test_ftp failure / ftplib error formatting issue

2013-07-18 Thread Rock Lee
Rock Lee added the comment: Yes, the simplest fix is just replace '%d' to '%s'. Line 2362 and 2374 all need to modify. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17933 ___

[issue18492] Add test.support.regrtest_run flag, simplify support.requires

2013-07-18 Thread Zachary Ware
New submission from Zachary Ware: Here's a patch to implement the idea I posted in issue18258, msg193242. The patch also removes usage of support.use_resources = ['resource'] from the test package since it is no longer needed. (No test_main - unittest.main conversions are done in this patch;

[issue18258] Fix test discovery for test_codecmaps*.py

2013-07-18 Thread Zachary Ware
Zachary Ware added the comment: Done, issue18492. I'll submit and updated patch here when (if :)) that one is applied. I'm also looking into adding resource handling to unittest itself and it is going pretty well; I hope to have a patch ready for review for that soon. --

[issue17214] http.client.HTTPConnection.putrequest encode error

2013-07-18 Thread Lars Ivarsson
Lars Ivarsson added the comment: The problem isn't the original requested url, as it is legit. The problem appears after the 302 redirect when a new (malformed) url is received from the server. There need to be some kind of check of the validity of that second url. And, preferably, an

[issue18493] make profile-opt fails with pre-existing python2.7 in path

2013-07-18 Thread Claudio Freire
New submission from Claudio Freire: When building with --enable-shared in an environment that already has a python2.7 (and I'd expect the same to happen to 3.x), make profile-opt fails because it attempts to load the existing libpython instead of the just-built one. run_profile_task should

[issue18492] Add test.support.regrtest_run flag, simplify support.requires

2013-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think we should accept anything if not running under regrtest, We can unintentionally run a testfile in which some tests consume a lot of resources. Also we need in skipping this tests for the test testing. I think it will be better just add a

[issue18494] PyType_GenericSet/GetDict functions misnamed in docs?

2013-07-18 Thread Wolf Ihlenfeldt
New submission from Wolf Ihlenfeldt: Are the names of functions PyType_GenericSetDict and -GetDict correctly documented (for 3.3.2), or should they be documented as PyObject_GenericGet/SetDict instead? The PyType-prefixed names are out of place in the section, and functions of these names not

[issue18491] Add exe wrapper functionality to Windows launcher

2013-07-18 Thread Jeremy Kloth
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com: -- nosy: +jkloth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18491 ___ ___

[issue18408] Fixes crashes found by pyfailmalloc

2013-07-18 Thread Stefan Behnel
Stefan Behnel added the comment: This test from lxml's ElementTree test suite crashes for me now when run against (c)ElementTree: def test_parser_target_error_in_start(self): assertEqual = self.assertEqual events = [] class Target(object): def

[issue16611] multiple problems with Cookie.py

2013-07-18 Thread Julien Phalip
Julien Phalip added the comment: Thank you for the feedback. I've updated the patch to compile the regular expression at load time. -- Added file: http://bugs.python.org/file30969/cookies-httponly-secure-2.diff ___ Python tracker

[issue18496] mingw: setup exclude termios module

2013-07-18 Thread Roumen Petrov
New submission from Roumen Petrov: Split of issue3871 - part for build of core modules. -- components: Build files: 0008-MINGW-setup-exclude-termios-module.patch keywords: patch messages: 193319 nosy: rpetrov priority: normal severity: normal status: open title: mingw: setup exclude

[issue18497] mingw: setup _multiprocessing module

2013-07-18 Thread Roumen Petrov
New submission from Roumen Petrov: Split of issue3871 - build core modules. -- components: Build files: 0009-MINGW-setup-_multiprocessing-module.patch keywords: patch messages: 193320 nosy: rpetrov priority: normal severity: normal status: open title: mingw: setup _multiprocessing

[issue18498] mingw: setup select module

2013-07-18 Thread Roumen Petrov
New submission from Roumen Petrov: Split of issue3871 - build core modules. -- components: Build files: 0010-MINGW-setup-select-module.patch keywords: patch messages: 193321 nosy: rpetrov priority: normal severity: normal status: open title: mingw: setup select module type: enhancement

[issue18495] mingw: ignore main program for frozen scripts

2013-07-18 Thread Roumen Petrov
New submission from Roumen Petrov: Split of issue3871 - part for build of core modules. -- components: Build files: 0007-MINGW-ignore-main-program-for-frozen-scripts.patch keywords: patch messages: 193318 nosy: rpetrov priority: normal severity: normal status: open title: mingw: ignore

[issue18499] mingw: setup _ctypes module with system libffi

2013-07-18 Thread Roumen Petrov
New submission from Roumen Petrov: enhancement of issue3871 ( build core modules ). Part of issue 3871 is python libffi source for gnu assembler on 32 windows platform. The functionality is same as inlined assembled for MSC. Note python specific libffi customization is not in mainstream libffi

[issue18500] mingw: defect winsock2 and setup _socket module

2013-07-18 Thread Roumen Petrov
New submission from Roumen Petrov: Split of issue3871 (build core modules) - improved winsock detection. Requires NT 5.1+ (wxp). Note if you like python winsock for w2k then please extract from old 'all in one' patch. -- components: Build files:

[issue18408] Fixes crashes found by pyfailmalloc

2013-07-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6ec0e9347dd4 by Victor Stinner in branch 'default': Issue #18408: Fix _elementtree.c, don't call Python function from an expat http://hg.python.org/cpython/rev/6ec0e9347dd4 -- ___ Python tracker

[issue18501] _elementtree.c calls Python callbacks while a Python exception is set

2013-07-18 Thread STINNER Victor
New submission from STINNER Victor: The ElementTree module allows to write a XML parser using Python callbacks. The module relies on the expat library which is implemented in C. Expat calls these Python callbacks, but ElementTree does not check if a Python exception was raised or not.

[issue18501] _elementtree.c calls Python callbacks while a Python exception is set

2013-07-18 Thread STINNER Victor
STINNER Victor added the comment: For the issue #18408, I added assertions in PyEval_EvalFrameEx() and similar functions to exit with an assertion error in debug mode if these functions are called with an exception set: New changeset 48a869a39e2d by Victor Stinner in branch 'default': Issue

[issue18501] _elementtree.c calls Python callbacks while a Python exception is set

2013-07-18 Thread Christian Heimes
Changes by Christian Heimes li...@cheimes.de: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18501 ___ ___

[issue18408] Fixes crashes found by pyfailmalloc

2013-07-18 Thread STINNER Victor
STINNER Victor added the comment: This test from lxml's ElementTree test suite crashes for me now when run against (c)ElementTree: (...) Thanks for the quick report! Are you testing automatically lxml with the Python HEAD? The issue should be fixed by the changeset 6ec0e9347dd4. I also

[issue18501] _elementtree.c calls Python callbacks while a Python exception is set

2013-07-18 Thread Fred L. Drake, Jr.
Changes by Fred L. Drake, Jr. fdr...@gmail.com: -- nosy: +fdrake ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18501 ___ ___ Python-bugs-list

[issue17349] wsgiref.simple_server.demo_app is not PEP-3333 compatible

2013-07-18 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17349 ___ ___

[issue18408] Fixes crashes found by pyfailmalloc

2013-07-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5a6cdc0d7de1 by Victor Stinner in branch 'default': Issue #18501, #18408: Fix expat handlers in pyexpat, don't call Python http://hg.python.org/cpython/rev/5a6cdc0d7de1 -- ___ Python tracker

[issue18501] _elementtree.c calls Python callbacks while a Python exception is set

2013-07-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5a6cdc0d7de1 by Victor Stinner in branch 'default': Issue #18501, #18408: Fix expat handlers in pyexpat, don't call Python http://hg.python.org/cpython/rev/5a6cdc0d7de1 -- nosy: +python-dev ___ Python

[issue18373] implement sys.get/setbyteswarningflag()

2013-07-18 Thread Daniel Holth
Daniel Holth added the comment: Python 3 is supposed to make it easier to do Unicode correctly. str(bytes) does not. I felt strongly enough about that to write this patch. With this feature my library can have control in a way that is much more practical than ensuring a particular flag has

[issue18373] implement sys.get/setbyteswarningflag()

2013-07-18 Thread STINNER Victor
STINNER Victor added the comment: Python 3 is supposed to make it easier to do Unicode correctly. str(bytes) does not. str(bytes) does not make sense, that's why an exception is raised when the -bb command line option is used ;-) -- ___ Python

[issue18502] CDLL does not use same paths as util.find_library

2013-07-18 Thread Steven Johnson
New submission from Steven Johnson: CDLL does not use the same paths as find_library and thus you can *find* a library, but you can't necessarily use it. In my case, I had SDL2 in /usr/local/lib. find_library correctly gets the name, but does not return the path. CDLL apparently does not

[issue17911] Extracting tracebacks does too much work

2013-07-18 Thread Nick Coghlan
Nick Coghlan added the comment: For dis, we introduced a new rich bytecode introspection API. Ditto for inspect.Signature. I think it makes sense to treat this as a completely new traceback introspection API and ignore the low level details of the legacy API. --

[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-07-18 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18264 ___ ___

[issue9177] ssl.read/write on closed socket raises AttributeError

2013-07-18 Thread STINNER Victor
STINNER Victor added the comment: ssl-socket-readwrite-after-close.diff: instead of testing not self._sslobj, I would prefer an explicit self._sslobj is None. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9177

[issue9177] ssl.read/write on closed socket raises AttributeError

2013-07-18 Thread STINNER Victor
STINNER Victor added the comment: The check should be moved into the _checkClosed() method. Example: def _checkClosed(self): io.RawIOBase._checkClosed(self) if self._sslobj is None: raise ValueError(I/O operation on closed SSL socket) --

[issue9177] ssl.read/write on closed socket raises AttributeError

2013-07-18 Thread STINNER Victor
STINNER Victor added the comment: Oops, remove io.RawIOBase._checkClosed(self) from my example (I read socket.py at the same time, SSLSocket inherits from socket, not from RawIOBase). -- ___ Python tracker rep...@bugs.python.org

[issue18408] Fixes crashes found by pyfailmalloc

2013-07-18 Thread STINNER Victor
STINNER Victor added the comment: I created the issue #18488: sqlite: finalize() method of user function may be called with an exception set if a call to step() method failed. -- ___ Python tracker rep...@bugs.python.org

[issue18488] sqlite: finalize() method of user function may be called with an exception set if a call to step() method failed

2013-07-18 Thread STINNER Victor
STINNER Victor added the comment: See also isue #18501, similar issue in ElementTree. I created the issue while working on the issue #18408. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18488

[issue18501] _elementtree.c calls Python callbacks while a Python exception is set

2013-07-18 Thread STINNER Victor
STINNER Victor added the comment: See also the issue #18488, similar issue in sqlite. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18501 ___

[issue18042] Provide enum.unique class decorator

2013-07-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2079a517193b by Ethan Furman in branch 'default': closes issue18042 -- a `unique` decorator is added to enum.py http://hg.python.org/cpython/rev/2079a517193b -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected

[issue18491] Add exe wrapper functionality to Windows launcher

2013-07-18 Thread Vinay Sajip
Vinay Sajip added the comment: My initial comments - seems like a reasonable approach. I think you may need to consider -script.pyw for the GUI case. I will look into it in more detail. I'll add Mark to the nosy list, as the launcher was originally his idea and he might have a view. What

[issue18491] Add exe wrapper functionality to Windows launcher

2013-07-18 Thread Mark Hammond
Mark Hammond added the comment: I don't understand the motivation for this - how will it be used in practice? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18491 ___

[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-07-18 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18264 ___ ___ Python-bugs-list

[issue18491] Add exe wrapper functionality to Windows launcher

2013-07-18 Thread Vinay Sajip
Vinay Sajip added the comment: I don't understand the motivation for this - how will it be used in practice? It allows the launcher to do double duty as an executable launcher for scripts which works in the same way as executable launchers in setuptools-installed scripts. Its use in this

[issue18491] Add exe wrapper functionality to Windows launcher

2013-07-18 Thread Mark Hammond
Mark Hammond added the comment: Obviously I'm missing a little context, but it seems a little wrong for the same launcher to be doing this double-duty. It seems we only want to use the launcher in this way as it already has some of the interesting code we need - but the vast majority of

[issue18480] _elementtree: missing PyType_Ready call

2013-07-18 Thread Eli Bendersky
Eli Bendersky added the comment: LGTM, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18480 ___ ___ Python-bugs-list mailing list

[issue17214] http.client.HTTPConnection.putrequest encode error

2013-07-18 Thread Vajrasky Kok
Vajrasky Kok added the comment: Lars, I see. For the uninitiated, the issue is the original url (containing only ascii character) redirects to the url containing non-ascii characters which upsets urllib. To handle that situation, you can do something like this: - import

<    1   2