From report at bugs.python.org Thu Nov 1 00:26:15 2012 From: report at bugs.python.org (=?utf-8?q?Michael_Gr=C3=BCnewald?=) Date: Wed, 31 Oct 2012 23:26:15 +0000 Subject: [issue16374] ConfigParser: Passing a semicolon as a value In-Reply-To: <1351695710.99.0.421343064251.issue16374@psf.upfronthosting.co.za> Message-ID: <1351725975.48.0.560535488304.issue16374@psf.upfronthosting.co.za> Michael Gr?newald added the comment: Cannot reproduce that with Ubuntu 12.04. Python 2.7 returned ";" under both Windows 7 and Ubuntu 12.04. Can you verify that there was no space before the semicolon? Otherwise the semicolon gets treated as the beginning of an inline comment. ---------- nosy: +michaelgruenewald _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 00:47:03 2012 From: report at bugs.python.org (Berker Peksag) Date: Wed, 31 Oct 2012 23:47:03 +0000 Subject: [issue16374] ConfigParser: Passing a semicolon as a value In-Reply-To: <1351695710.99.0.421343064251.issue16374@psf.upfronthosting.co.za> Message-ID: <1351727223.01.0.686336133581.issue16374@psf.upfronthosting.co.za> Berker Peksag added the comment: > Cannot reproduce that with Ubuntu 12.04. +1. Attached a reproducer. ---------- nosy: +berker.peksag Added file: http://bugs.python.org/file27819/reproducer.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 00:49:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Oct 2012 23:49:46 +0000 Subject: [issue16366] _handleError not very informative In-Reply-To: <1351627229.78.0.21301171659.issue16366@psf.upfronthosting.co.za> Message-ID: <3XsR9P3ZMDzPNp@mail.python.org> Roundup Robot added the comment: New changeset d7b868cdd9bb by Vinay Sajip in branch 'default': Closes #16366: Improve diagnostics from handleError(). Thanks to Antoine Pitrou for the suggestion. http://hg.python.org/cpython/rev/d7b868cdd9bb ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 01:26:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 01 Nov 2012 00:26:49 +0000 Subject: [issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback In-Reply-To: <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za> Message-ID: <3XsS083xjgzM6L@mail.python.org> Roundup Robot added the comment: New changeset fbfaef0a9c00 by Benjamin Peterson in branch 'default': point errors related to nonlocals and globals to the statement declaring them (closes #10189) http://hg.python.org/cpython/rev/fbfaef0a9c00 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 05:10:24 2012 From: report at bugs.python.org (Bradley Froehle) Date: Thu, 01 Nov 2012 04:10:24 +0000 Subject: [issue16378] venv.EnvBuilder docstring inconsistencies Message-ID: <1351743024.49.0.854763959686.issue16378@psf.upfronthosting.co.za> New submission from Bradley Froehle: Consider the docstring for venv.EnvBuilder:: By default, the builder makes the system (global) site-packages dir available to the created environment. By default, the creation process uses symlinks wherever possible. It seems to suggest that the `system_site_packages` and `symlink` parameters both default to True, even though the default values for each are False. The docstring for venv.create is similarly misleading. ---------- assignee: docs at python components: Documentation messages: 174388 nosy: bfroehle, docs at python priority: normal severity: normal status: open title: venv.EnvBuilder docstring inconsistencies versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 05:18:41 2012 From: report at bugs.python.org (Bradley Froehle) Date: Thu, 01 Nov 2012 04:18:41 +0000 Subject: [issue14803] Add feature to allow code execution prior to __main__ invocation In-Reply-To: <1336981419.55.0.280530546632.issue14803@psf.upfronthosting.co.za> Message-ID: <1351743521.59.0.581693972627.issue14803@psf.upfronthosting.co.za> Changes by Bradley Froehle : ---------- nosy: +bfroehle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 06:07:35 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 01 Nov 2012 05:07:35 +0000 Subject: [issue16373] Recursion error comparing set() and collections.Set instances In-Reply-To: <1351694000.44.0.179883669733.issue16373@psf.upfronthosting.co.za> Message-ID: <1351746455.57.0.943204873807.issue16373@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 06:08:15 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 01 Nov 2012 05:08:15 +0000 Subject: [issue8743] set() operators don't work with collections.Set instances In-Reply-To: <1274122246.37.0.692277131409.issue8743@psf.upfronthosting.co.za> Message-ID: <1351746495.85.0.929397287233.issue8743@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: stutzbach -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 06:12:50 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 01 Nov 2012 05:12:50 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351746770.95.0.467356437968.issue16344@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm going to close this one. It *really* would need a PEP before going forward. There are many issues to consider: being able to google for an exception message, doctest issues, maintainability issues, etc. ---------- nosy: +rhettinger resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 06:18:26 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 01 Nov 2012 05:18:26 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351747106.84.0.569229338695.issue16344@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The text is now correct and matches the spec: http://speleotrove.com/decimal/daops.html#refremnear The doctests should be expanded to show all of the examples listed in that document: remainder-near(?2.1?, ?3?) ==> ?-0.9? remainder-near(?10?, ?6?) ==> ?-2? remainder-near(?10?, ?3?) ==> ?1? remainder-near(?-10?, ?3?) ==> ?-1? remainder-near(?10.2?, ?1?) ==> ?0.2? remainder-near(?10?, ?0.3?) ==> ?0.1? remainder-near(?3.6?, ?1.3?) ==> ?-0.3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 06:48:07 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 01 Nov 2012 05:48:07 +0000 Subject: [issue16344] Traceback Internationalization Proposal In-Reply-To: <1351407457.67.0.14897287706.issue16344@psf.upfronthosting.co.za> Message-ID: <1351748887.34.0.220297652849.issue16344@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Raymond, did you mean to send that to another issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 07:39:46 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 01 Nov 2012 06:39:46 +0000 Subject: [issue16378] venv.EnvBuilder docstring inconsistencies In-Reply-To: <1351743024.49.0.854763959686.issue16378@psf.upfronthosting.co.za> Message-ID: <1351751986.34.0.509937271598.issue16378@psf.upfronthosting.co.za> ?ric Araujo added the comment: Tagging for the bug day. ---------- keywords: +easy nosy: +eric.araujo, vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 07:42:22 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 01 Nov 2012 06:42:22 +0000 Subject: [issue15873] "datetime" cannot parse ISO 8601 dates and times In-Reply-To: <1346965730.56.0.810546720554.issue15873@psf.upfronthosting.co.za> Message-ID: <1351752142.28.0.381324178646.issue15873@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 08:15:25 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 01 Nov 2012 07:15:25 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1351706395.33.0.744400978394.issue13701@psf.upfronthosting.co.za> Message-ID: Ramchandra Apte added the comment: On 31 October 2012 23:29, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > Fixed the unuse of decorator syntax. I think the dummy_threading changes > should be considered a separate issue. > > With regards to the patch: I assume you mean "import dummy_threading as > threading" rather than just "import dummy_threading". Also, it looks to me > as though test_decimal would need updating too to do the correct thing when > the threading module isn't present. > > Closing this issue as fixed; please open a new issue for the > dummy_threading if you think it's worth pursuing. > > ---------- > assignee: rhettinger -> mark.dickinson > resolution: -> fixed > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > In the docs for dummy_threading, "Be careful to not use this module where deadlock might occur from a thread being created that blocks waiting for another thread to be created. This often occurs with blocking I/O." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 09:39:41 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Nov 2012 08:39:41 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351759181.11.0.389925683462.issue13701@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'm not quite sure why you're quoting the docs at me. What's the point you want to make? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 11:14:38 2012 From: report at bugs.python.org (Torsten Landschoff) Date: Thu, 01 Nov 2012 10:14:38 +0000 Subject: [issue16379] SQLite error code not exposed to python Message-ID: <1351764878.68.0.13361347428.issue16379@psf.upfronthosting.co.za> New submission from Torsten Landschoff: The sqlite3 module does not expose the sqlite3 error codes to python. This makes it impossible to detect specific error conditions directly. Case in point: If a user selects some random file as the database in our application, we can not detect that it is not a valid database file: $ /opt/python3/bin/python3 Python 3.4.0a0 (default:2d6eec5d01f7, Nov 1 2012, 10:47:27) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> conn = sqlite3.connect("/etc/passwd") >>> from pprint import pprint >>> try: ... conn.execute("select * from random_table") ... except Exception as e: ... pprint({name: getattr(e, name) for name in dir(e)}) ... raise ... {'__cause__': None, '__class__': , '__context__': None, '__delattr__': , '__dict__': {}, '__dir__': , '__doc__': None, '__eq__': , '__format__': , '__ge__': , '__getattribute__': , '__gt__': , '__hash__': , '__init__': , '__le__': , '__lt__': , '__module__': 'sqlite3', '__ne__': , '__new__': , '__reduce__': , '__reduce_ex__': , '__repr__': , '__setattr__': , '__setstate__': , '__sizeof__': , '__str__': , '__subclasshook__': , '__suppress_context__': False, '__traceback__': , '__weakref__': None, 'args': ('file is encrypted or is not a database',), 'with_traceback': } Traceback (most recent call last): File "", line 2, in sqlite3.DatabaseError: file is encrypted or is not a database >>> Currently, one can only match the error message, with is bad programming style. The error code for this error is SQLITE_NOTADB, as found in the function sqlite3ErrStr when searching for the message in SQLite's main.c at http://www.sqlite.org/src/artifact/02255cf1da50956c5427c469abddb15bccc4ba09 Unfortunately, the sqlite3 module does not expose the error code itself (neither the actual error code nor the defined error codes) in any way. Errors are handled in Modules/_sqlite/util.c: http://hg.python.org/cpython/file/2d6eec5d01f7/Modules/_sqlite/util.c#l99 I would like to have the defined error codes available in some mapping inside the sqlite3 module as well as the actual error code inside every sqlite exception e as e.sqlite_errcode ---------- components: Library (Lib) messages: 174395 nosy: torsten priority: normal severity: normal status: open title: SQLite error code not exposed to python type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 11:22:41 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Nov 2012 10:22:41 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1351765361.86.0.108557393033.issue16248@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ramchandra: can you give an example of a realistic situation where the existence of this code in tkinter allows users to execute code *that they wouldn't be able to execute otherwise*? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 11:41:27 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 01 Nov 2012 10:41:27 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1351766487.38.0.432511295946.issue11566@psf.upfronthosting.co.za> Martin v. L?wis added the comment: In general, including standard library headers before including Python.h is not recommended, since it may break binary compatibility across object files. So the proposed work-around may also cause harm. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 12:25:10 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 01 Nov 2012 11:25:10 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1351759181.11.0.389925683462.issue13701@psf.upfronthosting.co.za> Message-ID: Ramchandra Apte added the comment: On 1 November 2012 14:09, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > I'm not quite sure why you're quoting the docs at me. What's the point > you want to make? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > Does decimal use the dummy_threading module where deadlock might occur from a thread being created that blocks waiting for another thread to be created? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 12:31:58 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 01 Nov 2012 11:31:58 +0000 Subject: [issue16373] Recursion error comparing set() and collections.Set instances In-Reply-To: <1351694000.44.0.179883669733.issue16373@psf.upfronthosting.co.za> Message-ID: <3Xskld429DzPn8@mail.python.org> Roundup Robot added the comment: New changeset 8e95a078d490 by Andrew Svetlov in branch '3.2': Issue #16373: Prevent infinite recursion for ABC Set class operations. http://hg.python.org/cpython/rev/8e95a078d490 New changeset 11a9297733b8 by Andrew Svetlov in branch '3.3': Merge issue #16373: Prevent infinite recursion for ABC Set class operations. http://hg.python.org/cpython/rev/11a9297733b8 New changeset e67c8803cd82 by Andrew Svetlov in branch 'default': Merge issue #16373: Prevent infinite recursion for ABC Set class operations. http://hg.python.org/cpython/rev/e67c8803cd82 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 12:33:03 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 11:33:03 +0000 Subject: [issue16373] Recursion error comparing set() and collections.Set instances In-Reply-To: <1351694000.44.0.179883669733.issue16373@psf.upfronthosting.co.za> Message-ID: <1351769583.63.0.214035311781.issue16373@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks, Serhiy. ---------- nosy: +asvetlov resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 12:36:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 11:36:19 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1351769779.53.0.952900976972.issue16248@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 12:36:28 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Nov 2012 11:36:28 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351769788.29.0.809978761811.issue13701@psf.upfronthosting.co.za> Mark Dickinson added the comment: No. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 12:42:27 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 01 Nov 2012 11:42:27 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: Message-ID: <20121101114228.GA6012@sleipnir.bytereef.org> Stefan Krah added the comment: Ramchandra Apte wrote: > > I'm not quite sure why you're quoting the docs at me. What's the point > > you want to make? > > Does decimal use the dummy_threading module where > deadlock might occur from a thread being created that blocks waiting for > another thread to be created? The modus operandi on the issue tracker is generally like this: For finished modules like decimal you need to provide a concrete example that triggers an alleged misbehavior. The reason is simple: In general no one has time for open-ended questions like the one you asked. Also, such questions are perfectly on-topic on python-list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 12:51:57 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 11:51:57 +0000 Subject: [issue16261] Fix bare excepts in various places in std lib In-Reply-To: <1350461165.29.0.129000928595.issue16261@psf.upfronthosting.co.za> Message-ID: <1351770717.28.0.759692778259.issue16261@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I'm pretty sure Doc and Lib are already fixed, only Tools left. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 12:58:47 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 11:58:47 +0000 Subject: [issue7317] Display full tracebacks when an error occurs asynchronously In-Reply-To: <1258140215.22.0.835793798885.issue7317@psf.upfronthosting.co.za> Message-ID: <1351771127.48.0.0943127792977.issue7317@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 13:04:42 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 12:04:42 +0000 Subject: [issue14965] super() and property inheritance behavior In-Reply-To: <1338433441.66.0.975494137492.issue14965@psf.upfronthosting.co.za> Message-ID: <1351771482.3.0.964786237598.issue14965@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I'm -0 for proposed changes, these changes reduce code readability from my perspective. I think better to use existing approach: explicitly specify what do you want to do with overloaded properties. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 13:06:30 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 12:06:30 +0000 Subject: [issue14266] pyunit script as shorthand for python -m unittest In-Reply-To: <1331586037.12.0.876793471383.issue14266@psf.upfronthosting.co.za> Message-ID: <1351771590.43.0.564724829679.issue14266@psf.upfronthosting.co.za> Andrew Svetlov added the comment: +1 for both pyunit script and autodiscovering by default. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 13:26:01 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 01 Nov 2012 12:26:01 +0000 Subject: [issue16261] Fix bare excepts in various places in std lib In-Reply-To: <1351770717.28.0.759692778259.issue16261@psf.upfronthosting.co.za> Message-ID: Ramchandra Apte added the comment: On 1 November 2012 17:21, Andrew Svetlov wrote: > > Andrew Svetlov added the comment: > > I'm pretty sure Doc and Lib are already fixed, only Tools left. > > ---------- > nosy: +asvetlov > > _______________________________________ > Python tracker > > _______________________________________ > No. 405 are there in Lib. Try running `grep "except:" -R Lib --include "*.py"` to see yourself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 13:26:59 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 01 Nov 2012 12:26:59 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <20121101114228.GA6012@sleipnir.bytereef.org> Message-ID: Ramchandra Apte added the comment: On 1 November 2012 17:12, Stefan Krah wrote: > > Stefan Krah added the comment: > > Ramchandra Apte wrote: > > > I'm not quite sure why you're quoting the docs at me. What's the point > > > you want to make? > > > > Does decimal use the dummy_threading module where > > deadlock might occur from a thread being created that blocks waiting for > > another thread to be created? > > The modus operandi on the issue tracker is generally like this: > > For finished modules like decimal you need to provide a concrete example > that triggers an alleged misbehavior. The reason is simple: In general > no one has time for open-ended questions like the one you asked. > > Also, such questions are perfectly on-topic on python-list. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > I just wanted to ensure that there wouldn't be any bugs by my patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 13:52:16 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 01 Nov 2012 12:52:16 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <3XsmXH1pqJzPg5@mail.python.org> Roundup Robot added the comment: New changeset 02d25098ad57 by Andrew Svetlov in branch '3.3': Issue #16218: Support non ascii characters in python launcher. http://hg.python.org/cpython/rev/02d25098ad57 New changeset 1267d64c14b3 by Andrew Svetlov in branch 'default': Merge issue #16218: Support non ascii characters in python launcher. http://hg.python.org/cpython/rev/1267d64c14b3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 13:52:51 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 12:52:51 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351774371.09.0.759149996304.issue16218@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks, Serhiy. ---------- nosy: +asvetlov resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 14:02:35 2012 From: report at bugs.python.org (abcdef) Date: Thu, 01 Nov 2012 13:02:35 +0000 Subject: [issue16380] true/proper subset Message-ID: <1351774954.98.0.350778906182.issue16380@psf.upfronthosting.co.za> New submission from abcdef: The documentation http://docs.python.org/2.7/library/stdtypes.html#set-types-set-frozenset http://docs.python.org/3/library/stdtypes.html#set-types-set-frozenset of "<" for sets uses "true subset" and "true superset". The correct termininology is "proper subset" and "proper superset", as evidenced by Google searches http://google.com/search?q="true subset" http://google.com/search?q="proper subset" and most set theory books. ---------- assignee: docs at python components: Documentation messages: 174410 nosy: abcdef, docs at python priority: normal severity: normal status: open title: true/proper subset type: enhancement versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 14:12:49 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Nov 2012 13:12:49 +0000 Subject: [issue16380] true/proper subset In-Reply-To: <1351774954.98.0.350778906182.issue16380@psf.upfronthosting.co.za> Message-ID: <1351775569.74.0.910619667707.issue16380@psf.upfronthosting.co.za> Mark Dickinson added the comment: +1 ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 14:13:11 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 13:13:11 +0000 Subject: [issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions. In-Reply-To: <1350641726.57.0.22505418852.issue16284@psf.upfronthosting.co.za> Message-ID: <1351775591.45.0.942709363751.issue16284@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Updated patch to execute tests only for CPython. ---------- nosy: +asvetlov Added file: http://bugs.python.org/file27820/kill_reference_3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 14:15:04 2012 From: report at bugs.python.org (Christian Theune) Date: Thu, 01 Nov 2012 13:15:04 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors Message-ID: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> New submission from Christian Theune: I run long-running server processes (web apps, etc) a lot and I keep encountering the situation that many applications will not properly deal with MemoryError exceptions but end up in an unusable state. >From an operational perspective I wish the process in this case would just fail and exit. I talked to Guido about this general idea at EuroPython2012 and he encouraged me to look into this. Here's a patch: https://bitbucket.org/ctheune/cpython/changeset/323bb572344d46df669d3dbec4431cf6720fc5b4 I think it does what I want it to do, but a) my C knowledge is really bad and b) I'm not sure whether this is the right approach anyway. I'd appreciate feedback and possibly inclusion in the core. ---------- components: Interpreter Core hgrepos: 158 messages: 174413 nosy: ctheune, gvanrossum priority: normal severity: normal status: open title: Introduce option to force the interpreter to exit upon MemoryErrors type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 14:15:58 2012 From: report at bugs.python.org (Christian Theune) Date: Thu, 01 Nov 2012 13:15:58 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351775758.52.0.1496450191.issue16381@psf.upfronthosting.co.za> Changes by Christian Theune : ---------- keywords: +patch Added file: http://bugs.python.org/file27821/9430a5c65114.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 14:19:46 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 13:19:46 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1350208578.8.0.440875886805.issue16228@psf.upfronthosting.co.za> Message-ID: <1351775986.63.0.881605468567.issue16228@psf.upfronthosting.co.za> Andrew Svetlov added the comment: The patch LGTM except I cannot reproduce crash on unmodified sources with running applied test. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 14:20:28 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 13:20:28 +0000 Subject: [issue16230] select.select crashes on resized lists In-Reply-To: <1350211036.55.0.523850963705.issue16230@psf.upfronthosting.co.za> Message-ID: <1351776028.87.0.219707186212.issue16230@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 14:23:24 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 13:23:24 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351776204.55.0.552811171416.issue1207589@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 14:26:09 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 01 Nov 2012 13:26:09 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351776369.44.0.811810147113.issue16381@psf.upfronthosting.co.za> Christian Heimes added the comment: Your proposal sounds like a very good idea. IMHO it should be discussed on the python-ideas or python-dev mailing list before it gets integrated into 3.4. Embrace yourself for some serious bike shedding! :) By the way your patch contains several changes that aren't related to your proposal. Can you clean up your patch, please? It makes code review much easier. ---------- nosy: +christian.heimes stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 14:27:15 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Nov 2012 13:27:15 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351776435.32.0.261910224635.issue13701@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I just wanted to ensure that there wouldn't be any bugs by my patch. Okay, understood. Thanks. Please note that this issue is now closed, though: the 2.3 compatibility workarounds have been dealt with. The use or non-use of dummy_threading has nothing to do with 2.3 compatibility and so is out of scope for the issue. You should feel free to open a new issue if there's a demonstrable problem or demonstrable room for improvement w.r.t. the way dummy threading is handled. (I'm personally not convinced that either of those is true, but others may have different views.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 14:34:51 2012 From: report at bugs.python.org (Matt Selsky) Date: Thu, 01 Nov 2012 13:34:51 +0000 Subject: [issue9742] Python 2.7: math module fails to build on Solaris 9 In-Reply-To: <1283438135.42.0.361314007633.issue9742@psf.upfronthosting.co.za> Message-ID: <1351776891.82.0.959764866272.issue9742@psf.upfronthosting.co.za> Matt Selsky added the comment: I tested this patch again python 2.7.3 on Solaris 9 and the math module now builds correctly. Thanks! Let me know if you need any output. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 14:42:14 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 01 Nov 2012 13:42:14 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351777334.24.0.0546527816133.issue13701@psf.upfronthosting.co.za> Ramchandra Apte added the comment: But my patch does use dummy_threading. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 14:48:18 2012 From: report at bugs.python.org (Christian Theune) Date: Thu, 01 Nov 2012 13:48:18 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351777698.39.0.12733550373.issue16381@psf.upfronthosting.co.za> Christian Theune added the comment: Grr. Sorry. The automatic patch extraction went wrong and I didn't notice. Here's a manual try. ---------- Added file: http://bugs.python.org/file27822/issue16381.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 14:52:06 2012 From: report at bugs.python.org (Christian Theune) Date: Thu, 01 Nov 2012 13:52:06 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351777926.17.0.472356382889.issue16381@psf.upfronthosting.co.za> Changes by Christian Theune : Removed file: http://bugs.python.org/file27821/9430a5c65114.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 15:09:21 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 01 Nov 2012 14:09:21 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1351778961.48.0.358120666003.issue16248@psf.upfronthosting.co.za> Ramchandra Apte added the comment: @Mark Dickinson Run the attached file, exploit.py, with normal priveleges and then run IDLE with sudo (something I did to actually uncover this bug!). Then the file "/root/exploited" should contain "Exploit succeeded!" ---------- Added file: http://bugs.python.org/file27823/exploit.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 15:16:46 2012 From: report at bugs.python.org (Phil Elson) Date: Thu, 01 Nov 2012 14:16:46 +0000 Subject: [issue16382] Better warnings exception for bad category Message-ID: <1351779406.35.0.0813926106632.issue16382@psf.upfronthosting.co.za> New submission from Phil Elson: When passing an invalid Warning subclasses to the warnings.warn function, a bare issubclass exception is raised: >>> import warnings >>> warnings.warn('hello world', 'not a valid warning type') Traceback (most recent call last): File "", line 1, in TypeError: issubclass() arg 1 must be a class This exception is consistent accross both Python/_warnings.c and Lib/warnings.py implementations, but I feel it could be more helpful/explicit about the nature problem. To test both cases I have been using the following code (python3.4): >>> import test.support >>> py_warnings = test.warnings = test.support.import_fresh_module('warnings', blocked=['_warnings']) >>> c_warnings = test.support.import_fresh_module('warnings', fresh=['_warnings']) Now: >>> py_warnings.warn('hello world', '') Traceback (most recent call last): File "", line 1, in File "lib/python3.4/warnings.py", line 168, in warn assert issubclass(category, Warning) TypeError: issubclass() arg 1 must be a class >>> c_warnings.warn('hello world', '') Traceback (most recent call last): File "", line 1, in TypeError: issubclass() arg 1 must be a class Additionally, there is a difference in the denotational semantics of None between the c and py warnings implementation: >>> py_warnings.warn('Hello world', None) __main__:1: UserWarning: Hello world >>> c_warnings.warn('Hello world', None) Traceback (most recent call last): File "", line 1, in TypeError: issubclass() arg 1 must be a class I can understand that python does not allow the concept of an optional positional arguments and therefore it is arguable that the signatures of the two functions are inevitably going to be different. I defer to someone more knowledgeable in Python to decide if this is a problem, and whether it should be made consistent. Attached is a patch to address these two issues, with associated tests. Please review (n.b. I am a python developer at heart, and only dabble in C when I have to, so extra scrutiny on the C would be valuable to me) and I'd be happy to get any necessary changed applied to the patch asap. In short, as a result of applying this patch, the following results ensue: >>> py_warnings.warn('hello world', '') Traceback (most recent call last): File "", line 1, in File "lib/python3.4/warnings.py", line 175, in warn 'Got {!r}'.format(Warning, category)) from None ValueError: category must be a subclass of .Got '' >>> c_warnings.warn('hello world', '') Traceback (most recent call last): File "", line 1, in ValueError: category must be a subclass of . Got ''. >>> >>> c_warnings.warn('hello world', None) __main__:1: UserWarning: hello world Thanks! ---------- components: Library (Lib) files: pelson_warnings_fix.diff keywords: patch messages: 174421 nosy: pelson priority: normal severity: normal status: open title: Better warnings exception for bad category type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file27824/pelson_warnings_fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 15:48:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 14:48:07 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1350208578.8.0.440875886805.issue16228@psf.upfronthosting.co.za> Message-ID: <1351781287.98.0.128921606429.issue16228@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Of course, this kind of bugs can cause unpredictable behavior, they do not have to lead to an immediate crash. This depends from the platform, the compiler and its options. On my computers the test always crashed, this is the maximum that I can say. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 16:35:21 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 01 Nov 2012 15:35:21 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351784121.7.0.750807986042.issue16381@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks! Py_FatalError() might be too drastic for the task. It calls abort() which kills the process with SIGABRT. The function closes and flushes all stream but no additional cleanup code is executed. This might be bad for resources like shared memories, named semaphores or database connections. On Windows abort() causes a pop up window with a crash report, too. Would exit(3) or _exit(2) work here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 16:36:48 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 01 Nov 2012 15:36:48 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351784208.5.0.908969975785.issue16381@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think the fatal erroring should be done in PyErr_NoMemory. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 17:07:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 16:07:27 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <1351786047.05.0.685569590428.issue16165@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27490/sched_unblock.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 17:09:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 16:09:14 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <1351786154.82.0.920648509619.issue16165@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tests added. Please review. ---------- keywords: +needs review Added file: http://bugs.python.org/file27825/sched_unblock_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 17:12:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 16:12:40 +0000 Subject: [issue16215] Possible double memory free in str.replace In-Reply-To: <1350081232.49.0.0151935995631.issue16215@psf.upfronthosting.co.za> Message-ID: <1351786360.12.0.431800355184.issue16215@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please review. ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 17:16:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 16:16:44 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <1351786604.41.0.137058844137.issue16165@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27825/sched_unblock_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 17:17:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 16:17:18 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <1351786638.87.0.341213521069.issue16165@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file27826/sched_unblock_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 17:23:15 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 01 Nov 2012 16:23:15 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351786995.1.0.0225844945119.issue16218@psf.upfronthosting.co.za> Vinay Sajip added the comment: I'm not especially familiar with this code, but just trying to understand - how come filename_obj isn't decref'd on normal exit? ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 17:27:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 16:27:01 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <1351787221.71.0.506590452393.issue10182@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please review. ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 17:28:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 16:28:07 +0000 Subject: [issue16245] Update html.entities.html5 dictionary and parseentities.py In-Reply-To: <1350380511.49.0.860998010837.issue16245@psf.upfronthosting.co.za> Message-ID: <1351787287.61.0.447692170883.issue16245@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: -serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 17:29:57 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Nov 2012 16:29:57 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1351787397.61.0.0805017327557.issue16248@psf.upfronthosting.co.za> Mark Dickinson added the comment: Okay, but if a user can run IDLE with sudo, they presumably *already* have many other ways to use sudo to create files in /root, without using IDLE or tkinter. That's why I said: "*that they wouldn't be able to execute otherwise*". I don't see the security issue here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 17:37:00 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 16:37:00 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351787820.8.0.627402640523.issue16218@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Vinay, it's processed in PyObject_CallFunction(loader_type, "sN", "__main__", filename_obj) Please note "sN" format istead "sO". "N" means PyObject* is passed but unlike "sO" that object is not increfed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 17:42:20 2012 From: report at bugs.python.org (Arne Babenhauserheide) Date: Thu, 01 Nov 2012 16:42:20 +0000 Subject: [issue14900] cProfile does not take its result headers as sort arguments In-Reply-To: <1337869163.57.0.920578910684.issue14900@psf.upfronthosting.co.za> Message-ID: <1351788140.75.0.737723491903.issue14900@psf.upfronthosting.co.za> Arne Babenhauserheide added the comment: ?you were faster than me (I only managed to get the repo onto my current computer yesterday and the children kept me occupied). Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 17:51:45 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 16:51:45 +0000 Subject: [issue14900] cProfile does not take its result headers as sort arguments In-Reply-To: <1337869163.57.0.920578910684.issue14900@psf.upfronthosting.co.za> Message-ID: <1351788705.48.0.0186297399077.issue14900@psf.upfronthosting.co.za> Andrew Svetlov added the comment: No problems! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 18:15:31 2012 From: report at bugs.python.org (Santoso Wijaya) Date: Thu, 01 Nov 2012 17:15:31 +0000 Subject: [issue16376] wrong type for wintypes.BYTE In-Reply-To: <1351702975.6.0.783969996516.issue16376@psf.upfronthosting.co.za> Message-ID: <1351790131.49.0.241300010578.issue16376@psf.upfronthosting.co.za> Changes by Santoso Wijaya : ---------- versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 18:15:41 2012 From: report at bugs.python.org (Santoso Wijaya) Date: Thu, 01 Nov 2012 17:15:41 +0000 Subject: [issue16376] wrong type for wintypes.BYTE In-Reply-To: <1351702975.6.0.783969996516.issue16376@psf.upfronthosting.co.za> Message-ID: <1351790141.36.0.0785134476594.issue16376@psf.upfronthosting.co.za> Changes by Santoso Wijaya : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 18:21:44 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 01 Nov 2012 17:21:44 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351790504.22.0.670530934168.issue16218@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Please note "sN" format istead "sO". I see. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 18:28:43 2012 From: report at bugs.python.org (Jim Pattee) Date: Thu, 01 Nov 2012 17:28:43 +0000 Subject: [issue16383] Python 3.3 Permission Error with User Library on Windows Message-ID: <1351790923.15.0.230780432409.issue16383@psf.upfronthosting.co.za> New submission from Jim Pattee: Python 3.3 Permission Error with User Library on Windows I have certain scripts that run without error on Python 2.7 and 3.2. With Python 3.3 they get a "Permission Error". This does not occur with every script. The difference seems to be that the ones with a problem use a local user library. The ones without a local library are OK. A test case is attached. Do not change the directory names. Double click on the file run_test.bat to run. You may need to change the path to the Python executable on your computer. It runs the script astyle_protected.py which uses the library libastyle.py. It runs OK with Python 2.7 and 3.2. But gets an exception with Python 3.3. ---------- components: Windows files: Projects.zip messages: 174434 nosy: jimp02 priority: normal severity: normal status: open title: Python 3.3 Permission Error with User Library on Windows type: crash versions: Python 3.3 Added file: http://bugs.python.org/file27827/Projects.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 18:55:03 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 01 Nov 2012 17:55:03 +0000 Subject: [issue13701] Remove Decimal Python 2.3 Compatibility In-Reply-To: <1325559706.07.0.31676641509.issue13701@psf.upfronthosting.co.za> Message-ID: <1351792503.93.0.538026013034.issue13701@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Ramchandra: Your patch wasn't actually used to resolve this issue. Please see http://hg.python.org/cpython/rev/7ada0faded9b for the change that Mark *actually* made to resolve the issue. There were actually a number of problems with your patch, but there is little point in elaborating them. If you submit more patches, people will surely review them and comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 19:05:34 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Nov 2012 18:05:34 +0000 Subject: [issue16382] Better warnings exception for bad category In-Reply-To: <1351779406.35.0.0813926106632.issue16382@psf.upfronthosting.co.za> Message-ID: <1351793134.43.0.419515816913.issue16382@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 19:29:17 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 01 Nov 2012 18:29:17 +0000 Subject: [issue16383] Python 3.3 Permission Error with User Library on Windows In-Reply-To: <1351790923.15.0.230780432409.issue16383@psf.upfronthosting.co.za> Message-ID: <1351794557.48.0.463859783853.issue16383@psf.upfronthosting.co.za> R. David Murray added the comment: Can you post the error, please? ---------- nosy: +r.david.murray type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 19:36:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 18:36:41 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <1351795001.03.0.888560851771.issue15872@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a new patch. It contains some other minor changes. rmtree behavior unified for system with and without at-functions. ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file27828/shutil_rmtree_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 19:49:18 2012 From: report at bugs.python.org (kirpit) Date: Thu, 01 Nov 2012 18:49:18 +0000 Subject: [issue15873] "datetime" cannot parse ISO 8601 dates and times In-Reply-To: <1346965730.56.0.810546720554.issue15873@psf.upfronthosting.co.za> Message-ID: <1351795758.53.0.203299855384.issue15873@psf.upfronthosting.co.za> Changes by kirpit : ---------- nosy: +kirpit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 19:56:19 2012 From: report at bugs.python.org (Sye van der Veen) Date: Thu, 01 Nov 2012 18:56:19 +0000 Subject: [issue16384] import.c doesn't handle EOFError from PyMarshal_Read* Message-ID: <1351796179.35.0.165892579115.issue16384@psf.upfronthosting.co.za> New submission from Sye van der Veen: The PyMarshal_Read* functions raise EOFError when the end of the file is unexpectedly met. The current import.c functions propagate this error when reading .pyc or .pyo files. One consequence of this is that Python will abort on startup if, say, encodings.utf_8's .pyc file is truncated. I have encountered a scenario where this truncation is common. If a second Python process is launched while the first is writing the "core" .pyc files, the second process may open the files before they are completely written and will thus see truncated files and abort. This is a race condition that I was able to reproduce consistently on several Windows Server 2008 RC2 Standard SP1 machines running 32-bit Python 3.2.3 from GNU make with "-j 16" (Intel Xeon E5405 2GHz 2 processors 8GB 64-bit OS). (Of course, I had to clean the __pycache__ directories between tests.) This can be fixed in load_source_module by making read_compiled_module failures non-fatal: if (cpathname != NULL && (fpc = check_compiled_module(pathname, st.st_mtime, cpathname))) { co = read_compiled_module(cpathname, fpc); if (co == NULL) PyErr_Clear(); fclose(fpc); } if (co != NULL) { // etc... } else { co = parse_source_module(pathname, fp); // etc... write_compiled_module(co, cpathname, &st); } This is similar to how write_compiled_module ignores failures in writing the .pyc files. It ensures that if the .pyc file is corrupt for _any_ reason, it will get rewritten; this could be made specific to EOFError, but I don't recommed that. Mostly, it ensures that corrupt .pyc files do not prevent Python from loading if the .py files are valid. ---------- components: None messages: 174438 nosy: syeberman priority: normal severity: normal status: open title: import.c doesn't handle EOFError from PyMarshal_Read* type: crash versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:04:06 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 01 Nov 2012 19:04:06 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1350208578.8.0.440875886805.issue16228@psf.upfronthosting.co.za> Message-ID: <3XswnL0kRtzPWM@mail.python.org> Roundup Robot added the comment: New changeset 3672db224eb3 by Antoine Pitrou in branch '3.2': Issue #16228: Fix a crash in the json module where a list changes size while it is being encoded. http://hg.python.org/cpython/rev/3672db224eb3 New changeset 7528c02b8d52 by Antoine Pitrou in branch '3.3': Issue #16228: Fix a crash in the json module where a list changes size while it is being encoded. http://hg.python.org/cpython/rev/7528c02b8d52 New changeset ab65509b8443 by Antoine Pitrou in branch 'default': Issue #16228: Fix a crash in the json module where a list changes size while it is being encoded. http://hg.python.org/cpython/rev/ab65509b8443 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:06:05 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 01 Nov 2012 19:06:05 +0000 Subject: [issue15067] Clean up the sqlite3 docs In-Reply-To: <1339687148.5.0.0456329910944.issue15067@psf.upfronthosting.co.za> Message-ID: <1351796765.71.0.512139916111.issue15067@psf.upfronthosting.co.za> Zachary Ware added the comment: Coming back to this 5 months later and looking into it myself, I find that the sqlite3 docs really need a bit of a cleanup all around, especially in all three 3.x branches. Several minor changes were made by Raymond Hettinger in d229032dc213 and a few subsequent changesets 6 months ago in the 2.7 branch, but none of those ever made it to 3.x. (Raymond, those changes in the past are why I made you nosy on this one) To address the offending sentence that brought this issue about in the first place, after rereading it and thinking about it some more, what's there does make sense: this module uses the recipe of PEP 246, regardless of that PEP's status. However, I don't think it's helpful to mention it in the documentation, as it kind of gives the impression that "this feature was rejected for the whole of Python, but this stdlib module goes ahead and does it anyway." For that reason, I propose to just drop that two-line paragraph entirely. Everything about that feature still makes sense without that paragraph, even though the 'protocol' bit seems a bit weird. I wonder though, should that feature be deprecated on the basis of using a rejected PEP as well as TOOWTDI violation (or should I open another issue to that effect anyway)? In the same vein as Raymond's earlier 2.7 changes (namely the SQL cleanup and capitalization he did), the 2.7 patch I've attached goes through and does the same for all of the included scripts in Doc/includes/sqlite3 as well as removing the bit about PEP 246. The 3.2 patch does everything in the 2.7 patch, plus bringing the 3.2 docs in line with the 2.7 docs. I do have a question, though; the footnote about enabling loadable extensions is different in the 2.7 and 3.2 docs. Which one is right, or are both right for their respective versions? Thanks, Zach ---------- keywords: +patch nosy: +rhettinger title: sqlite3 docs reference PEP 246, which was rejected -> Clean up the sqlite3 docs versions: +Python 3.4 Added file: http://bugs.python.org/file27829/sqlite3_cleanup_2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:06:37 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 01 Nov 2012 19:06:37 +0000 Subject: [issue15067] Clean up the sqlite3 docs In-Reply-To: <1339687148.5.0.0456329910944.issue15067@psf.upfronthosting.co.za> Message-ID: <1351796797.62.0.635268926028.issue15067@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file27830/sqlite3_cleanup_3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:08:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 19:08:05 +0000 Subject: [issue16281] TODO in tailmatch(): it does not support backward in all cases In-Reply-To: <1350607883.61.0.918476063498.issue16281@psf.upfronthosting.co.za> Message-ID: <1351796884.99.0.411800236016.issue16281@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The result does not depend on the direction of comparison. This only affects speed. But who can to say in which direction comparison will be faster? Here I see a one obvious opportunity for optimization: if (kind_self < kind_sub) return 0; After that and after processing the case (kind_self == kind_sub) only 3 special cases left: UCS1 in UCS2, UCS1 in UCS4, and UCS2 in UCS4. Get rid of slow PyUnicode_READ() for this cases will speed up the code. Also note that comparing first and last characters before memcmp can be a slowdown (because PyUnicode_READ() is slow). Try to compare first and last bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:08:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 01 Nov 2012 19:08:20 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1350208578.8.0.440875886805.issue16228@psf.upfronthosting.co.za> Message-ID: <3XswtC3xnbzPZD@mail.python.org> Roundup Robot added the comment: New changeset 33ae62a4ecf5 by Antoine Pitrou in branch '2.7': Issue #16228: Fix a crash in the json module where a list changes size while it is being encoded. http://hg.python.org/cpython/rev/33ae62a4ecf5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:08:54 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Nov 2012 19:08:54 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1350208578.8.0.440875886805.issue16228@psf.upfronthosting.co.za> Message-ID: <1351796934.51.0.503707579006.issue16228@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you for noticing this, and for writing a patch. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:10:56 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 01 Nov 2012 19:10:56 +0000 Subject: [issue15067] Clean up the sqlite3 docs In-Reply-To: <1339687148.5.0.0456329910944.issue15067@psf.upfronthosting.co.za> Message-ID: <1351797056.62.0.566241616286.issue15067@psf.upfronthosting.co.za> Zachary Ware added the comment: I failed to mention, the 3.2 patch also removes the line (and comment) about "db_row based solutions" since it seems from a quick Google search that "db_row" is a library created back in the 2.2 days that I didn't quickly see a 3.x version for. Also, the comment made it seem like that line wouldn't be missed too much anyway :). I left it in the 2.7 version though; as I assume it would be reasonably easy to get db_row to work with 2.7 if someone wanted to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:18:54 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 01 Nov 2012 19:18:54 +0000 Subject: [issue14893] Tutorial: Add function annotation example to function tutorial In-Reply-To: <1337802155.15.0.316800230533.issue14893@psf.upfronthosting.co.za> Message-ID: <1351797534.9.0.380087022442.issue14893@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:19:10 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 19:19:10 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1350208578.8.0.440875886805.issue16228@psf.upfronthosting.co.za> Message-ID: <1351797550.14.0.623737975996.issue16228@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Hi, I'm ok with patch but I guess to add some comment in C code to prevent, hmm, back optimization from upcoming contributor. The same for #16230 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:20:32 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 01 Nov 2012 19:20:32 +0000 Subject: [issue16230] select.select crashes on resized lists In-Reply-To: <1350211036.55.0.523850963705.issue16230@psf.upfronthosting.co.za> Message-ID: <3Xsx8J1VZNzMvX@mail.python.org> Roundup Robot added the comment: New changeset 87ccf2635ad7 by Antoine Pitrou in branch '3.2': Issue #16230: Fix a crash in select.select() when one the lists changes size while iterated on. http://hg.python.org/cpython/rev/87ccf2635ad7 New changeset 717660ec8f67 by Antoine Pitrou in branch '3.3': Issue #16230: Fix a crash in select.select() when one the lists changes size while iterated on. http://hg.python.org/cpython/rev/717660ec8f67 New changeset 823898ef37ce by Antoine Pitrou in branch 'default': Issue #16230: Fix a crash in select.select() when one the lists changes size while iterated on. http://hg.python.org/cpython/rev/823898ef37ce New changeset 02a5322b0cee by Antoine Pitrou in branch '2.7': Issue #16230: Fix a crash in select.select() when one the lists changes size while iterated on. http://hg.python.org/cpython/rev/02a5322b0cee ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:23:50 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Nov 2012 19:23:50 +0000 Subject: [issue16230] select.select crashes on resized lists In-Reply-To: <1350211036.55.0.523850963705.issue16230@psf.upfronthosting.co.za> Message-ID: <1351797830.42.0.723235092059.issue16230@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed, thank you! ---------- nosy: +pitrou resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:28:51 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 01 Nov 2012 19:28:51 +0000 Subject: [issue14893] Tutorial: Add function annotation example to function tutorial In-Reply-To: <1337802155.15.0.316800230533.issue14893@psf.upfronthosting.co.za> Message-ID: <3XsxKt323hzPCN@mail.python.org> Roundup Robot added the comment: New changeset 2bf99322218f by Andrew Svetlov in branch '3.2': Issue #14893: Add function annotation example to function tutorial. http://hg.python.org/cpython/rev/2bf99322218f New changeset 45167091b5f9 by Andrew Svetlov in branch '3.3': Merge issue #14893: Add function annotation example to function tutorial. http://hg.python.org/cpython/rev/45167091b5f9 New changeset 63b495ff366b by Andrew Svetlov in branch 'default': Merge issue #14893: Add function annotation example to function tutorial. http://hg.python.org/cpython/rev/63b495ff366b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:29:34 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 19:29:34 +0000 Subject: [issue14893] Tutorial: Add function annotation example to function tutorial In-Reply-To: <1337802155.15.0.316800230533.issue14893@psf.upfronthosting.co.za> Message-ID: <1351798174.73.0.811753869461.issue14893@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks, Zachary. ---------- nosy: +asvetlov resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:32:41 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 01 Nov 2012 19:32:41 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1351798361.14.0.291306945212.issue16248@psf.upfronthosting.co.za> Zachary Ware added the comment: If I understand correctly, I think what Ramchandra is getting at is that if an attacker could manage to get a .Tk.py file into a user's home directory somehow, then the next time that user happens to do 'sudo idle', the attacker's code is executed with root privileges. That said, I don't know that it would be any easier for an attacker to get such a file into such a place than to just do their maliciousness some other way. I think Guilherme's suggestion of just making those who need it call it themselves, instead of at every tkinter startup, sounds good. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:36:18 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Nov 2012 19:36:18 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1351797550.14.0.623737975996.issue16228@psf.upfronthosting.co.za> Message-ID: <1351798553.3342.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > Hi, I'm ok with patch but I guess to add some comment in C code to > prevent, hmm, back optimization from upcoming contributor. > The same for #16230 But that's what tests are for. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:36:39 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 19:36:39 +0000 Subject: [issue16261] Fix bare excepts in various places in std lib In-Reply-To: <1350461165.29.0.129000928595.issue16261@psf.upfronthosting.co.za> Message-ID: <1351798599.08.0.711901449081.issue16261@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Sorry, looks like I don't understood you correctly. Do you want to replace `except:` to `except Exception` or something else? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:37:28 2012 From: report at bugs.python.org (Jim Pattee) Date: Thu, 01 Nov 2012 19:37:28 +0000 Subject: [issue16383] Python 3.3 Permission Error with User Library on Windows In-Reply-To: <1351790923.15.0.230780432409.issue16383@psf.upfronthosting.co.za> Message-ID: <1351798648.31.0.0413214092798.issue16383@psf.upfronthosting.co.za> Jim Pattee added the comment: Python 3.3 (64bit) Traceback (most recent call last): File "file-py\astyle-protected.py", line 157, in process_files() File "file-py\astyle-protected.py", line 30, in process_files get_header_variables(header_variables, header_path) File "file-py\astyle-protected.py", line 121, in get_header_variables file_in = open(header_path, 'r') PermissionError: [Errno 13] Permission denied: 'C:\\Users\\jimp\\ZPythonPermissionError\\Projects/AStyle/src/astyle.h' Press any key to continue . . . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:38:00 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 19:38:00 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1350208578.8.0.440875886805.issue16228@psf.upfronthosting.co.za> Message-ID: <1351798680.87.0.798323387573.issue16228@psf.upfronthosting.co.za> Andrew Svetlov added the comment: As I said tests was not crashed on my linux 64 bit Ubuntu with buggy code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:42:49 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Nov 2012 19:42:49 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1351798680.87.0.798323387573.issue16228@psf.upfronthosting.co.za> Message-ID: <1351798945.3342.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > As I said tests was not crashed on my linux 64 bit Ubuntu with buggy code. They crashed duly here in debug mode (64-bit Linux). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:48:47 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 01 Nov 2012 19:48:47 +0000 Subject: [issue14893] Tutorial: Add function annotation example to function tutorial In-Reply-To: <1337802155.15.0.316800230533.issue14893@psf.upfronthosting.co.za> Message-ID: <1351799327.6.0.0483494828377.issue14893@psf.upfronthosting.co.za> Zachary Ware added the comment: Thank you ?ric for the approval, and Andrew for the commit! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:50:15 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 01 Nov 2012 19:50:15 +0000 Subject: [issue15067] Clean up the sqlite3 docs In-Reply-To: <1339687148.5.0.0456329910944.issue15067@psf.upfronthosting.co.za> Message-ID: <1351799415.16.0.967357942829.issue15067@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think it would be better to keep the capitalization of the queries separate from the rest of the patch. ---------- nosy: +ezio.melotti stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:50:16 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 19:50:16 +0000 Subject: [issue16380] true/proper subset In-Reply-To: <1351774954.98.0.350778906182.issue16380@psf.upfronthosting.co.za> Message-ID: <1351799416.33.0.59539798683.issue16380@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed in 56c3ab6f7f07, 56c3ab6f7f07, fa7311caa203, 7dda9dc5e830 Thanks. ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:51:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 19:51:17 +0000 Subject: [issue12759] "(?P=)" input for Tools/scripts/redemo.py raises unnhandled exception In-Reply-To: <1313495654.73.0.277709437369.issue12759@psf.upfronthosting.co.za> Message-ID: <1351799477.38.0.702699453631.issue12759@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is an updated patch. More appropriate error message used, many new tests added. ---------- keywords: +patch stage: needs patch -> patch review versions: +Python 3.4 Added file: http://bugs.python.org/file27831/sre_empty_group_name.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:55:34 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Nov 2012 19:55:34 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1351799734.1.0.290662731143.issue16248@psf.upfronthosting.co.za> Antoine Pitrou added the comment: As Zachary and Ramchandra explained, the security issue is obvious: a non-sudoer user A can make a sudoer user B execute arbitrary code, simply by placing a file where IDLE will be run from. This is the same reason Python has -s and -E options. The least we could do would be to disable readprofile() when sys.flags.ignore_environment is true. ---------- nosy: +pitrou versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:57:39 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 19:57:39 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1350208578.8.0.440875886805.issue16228@psf.upfronthosting.co.za> Message-ID: <1351799859.2.0.539592784097.issue16228@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I have python built with Py_DEBUG (./configure --with-pydebug) What I' missed? I'm ok with status quo but just want to understand how to configure my build properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:58:23 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Nov 2012 19:58:23 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1351799903.59.0.729429508865.issue16248@psf.upfronthosting.co.za> Mark Dickinson added the comment: And then user A is relying on user B executing IDLE via sudo? Is that a normal thing to do? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 20:59:57 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Nov 2012 19:59:57 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1351799903.59.0.729429508865.issue16248@psf.upfronthosting.co.za> Message-ID: <1351799973.3342.3.camel@localhost.localdomain> Antoine Pitrou added the comment: > And then user A is relying on user B executing IDLE via sudo? Is that > a normal thing to do? Well, I suppose that could be any Tk app, not just IDLE. And I also suppose you could use IDLE to edit some file that is only root-writable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:01:14 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Nov 2012 20:01:14 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1351800074.84.0.303848544655.issue16248@psf.upfronthosting.co.za> Mark Dickinson added the comment: So if this is a security issue, should Python 2.6 also be fixed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:01:50 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Nov 2012 20:01:50 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1351799859.2.0.539592784097.issue16228@psf.upfronthosting.co.za> Message-ID: <1351800087.3342.5.camel@localhost.localdomain> Antoine Pitrou added the comment: > I have python built with Py_DEBUG (./configure --with-pydebug) > What I' missed? > I'm ok with status quo but just want to understand how to configure my build properly. Well, I don't know. Perhaps a different compiler version, a different libc, or perhaps you got (un)lucky. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:02:24 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Nov 2012 20:02:24 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1351800074.84.0.303848544655.issue16248@psf.upfronthosting.co.za> Message-ID: <1351800121.3342.6.camel@localhost.localdomain> Antoine Pitrou added the comment: > So if this is a security issue, should Python 2.6 also be fixed? Probably, if it's deemed important enough by our security RMs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:03:22 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 20:03:22 +0000 Subject: [issue16228] JSON crashes during encoding resized lists In-Reply-To: <1350208578.8.0.440875886805.issue16228@psf.upfronthosting.co.za> Message-ID: <1351800202.58.0.918192338954.issue16228@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Ok. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:09:11 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 01 Nov 2012 20:09:11 +0000 Subject: [issue16383] Python 3.3 Permission Error with User Library on Windows In-Reply-To: <1351790923.15.0.230780432409.issue16383@psf.upfronthosting.co.za> Message-ID: <1351800551.12.0.724144025876.issue16383@psf.upfronthosting.co.za> R. David Murray added the comment: Is it possible you installed 3.3 differently? For example 3.2 and 2.7 installed for all users and 3.3 for just you, or vice versa? >From the looks of the traceback there really is a permission problem with the file, since it is failing on a normal open. (I thought at first it might be a result of the new import code in 3.3, but it doesn't look like import is involved.) That filename looks awfully odd, though. Is that a cut and paste error or is that really what the message says? If it is you might want to track down how header_path gets constructed and see how it differs when run under the different python versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:18:00 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 01 Nov 2012 20:18:00 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1351801080.77.0.179401829501.issue16248@psf.upfronthosting.co.za> Stefan Krah added the comment: Isn't IDLE supposed to be a Python shell? As I understand this issue, you'd have the same "exploit" by adding this to your .bashrc: echo "EXPLOIT" > /root/exploit Then, as a normal user, run: sudo bash It would be nice to get rid of the exec, but why is this an exploit? ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:18:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 20:18:11 +0000 Subject: [issue13301] the script Tools/i18n/msgfmt.py allows arbitrary code execution via po files In-Reply-To: <1320052696.17.0.926291745102.issue13301@psf.upfronthosting.co.za> Message-ID: <1351801091.42.0.278775284737.issue13301@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a more simpler patch. Please approve, it's a really trivial patch. ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file27832/msgfmt_literal_eval.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:23:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 20:23:43 +0000 Subject: [issue15581] curses: segfault in addstr() In-Reply-To: <1344393356.61.0.716752115095.issue15581@psf.upfronthosting.co.za> Message-ID: <1351801423.88.0.862466296815.issue15581@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +haypo stage: -> needs patch type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:26:37 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Nov 2012 20:26:37 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1351801597.97.0.427429050266.issue16248@psf.upfronthosting.co.za> Antoine Pitrou added the comment: As I understand it, this is not specifically about IDLE. Any Tk app would be vulnerable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:32:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 20:32:10 +0000 Subject: [issue16151] Deferred KeyboardInterrupt in interactive mode In-Reply-To: <1349551962.43.0.949416732292.issue16151@psf.upfronthosting.co.za> Message-ID: <1351801930.34.0.766521068621.issue16151@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Amaury, run the followed commands: import readline, rlcompleter readline.parse_and_bind('tab: complete') Hint: you can add this to your .pythonrc.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:38:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 20:38:08 +0000 Subject: [issue8402] Add a function to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1351802288.25.0.173030615121.issue8402@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: docs at python -> components: -Documentation keywords: +needs review resolution: invalid -> stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:43:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 20:43:12 +0000 Subject: [issue13454] crash when deleting one pair from tee() In-Reply-To: <1321978245.14.0.0332901316698.issue13454@psf.upfronthosting.co.za> Message-ID: <1351802592.05.0.955229583375.issue13454@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please review. ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:43:48 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 20:43:48 +0000 Subject: [issue15114] Deprecate strict mode of HTMLParser In-Reply-To: <1340185371.41.0.609283463083.issue15114@psf.upfronthosting.co.za> Message-ID: <1351802628.26.0.512413041275.issue15114@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: -serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:44:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 20:44:12 +0000 Subject: [issue16076] xml.etree.ElementTree.Element is no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1351802652.1.0.446647372268.issue16076@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: -serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:44:58 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 01 Nov 2012 20:44:58 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <3Xsz1j4PB1zMXv@mail.python.org> Roundup Robot added the comment: New changeset 639dd6e62de4 by Andrew Svetlov in branch '2.7': Issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu http://hg.python.org/cpython/rev/639dd6e62de4 New changeset 66643fcf6ee9 by Andrew Svetlov in branch '3.2': Issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu http://hg.python.org/cpython/rev/66643fcf6ee9 New changeset 3f3b72ab9d65 by Andrew Svetlov in branch '3.3': Merge issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu http://hg.python.org/cpython/rev/3f3b72ab9d65 New changeset e6bf779111a8 by Andrew Svetlov in branch 'default': Merge issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu http://hg.python.org/cpython/rev/e6bf779111a8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:48:13 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 20:48:13 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351802893.35.0.224778087666.issue1207589@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed. Thanks to all. Keeping in mind idlelib is a bit specific part of stdlib which cannot make backward incompatibility I've committed to 2.7, 3.2, 3.3 and 3.4. ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 21:49:42 2012 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 01 Nov 2012 20:49:42 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1351801597.97.0.427429050266.issue16248@psf.upfronthosting.co.za> Message-ID: Guilherme Polo added the comment: It is not IDLE specific. But I still fail to see how this actually is a security bug. It doesn't give more power to the user than the user already gave to it. If you are recklessly installing untrusted libraries or anything for the matter, then you already have a lot of other problems. Anyways, I would still go with my earlier option because I never used this piece of code. 2012/11/1 Antoine Pitrou > > Antoine Pitrou added the comment: > > As I understand it, this is not specifically about IDLE. Any Tk app would > be vulnerable. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 22:17:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 21:17:23 +0000 Subject: [issue14313] zipfile should raise an exception for unsupported compression methods In-Reply-To: <1331786135.76.0.307574406169.issue14313@psf.upfronthosting.co.za> Message-ID: <1351804643.76.0.00289810631877.issue14313@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file25407/zipfile_unsupported_compression.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 22:21:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 21:21:23 +0000 Subject: [issue14313] zipfile should raise an exception for unsupported compression methods In-Reply-To: <1331786135.76.0.307574406169.issue14313@psf.upfronthosting.co.za> Message-ID: <1351804883.5.0.202516891477.issue14313@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: ?ric, this changes already in 3.3 (changeset 596b0eaeece8 + part of changeset fccdcd83708a). This two patches only backport the fix to 2.7 and 3.2. ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 22:26:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 21:26:22 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1351805182.2.0.164842916291.issue16145@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. But I left some minor comments in Rietveld. ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 22:31:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 21:31:57 +0000 Subject: [issue16009] Json error messages could provide more information about the error In-Reply-To: <1348420465.53.0.405036591258.issue16009@psf.upfronthosting.co.za> Message-ID: <1351805517.44.0.854895408636.issue16009@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27424/json_errmsg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 22:32:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 21:32:26 +0000 Subject: [issue16009] Json error messages could provide more information about the error In-Reply-To: <1348420465.53.0.405036591258.issue16009@psf.upfronthosting.co.za> Message-ID: <1351805546.73.0.100686391866.issue16009@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27425/json_errmsg_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 22:37:45 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 01 Nov 2012 21:37:45 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1351805865.2.0.186152174041.issue16248@psf.upfronthosting.co.za> Stefan Krah added the comment: I also don't find the scenario where an attacker has write privileges to a user's home directory so disturbing -- there are juicier targets (like .bashrc). This constructed example using /tmp is a little more troubling: $ cd /tmp $ echo 'print("exploit")' > .Tk.py $ export XAUTHORITY=$HOME/.Xauthority $ unset HOME $ python3.3 >>>import tkinter >>> w = tkinter.Tk() /usr/local/lib/python3.3/tkinter/__init__.py:1817: ResourceWarning: unclosed file <_io.TextIOWrapper name='./.Tk.py' mode='r' encoding='ANSI_X3.4-1968'> exec(open(class_py).read(), dir) exploit ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 22:40:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 21:40:44 +0000 Subject: [issue16009] Json error messages could provide more information about the error In-Reply-To: <1348420465.53.0.405036591258.issue16009@psf.upfronthosting.co.za> Message-ID: <1351806044.19.0.241692118253.issue16009@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27433/json_errmsg_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 22:42:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 21:42:16 +0000 Subject: [issue16009] Json error messages could provide more information about the error In-Reply-To: <1348420465.53.0.405036591258.issue16009@psf.upfronthosting.co.za> Message-ID: <1351806136.17.0.44264142328.issue16009@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Fixed a debug artifact and a deprecation warning. ---------- Added file: http://bugs.python.org/file27833/json_errmsg_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 22:50:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 21:50:40 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1351806640.72.0.0445746789561.issue16145@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 22:51:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 21:51:38 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1351806698.37.0.777909878993.issue16145@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 22:54:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 21:54:19 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1351806859.77.0.68144309972.issue16145@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Hmm. Is it a bugtracker bug? I don't know how I added Larry to the nosy list and now I can not remove him. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 22:57:21 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 01 Nov 2012 21:57:21 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1351807041.44.0.0493179328489.issue16145@psf.upfronthosting.co.za> Changes by R. David Murray : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 22:57:53 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 01 Nov 2012 21:57:53 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1351807073.1.0.15381451924.issue16145@psf.upfronthosting.co.za> R. David Murray added the comment: I don't know. I was able to remove him. (I have javascript turned off, don't know if that makes any difference). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 22:58:06 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 01 Nov 2012 21:58:06 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1351807085.99.0.0559625627535.issue16145@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Probably Versions="Python 3.4" + Priority="release blocker" results in addition of 3.4 Release Manager (Larry Hastings) to nosy list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 23:01:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Nov 2012 22:01:26 +0000 Subject: [issue11489] json.dumps not parsable by json.loads (on Linux only) In-Reply-To: <1300058240.59.0.513243746739.issue11489@psf.upfronthosting.co.za> Message-ID: <1351807286.5.0.110111432992.issue11489@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: About patch. I think "with" is unnecessary here. One-line self.assertRaises(UnicodeEncodeError, self.dumps, ch) looks better for me. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 23:08:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Nov 2012 22:08:19 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1351807699.4.0.753885548097.issue15767@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 1 23:53:09 2012 From: report at bugs.python.org (Larry Hastings) Date: Thu, 01 Nov 2012 22:53:09 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1351810389.6.0.823033590625.issue16145@psf.upfronthosting.co.za> Larry Hastings added the comment: Roundup knows I'm the release manager for 3.4? It's well-informed! ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 00:35:37 2012 From: report at bugs.python.org (Kevin Chen) Date: Thu, 01 Nov 2012 23:35:37 +0000 Subject: [issue15880] os.path.split() and long UNC names In-Reply-To: <1347036015.89.0.836232949292.issue15880@psf.upfronthosting.co.za> Message-ID: <1351812937.45.0.656781757649.issue15880@psf.upfronthosting.co.za> Changes by Kevin Chen : ---------- nosy: +kevin.chen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 01:06:21 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Nov 2012 00:06:21 +0000 Subject: [issue15880] os.path.split() and long UNC names In-Reply-To: <1347036015.89.0.836232949292.issue15880@psf.upfronthosting.co.za> Message-ID: <1351814781.32.0.563150243845.issue15880@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This behavior reproduced only on 2.7. See issue5799 which changed the behavior for 3.1. ---------- nosy: +larry, mhammond, serhiy.storchaka versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 04:39:50 2012 From: report at bugs.python.org (Zachary Ware) Date: Fri, 02 Nov 2012 03:39:50 +0000 Subject: [issue15067] Clean up the sqlite3 docs In-Reply-To: <1339687148.5.0.0456329910944.issue15067@psf.upfronthosting.co.za> Message-ID: <1351827590.1.0.634582003503.issue15067@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file27834/issue15067_2.7_dead_pep.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 04:40:18 2012 From: report at bugs.python.org (Zachary Ware) Date: Fri, 02 Nov 2012 03:40:18 +0000 Subject: [issue15067] Clean up the sqlite3 docs In-Reply-To: <1339687148.5.0.0456329910944.issue15067@psf.upfronthosting.co.za> Message-ID: <1351827618.82.0.285716136804.issue15067@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file27835/issue15067_2.7_sql_capitalization.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 04:41:03 2012 From: report at bugs.python.org (Zachary Ware) Date: Fri, 02 Nov 2012 03:41:03 +0000 Subject: [issue15067] Clean up the sqlite3 docs In-Reply-To: <1339687148.5.0.0456329910944.issue15067@psf.upfronthosting.co.za> Message-ID: <1351827663.15.0.890538275838.issue15067@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file27836/issue15067_3.2_updates.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 04:45:08 2012 From: report at bugs.python.org (Zachary Ware) Date: Fri, 02 Nov 2012 03:45:08 +0000 Subject: [issue15067] Clean up the sqlite3 docs In-Reply-To: <1339687148.5.0.0456329910944.issue15067@psf.upfronthosting.co.za> Message-ID: <1351827908.1.0.374470797481.issue15067@psf.upfronthosting.co.za> Zachary Ware added the comment: Ok then, here's the split patches. 3.2_updates does have a few SQL capitalization changes, but most of those are already present in 2.7, and splitting out the rest would be more work than it's worth, I think. ---------- Added file: http://bugs.python.org/file27837/issue15067_3.2_sql_capitalization.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 05:41:32 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Fri, 02 Nov 2012 04:41:32 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1351801080.77.0.179401829501.issue16248@psf.upfronthosting.co.za> Message-ID: Ramchandra Apte added the comment: On 2 November 2012 01:48, Stefan Krah wrote: > > Stefan Krah added the comment: > > Isn't IDLE supposed to be a Python shell? As I understand this issue, > you'd have the same "exploit" by adding this to your .bashrc: > > echo "EXPLOIT" > /root/exploit > > > Then, as a normal user, run: > > sudo bash > > > > It would be nice to get rid of the exec, but why is this an exploit? > > ---------- > nosy: +skrah > > _______________________________________ > Python tracker > > _______________________________________ > Almost nobody knows that when using tkinter, code in .Tk.py is executed. (readprofile is not even documented!) While in your example, it is quite easy to see that it will run .bashrc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 05:42:27 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Fri, 02 Nov 2012 04:42:27 +0000 Subject: [issue16261] Fix bare excepts in various places in std lib In-Reply-To: <1351798599.08.0.711901449081.issue16261@psf.upfronthosting.co.za> Message-ID: Ramchandra Apte added the comment: Yes. most of the bare excepts can be replaced with a stricter clause On 2 November 2012 01:06, Andrew Svetlov wrote: > > Andrew Svetlov added the comment: > > Sorry, looks like I don't understood you correctly. > Do you want to replace `except:` to `except Exception` or something else? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 07:32:44 2012 From: report at bugs.python.org (Ned Deily) Date: Fri, 02 Nov 2012 06:32:44 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351837964.41.0.255334436903.issue1207589@psf.upfronthosting.co.za> Ned Deily added the comment: Andrew, this is clearly a new feature, not a bug. What is your rationale for adding it to the maintenance branches (2.7, 3.2, and 3.3)? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 07:34:40 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 02 Nov 2012 06:34:40 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351838080.25.0.158867803132.issue1207589@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 07:55:57 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Fri, 02 Nov 2012 06:55:57 +0000 Subject: [issue5411] Add xz support to shutil In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1351839357.64.0.0381988605366.issue5411@psf.upfronthosting.co.za> Hynek Schlawack added the comment: ?ric, what?s your take on this approach (not code)? We have time enough till 3.4 but it seems this doesn't really move forward. Any thoughts how to get this moving? Unfortunately I'm not invested enough in this to make a educated decision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 07:58:19 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Fri, 02 Nov 2012 06:58:19 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351839499.04.0.847891735631.issue16381@psf.upfronthosting.co.za> Changes by Hynek Schlawack : ---------- nosy: +hynek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 08:04:30 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Fri, 02 Nov 2012 07:04:30 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1351839870.96.0.171903139618.issue14794@psf.upfronthosting.co.za> Changes by Hynek Schlawack : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 08:19:05 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Fri, 02 Nov 2012 07:19:05 +0000 Subject: [issue15001] segmentation fault with del sys.module['__main__'] In-Reply-To: <1338839365.76.0.631007627601.issue15001@psf.upfronthosting.co.za> Message-ID: <1351840745.84.0.0887517212972.issue15001@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Fun fact, on 2.7 & 3.2 I get infinite loops @ 100% CPU. 3.3 & default crash. Unless someone yells, I'll polish this up and commit next week. ---------- stage: -> commit review versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 08:20:40 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Fri, 02 Nov 2012 07:20:40 +0000 Subject: [issue15148] shutil.which() docstring could be clearer In-Reply-To: <1340414189.13.0.761337231991.issue15148@psf.upfronthosting.co.za> Message-ID: <1351840840.24.0.850473324595.issue15148@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Any reason why this is still open? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 08:26:29 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Fri, 02 Nov 2012 07:26:29 +0000 Subject: [issue15104] Unclear language in __main__ description In-Reply-To: <1340092965.02.0.675870286607.issue15104@psf.upfronthosting.co.za> Message-ID: <1351841189.96.0.437120700564.issue15104@psf.upfronthosting.co.za> Changes by Hynek Schlawack : ---------- nosy: -hynek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 08:29:11 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Fri, 02 Nov 2012 07:29:11 +0000 Subject: [issue15490] Correct __sizeof__ support for StringIO In-Reply-To: <1343591617.54.0.289047671129.issue15490@psf.upfronthosting.co.za> Message-ID: <1351841351.69.0.098290788064.issue15490@psf.upfronthosting.co.za> Changes by Hynek Schlawack : ---------- nosy: -hynek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 08:34:19 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Fri, 02 Nov 2012 07:34:19 +0000 Subject: [issue16099] robotparser doesn't support request rate and crawl delay parameters In-Reply-To: <1349096305.17.0.983395980337.issue16099@psf.upfronthosting.co.za> Message-ID: <1351841659.02.0.509215367023.issue16099@psf.upfronthosting.co.za> Changes by Hynek Schlawack : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 08:56:13 2012 From: report at bugs.python.org (Fergus Noble) Date: Fri, 02 Nov 2012 07:56:13 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1351842973.57.0.0686486261685.issue5288@psf.upfronthosting.co.za> Fergus Noble added the comment: Digging up an old issue but I am also interested in seeing this enhancement. Specifically to represent GPS time which is (currently) 16 seconds ahead of UTC. ---------- nosy: +Fergus.Noble _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 09:47:23 2012 From: report at bugs.python.org (Christian Theune) Date: Fri, 02 Nov 2012 08:47:23 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351846043.76.0.600624827728.issue16381@psf.upfronthosting.co.za> Christian Theune added the comment: I pondered PyErr_NoMemory as well. However, I noticed not all locations in Python use PyErr_NoMemory to raise a MemoryError, and I'm also afraid that external libraries will have the same problem. Can you explain why you consider PyErr_NoMemory to be the better option? (I can think of performance but I wouldn't want to trade it in against reliability.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 10:07:48 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Nov 2012 09:07:48 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1351847268.14.0.447196411686.issue14794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This should be an issue on 64-bit too. slice(0,1,None).indices(sys.maxsize+1) ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 10:11:57 2012 From: report at bugs.python.org (Jan Duzinkiewicz) Date: Fri, 02 Nov 2012 09:11:57 +0000 Subject: [issue16304] re: Match Objects always have a boolean value of True In-Reply-To: <1350993549.54.0.0789320233606.issue16304@psf.upfronthosting.co.za> Message-ID: <1351847517.37.0.675174313104.issue16304@psf.upfronthosting.co.za> Jan Duzinkiewicz added the comment: I agree this is unclear - If Match object always have a boolean value of True, it actually prevents me from using simple if statement - what's the point of "if True:" statement? - so the remark that matching functions do not always return match objects has some value. I've submitted a patch. ---------- keywords: +patch nosy: +dhgmgn Added file: http://bugs.python.org/file27838/16304.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 10:20:42 2012 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 02 Nov 2012 09:20:42 +0000 Subject: [issue16374] ConfigParser: Passing a semicolon as a value In-Reply-To: <1351695710.99.0.421343064251.issue16374@psf.upfronthosting.co.za> Message-ID: <1351848042.55.0.420075696126.issue16374@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Well, the inline comment syntax was awkward to start with, that's why inline comments are now disabled by default since Python 3.2. For a more predictable situation with regard to comment handling, consider using the configparser 3.2+ backport for Python 2.6 and 2.7: http://pypi.python.org/pypi/configparser As for the original report, Michael is on the right track. Semicolon gets treated as a beginning of an inline comment if it's preceeded by a space, unless it's right after the key-value delimiter. In other words, these are inline comments: key1 = value ;inline comment! key2 =value ;inline comment! key3= value ;inline comment! key4=value ;inline comment! key5 : value ;inline comment! key6 :value ;inline comment! key7: value ;inline comment! key8:value ;inline comment! while these are not: key10 = value;value;value key11 = value; key12=; key13:; key14= ; key15: ; key16 = ; key17 : ; key18 : ; ;gotcha! Yes, key18's value is "; ;gotcha!" which is also a quirk of the old ConfigParser. Moreover, # can be used for full-line comments but not for inline comments. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 11:26:10 2012 From: report at bugs.python.org (Jan Duzinkiewicz) Date: Fri, 02 Nov 2012 10:26:10 +0000 Subject: [issue15962] Windows STDIN/STDOUT Redirection is actually FIXED In-Reply-To: <1347970794.78.0.910609008076.issue15962@psf.upfronthosting.co.za> Message-ID: <1351851970.89.0.727629355438.issue15962@psf.upfronthosting.co.za> Jan Duzinkiewicz added the comment: I've referenced the kb article in the docs. Please let me know if the fix is ok - maybe the whole registry change process should be included in the docs directly? ---------- keywords: +patch nosy: +dhgmgn Added file: http://bugs.python.org/file27839/15962.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 11:34:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Nov 2012 10:34:04 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <1351852444.81.0.838719501788.issue15872@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Added tests for onerror. ---------- Added file: http://bugs.python.org/file27840/shutil_rmtree_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 11:35:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Nov 2012 10:35:53 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <1351852553.75.0.759481652557.issue15872@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here are backported tests for 3.2 (they are passed). ---------- Added file: http://bugs.python.org/file27841/shutil_rmtree_tests-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 12:02:53 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 02 Nov 2012 11:02:53 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351854173.18.0.478663502446.issue1207589@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I thought it's desirable feature which cannot produce backward incompatibility problems. Can revert commits for 2.7-3.3 if needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 12:33:06 2012 From: report at bugs.python.org (Jan Duzinkiewicz) Date: Fri, 02 Nov 2012 11:33:06 +0000 Subject: [issue14878] Improve documentation for generator.send method In-Reply-To: <1337662493.01.0.380911981252.issue14878@psf.upfronthosting.co.za> Message-ID: <1351855986.55.0.164965765834.issue14878@psf.upfronthosting.co.za> Jan Duzinkiewicz added the comment: The latest docs have a crossrefence at the end of the section: http://docs.python.org/3/reference/simple_stmts.html#grammar-token-yield_stmt I copied the reference to 2.7 docs ---------- keywords: +patch nosy: +dhgmgn Added file: http://bugs.python.org/file27842/14878.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 12:40:05 2012 From: report at bugs.python.org (Todd Rovito) Date: Fri, 02 Nov 2012 11:40:05 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351856405.89.0.560301119976.issue1207589@psf.upfronthosting.co.za> Todd Rovito added the comment: Ned, I respectfully disagree that this is not a new feature. IDLE could always copy/cut/paste from the edit menu and it had a right click menu. All this patch does is add options to right click menu and call the same functions as the edit menu does. I could be biased because I worked on the patch and I am a new contributor but I think Andrew's logic of commenting the patch makes sense. Python is a great scripting language but IDLE is really falling behind and it is often the first thing a user sees. Thanks for your attention in this matter and I will respect any solution you and Amdrew come up with. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 12:43:20 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 02 Nov 2012 11:43:20 +0000 Subject: [issue15148] shutil.which() docstring could be clearer In-Reply-To: <1340414189.13.0.761337231991.issue15148@psf.upfronthosting.co.za> Message-ID: <1351856600.96.0.342070925224.issue15148@psf.upfronthosting.co.za> R. David Murray added the comment: Doesn't look like it. ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 13:00:21 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 02 Nov 2012 12:00:21 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351857621.0.0.865125314748.issue1207589@psf.upfronthosting.co.za> R. David Murray added the comment: The reason for our "no new features" policy is that if a program works with version x.y, it should work for all x versions (modulo failing on an earlier version because of a bug...and conversely if it works on x.y, it should work on all later versions of x, which is why we also sometimes don't fix certain bugs in maintenance releases). In this case, if I understand correctly, there are no *programs* that can depend on the feature, just humans. So I think putting this in to bugfix releases is more analogous to the fixes-that-look-like-enhancements we occasionally put into the build infrastructure for Python itself (as opposed to distutils, which is governed by the normal backward compatibility rules). So, it's a judgment call and other developers might not agree with me, but I think it is OK. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 13:27:47 2012 From: report at bugs.python.org (Albert Ferras) Date: Fri, 02 Nov 2012 12:27:47 +0000 Subject: [issue16385] evaluating dict with repeated keys gives no error/warnings Message-ID: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> New submission from Albert Ferras: I normally use dictionaries for configuration purposes in python, but there's a problem where I have a dictionary with many key<->values and one of the keys is repeated. For example: lives_in = { 'lion': ['Africa', 'America], 'parrot': ['Europe'], #... 100+ more rows here 'lion': ['Europe'], #... 100+ more rows here } will end up with animal_lives_in['lion'] = 'Europe'. There's no way to detect that I've written a mistake in the code because python won't tell me there's a duplicated key assigned. It's easy to see when you have few keys but hard when you've got many. I think it should atleast raise a warning when this happens. ---------- components: Interpreter Core messages: 174507 nosy: Albert.Ferras priority: normal severity: normal status: open title: evaluating dict with repeated keys gives no error/warnings type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 13:36:07 2012 From: report at bugs.python.org (Jan Duzinkiewicz) Date: Fri, 02 Nov 2012 12:36:07 +0000 Subject: [issue16386] imp.find_module does not specify registry key it searches on windows Message-ID: <1351859767.89.0.815277454803.issue16386@psf.upfronthosting.co.za> New submission from Jan Duzinkiewicz: quote from http://docs.python.org/3/library/imp.html#imp.find_module: "...on some systems some other places are looked in as well (on Windows, it looks in the registry which may point to a specific file)." I actually didn't know the registry key is listed in "using Python on Window" guide until I grepped for PythonCore (which kind of requires to know the key already) - so I'm submitting a patch that cross references find_module docs and using Python on Windows guide. ---------- assignee: docs at python components: Documentation files: import_nt_reg.patch keywords: patch messages: 174508 nosy: dhgmgn, docs at python priority: normal severity: normal status: open title: imp.find_module does not specify registry key it searches on windows versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file27843/import_nt_reg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 13:50:55 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Nov 2012 12:50:55 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: Message-ID: <20121102125055.GA19876@sleipnir.bytereef.org> Stefan Krah added the comment: Ramchandra Apte wrote: > Almost nobody knows that when using tkinter, code in .Tk.py is executed. > (readprofile is not even documented!) > While in your example, it is quite easy to see that it will run .bashrc The point of the example is that it's "game over" anyway once an attacker has write privileges to a user's home directory. "sudo bash" is certainly a more common operation than "sudo tkapp.py", and users are not in the habit of auditing .bashrc each time they launch a shell. In fact, I'd probably be more likely to notice a new file ".Tk.py" than a small modification to my .bashrc. That said, I absolutely agree that *ideally* tkinter apps should not execute code from a startup file, especially if the startup file is *not* in the user's home directory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 13:55:53 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 02 Nov 2012 12:55:53 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351860953.88.0.388498945132.issue16381@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Where it is now means raising a MemoryError in Python code will cause the fatal error. I don't know if that's a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 14:24:40 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 02 Nov 2012 13:24:40 +0000 Subject: [issue16384] import.c doesn't handle EOFError from PyMarshal_Read* In-Reply-To: <1351796179.35.0.165892579115.issue16384@psf.upfronthosting.co.za> Message-ID: <1351862680.14.0.273607116145.issue16384@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 14:24:56 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 02 Nov 2012 13:24:56 +0000 Subject: [issue16384] import.c doesn't handle EOFError from PyMarshal_Read* In-Reply-To: <1351796179.35.0.165892579115.issue16384@psf.upfronthosting.co.za> Message-ID: <1351862696.54.0.824849121618.issue16384@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 14:45:20 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Nov 2012 13:45:20 +0000 Subject: [issue16387] test_cmd_line_script failures Message-ID: <1351863920.6.0.283546215787.issue16387@psf.upfronthosting.co.za> New submission from Stefan Krah: test_cmd_line_script is failing on multiple buildbots: ====================================================================== FAIL: test_non_utf8 (test.test_cmd_line_script.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/buildarea/3.3.krah-freebsd/build/Lib/test/test_cmd_line_script.py", line 373, in test_non_utf8 importlib.machinery.SourceFileLoader) File "/usr/home/buildbot/buildarea/3.3.krah-freebsd/build/Lib/test/test_cmd_line_script.py", line 126, in _check_script rc, out, err = assert_python_ok(*run_args) File "/usr/home/buildbot/buildarea/3.3.krah-freebsd/build/Lib/test/script_helper.py", line 54, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/usr/home/buildbot/buildarea/3.3.krah-freebsd/build/Lib/test/script_helper.py", line 46, in _assert_python "stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore'))) AssertionError: Process return code is 1, stderr follows: UnicodeEncodeError: 'ascii' codec can't encode characters in position 15-20: ordinal not in range(128) ---------------------------------------------------------------------- Ran 23 tests in 4.646s ---------- components: Tests keywords: buildbot messages: 174511 nosy: skrah priority: normal severity: normal stage: needs patch status: open title: test_cmd_line_script failures type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 14:46:26 2012 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 02 Nov 2012 13:46:26 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351860953.88.0.388498945132.issue16381@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: There used to be some places in the C code that raise MemoryError to indicate that some parameter indicating a desired result size is out of range, i.e. before even trying to allocate anything. I can't confirm any, but these should probably be replaced with another exception. (I thought string times integer was one such place, but it raises OverflowError now.) If there are any left those should probably be replaced with OverflowError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 14:51:26 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Nov 2012 13:51:26 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1351864286.43.0.771785621497.issue14794@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 14:54:15 2012 From: report at bugs.python.org (Lukas Lueg) Date: Fri, 02 Nov 2012 13:54:15 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351864455.13.0.268018242819.issue16381@psf.upfronthosting.co.za> Lukas Lueg added the comment: I have to say this feels like spooky action at a distance. Wouldnt it be less intrusive - while achieving the same result - to make MemoryError uncatchable if the flag is set? ---------- nosy: +ebfe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:01:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 02 Nov 2012 14:01:43 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <3XtQ1y6M5mzRGd@mail.python.org> Roundup Robot added the comment: New changeset 0b5f00ccf907 by Stefan Krah in branch '3.3': Issue #16145: Support legacy strings in the _csv module. http://hg.python.org/cpython/rev/0b5f00ccf907 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:04:22 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 02 Nov 2012 14:04:22 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351865062.46.0.186831753048.issue16381@psf.upfronthosting.co.za> Christian Heimes added the comment: MemoryError can be raised under two different circumstances that should be handled differently. Either the program tries to allocate a rather large chunk of memory for e.g. a string with a couple of hundred KB and more. Or Python can't malloc() even small amounts of memory for its most basic operations like raising an exception object. That's why PyErr_NoMemory() exists and why it uses a pre-allocated MemoryError object. When a program can't allocate memory for an image it usually has enough memory left to do proper error reporting and shut down. However when even "x = 2 * 200" fails with a memory error then proper shutdown will most likely fail and hang up the process, too. Too bad that PyErr_NoMemory() is used for both scenarios and isn't aware how much memory was requested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:04:28 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Nov 2012 14:04:28 +0000 Subject: [issue16145] Abort in _csv module In-Reply-To: <1349462897.28.0.00319785734087.issue16145@psf.upfronthosting.co.za> Message-ID: <1351865068.65.0.463320188375.issue16145@psf.upfronthosting.co.za> Stefan Krah added the comment: Andrew and Serhiy, thanks for the reviews. Should be fixed now. ---------- assignee: -> skrah resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:27:14 2012 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 02 Nov 2012 14:27:14 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351865062.46.0.186831753048.issue16381@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Well, you can fix that, right? Just add a new function with a better signature and use that for one of the two scenarios. (I think third scenario might be when realloc fails -- IIRC it doesn't guarantee that the original pointer is still valid either?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:30:37 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Nov 2012 14:30:37 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351866637.3.0.0203874930208.issue1207589@psf.upfronthosting.co.za> Terry J. Reedy added the comment: It it not a new library feature that anyone would use in other code. I have been meaning to raise this issue on pydev to see what others think. There are advantages to keeping the *human* interaction with IDLE consistent between releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:32:16 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Fri, 02 Nov 2012 14:32:16 +0000 Subject: [issue16385] evaluating dict with repeated keys gives no warnings In-Reply-To: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> Message-ID: <1351866736.26.0.0716535056424.issue16385@psf.upfronthosting.co.za> Ramchandra Apte added the comment: This is an unavoidable behaviour of the hash tables (dictionaries) I don't see much use cases of a warning. ---------- nosy: +ramchandra.apte title: evaluating dict with repeated keys gives no error/warnings -> evaluating dict with repeated keys gives no warnings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:34:02 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Fri, 02 Nov 2012 14:34:02 +0000 Subject: [issue16385] evaluating dict with repeated keys gives no warnings/errors In-Reply-To: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> Message-ID: <1351866842.43.0.782330714597.issue16385@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Retract earlier statement. I didn't read the comment fully. ---------- title: evaluating dict with repeated keys gives no warnings -> evaluating dict with repeated keys gives no warnings/errors _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:34:45 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Nov 2012 14:34:45 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351866885.18.0.931836911368.issue16218@psf.upfronthosting.co.za> Stefan Krah added the comment: Some of the buildbots are failing with the new test: ====================================================================== FAIL: test_non_utf8 (test.test_cmd_line_script.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_cmd_line_script.py", line 373, in test_non_utf8 importlib.machinery.SourceFileLoader) File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_cmd_line_script.py", line 126, in _check_script rc, out, err = assert_python_ok(*run_args) File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/script_helper.py", line 54, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/script_helper.py", line 46, in _assert_python "stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore'))) AssertionError: Process return code is 1, stderr follows: UnicodeEncodeError: 'ascii' codec can't encode characters in position 15-20: ordinal not in range(128) ---------------------------------------------------------------------- Ran 23 tests in 8.959s ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:35:18 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Fri, 02 Nov 2012 14:35:18 +0000 Subject: [issue16385] evaluating dict with repeated keys gives no warnings/errors In-Reply-To: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> Message-ID: <1351866918.76.0.129604626998.issue16385@psf.upfronthosting.co.za> Ramchandra Apte added the comment: You should be using json for configuration purposes anyway. This is low priority as only few programs use dictionaries with a gazillion keys. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:35:19 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Nov 2012 14:35:19 +0000 Subject: [issue16387] test_cmd_line_script failures In-Reply-To: <1351863920.6.0.283546215787.issue16387@psf.upfronthosting.co.za> Message-ID: <1351866919.31.0.634598500775.issue16387@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> Python launcher does not support non ascii characters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:42:42 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 02 Nov 2012 14:42:42 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351867362.55.0.289105925399.issue16218@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:43:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Nov 2012 14:43:42 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <1351867422.46.0.0828358208527.issue15872@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tests simplified. Thanks Hynek for review and advices. ---------- Added file: http://bugs.python.org/file27844/shutil_rmtree_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:45:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Nov 2012 14:45:03 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <1351867503.86.0.542767711128.issue15872@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file27845/shutil_rmtree_tests-3.2_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:45:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Nov 2012 14:45:22 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <1351867522.42.0.507723304284.issue15872@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27840/shutil_rmtree_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:45:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Nov 2012 14:45:45 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <1351867545.52.0.0760069240028.issue15872@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27841/shutil_rmtree_tests-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:48:14 2012 From: report at bugs.python.org (Lukas Lueg) Date: Fri, 02 Nov 2012 14:48:14 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351867694.84.0.499288622899.issue16381@psf.upfronthosting.co.za> Lukas Lueg added the comment: In any strategy only a heuristic could be used in order to decide wether or not it's safe to raise MemoryError. How exactly is memory pressure expected for x=[2]*200 but not for x=2*200 ? I don't think a new function could ultimatly achieve it's goal. If MemoryError occurs, all bets are off. Shutting down as fast as possible is the best we could do, if requested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:49:04 2012 From: report at bugs.python.org (Albert Ferras) Date: Fri, 02 Nov 2012 14:49:04 +0000 Subject: [issue16385] evaluating dict with repeated keys gives no warnings/errors In-Reply-To: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> Message-ID: <1351867744.87.0.283942545732.issue16385@psf.upfronthosting.co.za> Albert Ferras added the comment: I would use json, but it allows me to set list/strings, etc.. not python objects like I'd want ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:49:56 2012 From: report at bugs.python.org (Albert Ferras) Date: Fri, 02 Nov 2012 14:49:56 +0000 Subject: [issue16385] evaluating dict with repeated keys gives no warnings/errors In-Reply-To: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> Message-ID: <1351867796.84.0.977853851683.issue16385@psf.upfronthosting.co.za> Albert Ferras added the comment: sorry: *it only allows me ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:50:30 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 02 Nov 2012 14:50:30 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351867830.4.0.621324916198.issue16381@psf.upfronthosting.co.za> Christian Heimes added the comment: Of course it can be fixed. But it's going to be a long and tedious piece of work. PyErr_NoMemory() is called 314 times. MemoryError is raised about 40 times in C code. I'm not sure what your question about realloc() really is. Are you unsure how a a failing realloc() calls must be resolved? Code like ptr = realloc(ptr, size); is usually a memory leak as it leaks the previously allocated memory in ptr. In the error case the block in ptr is left untouched and is still valid. It must be freed manually or can be used further and freed later. if((ptr2 == realloc(ptr, size)) == NULL) { free(ptr); } else { ptr = ptr2; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:51:21 2012 From: report at bugs.python.org (Albert Ferras) Date: Fri, 02 Nov 2012 14:51:21 +0000 Subject: [issue16385] evaluating dict with repeated keys gives no warnings/errors In-Reply-To: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> Message-ID: <1351867881.58.0.870607990114.issue16385@psf.upfronthosting.co.za> Albert Ferras added the comment: also, it creates confusion when this happens ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:51:26 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 02 Nov 2012 14:51:26 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351867886.77.0.462962990865.issue16218@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Reopening bug. Quite a few buildbots are failing with this patch. Please, commit a new version or revert. ---------- resolution: fixed -> stage: committed/rejected -> commit review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:57:00 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 02 Nov 2012 14:57:00 +0000 Subject: [issue16385] evaluating literal dict with repeated keys gives no warnings/errors In-Reply-To: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> Message-ID: <1351868220.67.0.443975259733.issue16385@psf.upfronthosting.co.za> R. David Murray added the comment: It is a nice suggestion, but it is also probably a non-trivial change to the parser. If you want to try coming up with a patch we would consider it, but I suspect there is a limit to how much complexity we'd be willing to add to the parser code for this. It would also be a backward incompatible change, so it could only go into a new release regardless. (On the other hand Benjamin might take a look at this and say "oh, that's easy" and make some magic happen. You never know :) ---------- nosy: +r.david.murray priority: normal -> low title: evaluating dict with repeated keys gives no warnings/errors -> evaluating literal dict with repeated keys gives no warnings/errors type: behavior -> enhancement versions: +Python 3.4 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:57:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 02 Nov 2012 14:57:40 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351868260.7.0.831452190548.issue16218@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I see. Sorry, my fault. Give me weekend to figure out why it fails. Thanks. ---------- assignee: -> asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:58:30 2012 From: report at bugs.python.org (Brian Curtin) Date: Fri, 02 Nov 2012 14:58:30 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351868310.96.0.475673053692.issue16218@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 15:59:43 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 02 Nov 2012 14:59:43 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351868383.4.0.184518844501.issue16381@psf.upfronthosting.co.za> Christian Heimes added the comment: We can create some kind of heuristic when the memory error handler knows the size of the new block and the size difference on realloc(). It could be an application specific threshold, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 16:10:24 2012 From: report at bugs.python.org (Lukas Lueg) Date: Fri, 02 Nov 2012 15:10:24 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1351869024.77.0.840710489486.issue16381@psf.upfronthosting.co.za> Lukas Lueg added the comment: The heuristic basically has to decide if memory pressure is so high that it's not save to return to the interpreter. Even if there is a chosen value (e.g. failed allocation attempts below 1mb are considered fatal), there can always be another OS-thread in the interpreter process that eats away exactly that memory while we are returning MemoryError - the program might still hang. FWICS all MemoryErrors are to be considered fatal or none of them ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 16:27:27 2012 From: report at bugs.python.org (Lukas Lueg) Date: Fri, 02 Nov 2012 15:27:27 +0000 Subject: [issue16385] evaluating literal dict with repeated keys gives no warnings/errors In-Reply-To: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> Message-ID: <1351870047.91.0.281781814974.issue16385@psf.upfronthosting.co.za> Lukas Lueg added the comment: This could be avoided by lives_in_init = (('lion': ['Africa', 'America']), ('lion': ['Europe'])) lives_in = {} for k, v in lives_in_init: assert k not in lives_in lives_in[k] = v del lives_in_init Which is fast enough if executed only during module-loading ---------- nosy: +ebfe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 16:49:24 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 02 Nov 2012 15:49:24 +0000 Subject: [issue16385] evaluating literal dict with repeated keys gives no warnings/errors In-Reply-To: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> Message-ID: <1351871364.49.0.88641474248.issue16385@psf.upfronthosting.co.za> Benjamin Peterson added the comment: An error is out of the question for compatibility reasons. I think the idea for a warning should be brought up on the python-ideas list. Silently rejecting duplicates has a lot of precedent, though. For example, set literals and the dict constructor: >>> dict((("dfs", 2), ("dfs", 3))) {'dfs' : 3} ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 16:52:09 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Nov 2012 15:52:09 +0000 Subject: [issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename In-Reply-To: <1343479745.83.0.410557070565.issue15478@psf.upfronthosting.co.za> Message-ID: <1351871529.15.0.183622814908.issue15478@psf.upfronthosting.co.za> Stefan Krah added the comment: One of 13ebaa36d87d, 9f696742dbda or 6903f5214e99 causes test failures in test_pep277: ====================================================================== FAIL: test_failures (test.test_pep277.UnicodeFileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_pep277.py", line 120, in test_failures self._apply_failure(os.listdir, name) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_pep277.py", line 105, in _apply_failure self.assertEqual(wildcard, '*.*') AssertionError: '7_\u05d4\u05e9\u05e7\u05e6\u05e5\u05e1' != '*.*' - 7_\u05d4\u05e9\u05e7\u05e6\u05e5\u05e1 + *.* ---------- nosy: +skrah resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 17:05:59 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Nov 2012 16:05:59 +0000 Subject: [issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename In-Reply-To: <1343479745.83.0.410557070565.issue15478@psf.upfronthosting.co.za> Message-ID: <1351872359.37.0.790019030426.issue15478@psf.upfronthosting.co.za> Stefan Krah added the comment: Additionally, some of the changes cause a failure in test_subprocess: ====================================================================== ERROR: test_no_leaking (test.test_subprocess.ProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Users\stefan\pydev\cpython\lib\test\test_subprocess.py", line 823, in test_no_leaking handles.append(os.open(tmpfile, os.O_WRONLY|os.O_CREAT)) FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'c:\\users\\stefan\\appdata\\l ocal\\temp\\tmpa41o4x\\@test_2236_tmp' ---------------------------------------------------------------------- ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 17:13:01 2012 From: report at bugs.python.org (Roger Serwy) Date: Fri, 02 Nov 2012 16:13:01 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351872781.57.0.0198640010226.issue1207589@psf.upfronthosting.co.za> Roger Serwy added the comment: In a strict sense, the patch does break backward compatibility for third-party IDLE extensions that modify the rmenu_specs contents. It is not a "private" value since it lacks an initial underscore in its name. But given how undocumented IDLE is, especially its extension facility, I don't think poses any problems. (For what it's worth, I'm the developer of IdleX and I already released a trivial workaround for this change. I welcome this improvement to IDLE, especially when it deprecates an existing IdleX extension.) While keeping UI consistency may be desirable, keeping it crippled is not. Even Window's Notepad has a decent right-click menu. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 17:20:34 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 02 Nov 2012 16:20:34 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351873234.59.0.487452786481.issue1207589@psf.upfronthosting.co.za> R. David Murray added the comment: Ah. Well, we prefer to err on the side of strictness for backward compatibility, so I think we should treat this as an enhancement, then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 17:54:13 2012 From: report at bugs.python.org (Calvin Owens) Date: Fri, 02 Nov 2012 16:54:13 +0000 Subject: [issue16388] Urllib screws up capitalization in "User-Agent" HTTP Header Message-ID: <1351875253.7.0.390086386154.issue16388@psf.upfronthosting.co.za> New submission from Calvin Owens: Urllib encodes as: "User-agent" The correct form is: "User-Agent" This is quite important, as it makes this library totally unusable for scraping moronic websites which require a recognized User-Agent string to work correctly, of which there are many. ---------- components: Library (Lib) messages: 174540 nosy: Calvin.Owens priority: normal severity: normal status: open title: Urllib screws up capitalization in "User-Agent" HTTP Header type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 18:01:56 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 02 Nov 2012 17:01:56 +0000 Subject: [issue16388] Urllib screws up capitalization in "User-Agent" HTTP Header In-Reply-To: <1351875253.7.0.390086386154.issue16388@psf.upfronthosting.co.za> Message-ID: <1351875716.47.0.925555478914.issue16388@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> urllib/httplib header capitalization _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 18:07:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 02 Nov 2012 17:07:02 +0000 Subject: [issue15573] Support unknown formats in memoryview comparisons In-Reply-To: <1344340531.12.0.758557763037.issue15573@psf.upfronthosting.co.za> Message-ID: <3XtV7n30tlzRLj@mail.python.org> Roundup Robot added the comment: New changeset 969069d464bc by Stefan Krah in branch '3.3': Issue #15814: Use hash function that is compatible with the equality http://hg.python.org/cpython/rev/969069d464bc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 18:07:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 02 Nov 2012 17:07:02 +0000 Subject: [issue15814] memoryview: equality-hash invariant In-Reply-To: <1346260029.19.0.320505643782.issue15814@psf.upfronthosting.co.za> Message-ID: <3XtV7p1M5ZzRMn@mail.python.org> Roundup Robot added the comment: New changeset 969069d464bc by Stefan Krah in branch '3.3': Issue #15814: Use hash function that is compatible with the equality http://hg.python.org/cpython/rev/969069d464bc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 18:15:05 2012 From: report at bugs.python.org (Ned Deily) Date: Fri, 02 Nov 2012 17:15:05 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351876505.39.0.511735024718.issue1207589@psf.upfronthosting.co.za> Ned Deily added the comment: I think it is clear that this is an enhancement. So then the question is: is there a good reason to make an exception here to the "no new features in maintenance releases" policy? David mentioned some considerations. I would add testing and documentation. Testing is a *big* concern with IDLE since IDLE is so dependent on Tk and we know from long experience that there can be differences among the various platform-specific Tk implementations (we currently support at least 4 different Tk varieties) and we have no standard automated tests for IDLE. So that increases the risk that we could break something in a maintenance release which we try really hard not to do. On the other hand, there is something to be said about maintaining compatibility as best as possible across IDLE version. I'm not fundamentally opposed to including this enhancement in maintenance releases. But I think it is important to recognize that it is an exception to policy and to have this discussion about it. Personally, I'm +0 on the whole feature - it's not something I would use - so I don't really have a stake in it. I do have a bit of a stake in the testing part and for that reason I'm -0 on the backports. I'm glad to see Todd tested on Linux and OS X - presumably someone has tested on Windows. If the backports remain, the feature should at least be smoke-tested at some point on all four of the branches and with all of the major Tk versions (Windows, X11, OS X Cocoa Tk 8.5, OS X Carbon Tk 8.4). Since he has the most experience in this area, I'm willing to defer to Roger's judgement call on the impact of this change with regard to IDLE extensions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 18:25:55 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Nov 2012 17:25:55 +0000 Subject: [issue15814] memoryview: equality-hash invariant In-Reply-To: <1346260029.19.0.320505643782.issue15814@psf.upfronthosting.co.za> Message-ID: <1351877155.92.0.345569767732.issue15814@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 18:27:18 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Nov 2012 17:27:18 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1351877238.23.0.210197565486.issue14794@psf.upfronthosting.co.za> Mark Dickinson added the comment: For 2.7, I don't see any problem with raising OverflowError for a length that's > sys.maxsize, since it's hard to have sequences larger than that anyway. For 3.x, I'd also see this behaviour as reasonable, and not a bug. If it's raising OverflowError for lengths *smaller* than sys.maxsize, that's a bug. Unless that's the case, I'd call this a feature request for 3.4, rather than a bug that needs fixing in all the maintenance branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 18:32:07 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Nov 2012 17:32:07 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1351877527.14.0.802629151702.issue14794@psf.upfronthosting.co.za> Mark Dickinson added the comment: > If it's raising OverflowError for lengths *smaller* than sys.maxsize, > that's a bug. Ah, reading Ned's comment, it looks like that's exactly what it's doing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 18:48:31 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 02 Nov 2012 17:48:31 +0000 Subject: [issue16347] configure.ac patch In-Reply-To: <1351421553.76.0.859904155942.issue16347@psf.upfronthosting.co.za> Message-ID: <1351878511.7.0.0281985893622.issue16347@psf.upfronthosting.co.za> ?ric Araujo added the comment: > This is due to the fact on the 64 bit they split lib and lib64 directories. This depends on the specific multiarch implementation. Debian 64-bit only has /usr/lib for instance. I had a look at the patch but did not understand what it does. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 18:48:32 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 02 Nov 2012 17:48:32 +0000 Subject: [issue16385] evaluating literal dict with repeated keys gives no warnings/errors In-Reply-To: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> Message-ID: <1351878512.77.0.354640683636.issue16385@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 18:56:47 2012 From: report at bugs.python.org (Calvin Owens) Date: Fri, 02 Nov 2012 17:56:47 +0000 Subject: [issue16388] Urllib screws up capitalization in "User-Agent" HTTP Header In-Reply-To: <1351875253.7.0.390086386154.issue16388@psf.upfronthosting.co.za> Message-ID: <1351879007.94.0.462995659077.issue16388@psf.upfronthosting.co.za> Calvin Owens added the comment: 2275 hasn't been touched for almost 2 years. If there was a fix in v3.3, it ought to be backported. But it doesn't look like they ever came up with one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:02:10 2012 From: report at bugs.python.org (Antonio Cavallo) Date: Fri, 02 Nov 2012 18:02:10 +0000 Subject: [issue16347] configure.ac patch In-Reply-To: <1351421553.76.0.859904155942.issue16347@psf.upfronthosting.co.za> Message-ID: <1351879330.0.0.322238672123.issue16347@psf.upfronthosting.co.za> Antonio Cavallo added the comment: Hi, the patch it is really simple, it adds the @LIB@ and @ARCH@ variables to the configure machinery. If you look into the Makefile.pre.in: INCLUDEDIR=?@includedir@ CONFINCLUDEDIR=?$(exec_prefix)/include SCRIPTDIR=??$(prefix)/lib This hardcodes lib that can be right on debian derivatives but on many other distributions it would be lib64 (fedora and opensuse notable ones). In theory SCRIPTDIR could be se to @libdir@ but... Samples of that hardcoded path (lib) are spread all over the source code and there're specific patches for these. This patch should make easier later on to fix these, in fact the patch should be totally safe (at least that would be my aim) with no impact. I hope this helps, thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:12:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Nov 2012 18:12:07 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351879927.07.0.438075585795.issue16218@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I was not able to reproduce this error, I got other errors. The issue not in Python interpreter, the test is broken. Here is a patch that might solve the issue on some platforms (need to test on Windows). I guess failing of all command line tests when the path to temporary directory contains non-ascii. ---------- Added file: http://bugs.python.org/file27846/pythonrun_filename_decoding_test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:23:35 2012 From: report at bugs.python.org (Philip Jenvey) Date: Fri, 02 Nov 2012 18:23:35 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench Message-ID: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> New submission from Philip Jenvey: #9396 replaced a few caches in the stdlib w/ lru_cache, this made the mako_v2 benchmark on Python 3 almost 3x slower than 2.7 The benchmark results are good now that Mako was changed to cache the re itself, but the problem still stands that lru_cache seems to hurt the perf of inline res compared to 2.7. The fix for Mako did not affect the 2.7 benchmark numbers See more info here: http://mail.python.org/pipermail/python-dev/2012-November/122521.html ---------- components: Library (Lib) messages: 174550 nosy: brett.cannon, ncoghlan, pjenvey, rhettinger, zzzeek priority: normal severity: normal status: open title: re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench type: performance versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:23:37 2012 From: report at bugs.python.org (Paul Upchurch) Date: Fri, 02 Nov 2012 18:23:37 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1351880617.53.0.00228096022658.issue14794@psf.upfronthosting.co.za> Paul Upchurch added the comment: For the concept of "reasonable", it should be noted that this behaviour will affect code that works with reasonably sized sequences despite the largeness of the parameter. Consider an extremely large array. To work with such an array, one would typically break it into small segments. However, to simplify the code and reduce bugs it makes sense to use a consistent indexing method on each segment. The size of its parameter does not say anything about the size of a segment. Consider a class which implements virtual arrays. def __getitem__(...): ... start,stop,step=slice.indices(start,stop,step).indices(12600000000) while True: if step>0 and start>=stop: break if step<0 and start<=stop: break p=pageid(start) make_page_resident(p) do work ... start=start+step As you can see, slice.indices should not be limited to sys.maxsize. If Python can perform the arithmetic calculation sys.maxsize+1 then slice.indices(sys.maxsize+1) should also work. The usage of slice.indices is to ensure consistent behaviour of the slicing operator. Another workaround for this bug: 5. write your own implementation of slice.indices I consider this a workaround. The correct way to handle the index parameter to __getitem__ and __setitem__ is to use slice.indices. That way, if the semantics of slicing changes in future versions of Python, your class will behave consistently. It seems to me that this is the main reason why slice.indices exists at all: to prevent inconsistent behaviour when people implement __getitem__ and __setitem__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:27:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Nov 2012 18:27:51 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1351880871.08.0.681923641164.issue14794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think the issue is than slice constructor accepts integer out of Py_ssize_t range. And more, it accepts any objects, not only integers or None. >>> slice(3.4, 'a', {}) slice(3.4, 'a', {}) May be we should disallow creating of such doubtful slices and raise TypeError or OverflowError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:29:04 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 02 Nov 2012 18:29:04 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1351880944.59.0.124362052175.issue16389@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +3.3regression nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:29:20 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 02 Nov 2012 18:29:20 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1351880960.36.0.94976869284.issue16248@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm gonna point people to the discussion about the "-s" flag of the Python interpreter (added as part of PEP 370), since the issue is conceptually identical: http://mail.python.org/pipermail/python-dev/2008-January/076130.html Adding Christian to the discussion since he was the author and implementor of that PEP. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:32:21 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 02 Nov 2012 18:32:21 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1351881141.19.0.680657453506.issue16389@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:34:24 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 02 Nov 2012 18:34:24 +0000 Subject: [issue16390] re compilation slow in Python 3.3 due to functools.lru_cache overhead Message-ID: <1351881264.39.0.439395849292.issue16390@psf.upfronthosting.co.za> New submission from Brett Cannon: The Mako developers discovered that under Python 3.3 their library under the mako_v2 benchmark went from 2.95x slower than Python 2.7 to 1.25x slower by simply avoiding an re compilation: http://www.makotemplates.org/trac/changeset/c1468b12f115ac9e469150ce24ea042aeae5e270 Their profiling showed that functools.lru_cache in rc._compiled_typed was a major contributor: http://paste.ofcode.org/yZRKnJfTsHesFR8hMWfc7f ---------- components: Library (Lib) messages: 174554 nosy: brett.cannon, pjenvey priority: normal severity: normal stage: needs patch status: open title: re compilation slow in Python 3.3 due to functools.lru_cache overhead type: performance versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:36:49 2012 From: report at bugs.python.org (Philip Jenvey) Date: Fri, 02 Nov 2012 18:36:49 +0000 Subject: [issue16390] re compilation slow in Python 3.3 due to functools.lru_cache overhead In-Reply-To: <1351881264.39.0.439395849292.issue16390@psf.upfronthosting.co.za> Message-ID: <1351881409.92.0.261275680073.issue16390@psf.upfronthosting.co.za> Philip Jenvey added the comment: Sorry Brett, beat you to it w/ #16389 =P ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:37:26 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 02 Nov 2012 18:37:26 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1351881446.84.0.194191760196.issue16248@psf.upfronthosting.co.za> Christian Heimes added the comment: It's gonna take a while to read this ticket ... Some comments: The code in site.py already does some checks, for example getuid() == geteuid(). System code and code that is run with administrator privileges shall be run with -Es to prevent code injection. See https://bugs.launchpad.net/ubuntu/+source/lsb/+bug/938869 comment #24 for an issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:42:36 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Nov 2012 18:42:36 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1351881756.64.0.125551467456.issue14794@psf.upfronthosting.co.za> Mark Dickinson added the comment: Paul: I think you make good arguments that this should be fixed for 3.4. I do however think that for versions earlier than 3.4 this 'fix' would be bordering on a new feature; it's also likely to require significant new code and tests, and so I'd be wary of introducing such a change in a maintenance release. I'd propose to fix this for 3.4 only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:49:03 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Nov 2012 18:49:03 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1351882143.89.0.347375559324.issue14794@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'll look at creating a patch for 3.4 ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:54:51 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 02 Nov 2012 18:54:51 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1351882491.67.0.31460019476.issue16389@psf.upfronthosting.co.za> Antoine Pitrou added the comment: lru_cache() seems to use a complicated make_key() function, which is invoked on each cache hit. The LRU logic is probably on the slow side too, compared to a hand-coded logic which would favour lookup cost over insertion / eviction cost. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:58:59 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 02 Nov 2012 18:58:59 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351882739.2.0.527953543797.issue16353@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 19:59:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 02 Nov 2012 18:59:49 +0000 Subject: [issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh In-Reply-To: <1350421202.49.0.905467284446.issue16255@psf.upfronthosting.co.za> Message-ID: <1351882789.3.0.277464662917.issue16255@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 20:00:43 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 02 Nov 2012 19:00:43 +0000 Subject: [issue16354] Remember python version choice on docs.python.org In-Reply-To: <1351505767.0.0.302833012175.issue16354@psf.upfronthosting.co.za> Message-ID: <1351882843.64.0.239829639102.issue16354@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 20:02:32 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 02 Nov 2012 19:02:32 +0000 Subject: [issue16379] SQLite error code not exposed to python In-Reply-To: <1351764878.68.0.13361347428.issue16379@psf.upfronthosting.co.za> Message-ID: <1351882952.69.0.342214634589.issue16379@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, ghaering stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 20:03:40 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 02 Nov 2012 19:03:40 +0000 Subject: [issue16382] Better warnings exception for bad category In-Reply-To: <1351779406.35.0.0813926106632.issue16382@psf.upfronthosting.co.za> Message-ID: <1351883020.86.0.956749421397.issue16382@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 20:12:52 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 02 Nov 2012 19:12:52 +0000 Subject: [issue16354] Remember python version choice on docs.python.org In-Reply-To: <1351505767.0.0.302833012175.issue16354@psf.upfronthosting.co.za> Message-ID: <1351883572.34.0.235243794833.issue16354@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 20:33:26 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Nov 2012 19:33:26 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351884806.68.0.290706229713.issue16218@psf.upfronthosting.co.za> Stefan Krah added the comment: Serhiy, your original example from msg173373 still fails on FreeBSD: $ name=$(printf "\xff") $ echo "print('Hello, world')" >$name $ ./python $name UnicodeEncodeError: 'ascii' codec can't encode character '\xff' in position 0: ordinal not in range(128) [41257 refs] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 20:37:38 2012 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 02 Nov 2012 19:37:38 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351885058.22.0.174798811547.issue16218@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- nosy: -vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 20:44:15 2012 From: report at bugs.python.org (Jim Pattee) Date: Fri, 02 Nov 2012 19:44:15 +0000 Subject: [issue16383] Python 3.3 Permission Error with User Library on Windows In-Reply-To: <1351790923.15.0.230780432409.issue16383@psf.upfronthosting.co.za> Message-ID: <1351885455.45.0.0634561471243.issue16383@psf.upfronthosting.co.za> Jim Pattee added the comment: The problem is not file permissions nor the install. I did some further testing. The problem actually occurs with the library calls at lines 23 and 25. I changed these lines to eliminate the library call by just hard coding the file path. Change from: line 23: header_path = libastyle.get_astyle_directory() + "/src/astyle.h" line 25: beautifier_path = libastyle.get_astyle_directory() + "/src/ASBeautifier.cpp" Change to: line 23: header_path = "C:\\Users\\jimp\\ZPythonPermissionError\\Projects/AStyle/src/astyle.h" line 25: beautifier_path = "C:\\Users\\jimp\\ZPythonPermissionError\\Projects/AStyle/src/ASBeautifier.cpp" When run with the changes the program worked. The problem is apparently with the library call, not the file itself. Then I changed the same instructions to get the file name using the same instructions that the library program used. The library program uses ?sys.path[0]? to get the directory containing the executed script. Change to: line 23: header_path = sys.path[0] + "/../AStyle/src/astyle.h" line 25: beautifier_path = sys.path[0] + "/../AStyle/src/ASBeautifier.cpp" This also worked. I want to do some more testing this weekend. I will hopefully have more info on Monday. Thanks for your input on this. Apparently this is not a problem on your PC. I have run this on both Windows 7 and Windows 8. I get the same results (a Permission Error) on both. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 20:56:32 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 02 Nov 2012 19:56:32 +0000 Subject: [issue16383] Python 3.3 Permission Error with User Library on Windows In-Reply-To: <1351790923.15.0.230780432409.issue16383@psf.upfronthosting.co.za> Message-ID: <1351886192.0.0.433982582538.issue16383@psf.upfronthosting.co.za> R. David Murray added the comment: Well, I run linux, not Windows. I haven't even looked at your code, frankly, since it is a zip file and includes third party stuff. Maybe a windows dev will find time to look at it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 21:03:28 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 02 Nov 2012 20:03:28 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1351886608.6.0.601380985485.issue16389@psf.upfronthosting.co.za> Brett Cannon added the comment: Would be interesting to know what speed difference would occur if the statistics gathering was optional and turned off. As for _make_key(), I wonder if ``(args, tuple(sorted(kwd.items())))`` as a key would be any faster as a tuple's hash is derived from its contents and not the tuple itself (if I remember correctly). You could even special case when len(kwds) == 0 to skip the sorted(kwd.items()) overhead if it is worth it performance-wise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 21:07:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 02 Nov 2012 20:07:37 +0000 Subject: [issue16261] Fix bare excepts in various places in std lib In-Reply-To: <1350461165.29.0.129000928595.issue16261@psf.upfronthosting.co.za> Message-ID: <3XtZ890cX9zRPd@mail.python.org> Roundup Robot added the comment: New changeset b2bd62d1644f by Andrew Svetlov in branch 'default': Issue #16261: fix bare excepts in Doc/ http://hg.python.org/cpython/rev/b2bd62d1644f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 21:10:18 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 02 Nov 2012 20:10:18 +0000 Subject: [issue16261] Fix bare excepts in various places in std lib In-Reply-To: <1350461165.29.0.129000928595.issue16261@psf.upfronthosting.co.za> Message-ID: <1351887018.71.0.156854937895.issue16261@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I've fixed bare except: in docs. Tomorrow we will have Python sprint in Kiev. Maybe somebody will take a look on Lib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 21:11:34 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 02 Nov 2012 20:11:34 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1351887094.34.0.61287768967.issue16389@psf.upfronthosting.co.za> Brett Cannon added the comment: Ditching the statistics only sped up regex_compile by 2%. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 21:17:25 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 02 Nov 2012 20:17:25 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351887094.34.0.61287768967.issue16389@psf.upfronthosting.co.za> Message-ID: <1351887420.3430.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > Ditching the statistics only sped up regex_compile by 2%. Does explicit compiling even go through the cache? Regardless, the issue here is with performance of cache hits, not cache misses. By construction, you cache something which is costly to compute, so the overhead of a cache miss won't be very noticeable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 21:30:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Nov 2012 20:30:01 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1351884806.68.0.290706229713.issue16218@psf.upfronthosting.co.za> Message-ID: <1351888478.2706.10.camel@raxxla> Serhiy Storchaka added the comment: > Serhiy, your original example from msg173373 still fails on > FreeBSD: Thank you for a report. I have not any ideas what happened (note that error on encoding, not decoding). Can you please show me the results of sys.getdefaultencoding(), sys.getfilesystemencoding(), locale.getpreferredencoding(True), locale.getpreferredencoding(False), the output of locale command? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 21:32:11 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 02 Nov 2012 20:32:11 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351888331.08.0.0594536308558.issue16353@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Is it the "system default shell" or the user's default shell that we want here? That is, shouldn't we look up `pwd.getpwuid(os.getuid()).pw_shell` ? (but only when os.getuid() == os.geteuid()?) ---------- nosy: +gregory.p.smith, neologix, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 21:36:35 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 02 Nov 2012 20:36:35 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1351888595.19.0.777633981148.issue16389@psf.upfronthosting.co.za> Brett Cannon added the comment: re.compile() calls _compile() which has the lru_cache decorator so it will trigger it. But you make a good point, Antoine, that it's the hit overhead here that we care about as long as misses don't get worse as the calculation of is to be cached should overwhelm anything the LRU does. With a simplified _make_key() I can get regex_compile w/ cache clearing turned off to be 1.28x faster by making it be:: if not typed: if len(kwds) == 0: return args, () else: return args, tuple(sorted(kwds.items())) else: if len(kwds) == 0: return (tuple((type(arg), arg) for arg in args), ()) else: return (tuple((type(arg), arg) for arg in args), tuple((type(v), (k, v)) for k, v in kwds.items())) That might not be the fastest way to handle keyword arguments (since regex_compile w/ caching and leaving out the len(kwds) trick out becomes 1.13x slower), but at least for the common case of positional arguments it seems faster and the code is easier to read IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 21:40:04 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Nov 2012 20:40:04 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1351888478.2706.10.camel@raxxla> Message-ID: <20121102204001.GA24581@sleipnir.bytereef.org> Stefan Krah added the comment: This is it: >>> >>> sys.getdefaultencoding() 'utf-8' >>> sys.getfilesystemencoding() 'ascii' >>> locale.getpreferredencoding(True) 'US-ASCII' >>> locale.getpreferredencoding(False) 'US-ASCII' >>> $ locale LANG= LC_CTYPE="C" LC_COLLATE="C" LC_TIME="C" LC_NUMERIC="C" LC_MONETARY="C" LC_MESSAGES="C" LC_ALL= ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 21:47:30 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 02 Nov 2012 20:47:30 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351889250.07.0.260556415661.issue16353@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The system default shell is what I had in mind when filing this issue (i.e. what Popen() uses by default or, in the case of Android, what Popen() should use). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 21:51:46 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 02 Nov 2012 20:51:46 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351889506.04.0.553133183797.issue16218@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Perhaps we have to skip tests if filesystem encoding doesn't support wide characters. Not sure about the way: should we skip if sys.getfilesystemencoding() is not utf8 or better to try encode path and skip if it fails? I think the later is better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 21:53:40 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 02 Nov 2012 20:53:40 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351889250.07.0.260556415661.issue16353@psf.upfronthosting.co.za> Message-ID: <1351889595.3430.4.camel@localhost.localdomain> Antoine Pitrou added the comment: > The system default shell is what I had in mind when filing this issue > (i.e. what Popen() uses by default or, in the case of Android, what > Popen() should use). Well, the question then becomes whether Popen() shouldn't use the user's default shell instead? :) It probably doesn't make much of a difference in most cases, though. Also, there's the problem that some special users may have a void shell entry (or /bin/false or /sbin/nologin), to prevent a human from logging in as them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 21:58:04 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Nov 2012 20:58:04 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351889884.17.0.961728680565.issue1207589@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On pydev, I explained why I think the bug-enhancement policy does not necessarily apply to IDLE, starting the the fact that IDLE was treated as exceptional and not considered bound to normal policy when it was considered for deletion and ending with the fact that exclusionary dichotomous classification is inherently ambiguous in the absence of specification. Leaving that aside, the right-click context menu is not mentioned in the brief Library manual chapter on IDLE. It is a GUI matter. I suspect that the docs also do not specify the right-click behavior of the standard interpreter either. The apparent external GUI standard, at least on Windows, is that context menus have copy, cut, and paste entries as appropriate. I am pretty sure that this could be found in an MS document entitled something like Human Useability Guidelines. By that standard, it was a bug for those to be missing. I know Apple has interface standards docs also, but I don't know what the standard is. For instance, Firefox has Cut Copy and Paste within this edit box, with the first two activated when a selection is made. Outside the edit box, only Cut appears, when a selection is active. I think one could reasonably say that this feature is both a bug fix and an enhancement. After all, all bug fixes are enhancements and all enhancements fix the bug of their absence. We use documented intention to tip the scale one way or the other, but that is completely missing for this feature and mostly missing, except for existence and the common, non-Python-specific meaning of words like 'search box', for everything else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:00:35 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 02 Nov 2012 21:00:35 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351890035.82.0.0191442648112.issue16353@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I guess to return sh if supported, cmd.exe for Windows. The reason is: other shells can have different calling agreements (I mean rules to process command line). subprocess intended to use by library writers, so we need solid well known basis. There are another option ? provide two functions: first for shell in terms of subprocess requirements and second will return actual user shell. I like it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:03:59 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Nov 2012 21:03:59 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1351888478.2706.10.camel@raxxla> Message-ID: <20121102210400.GA24837@sleipnir.bytereef.org> Stefan Krah added the comment: On FreeBSD both Serhiy's original test case as well as the unit test work if the locale is ISO8859-15: >>> sys.getdefaultencoding() 'utf-8' >>> sys.getfilesystemencoding() 'iso8859-15' >>> locale.getpreferredencoding(True) 'ISO8859-15' >>> locale.getpreferredencoding(False) 'ISO8859-15' Naturally, if the locale is utf-8 the test works as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:07:20 2012 From: report at bugs.python.org (Tim Golden) Date: Fri, 02 Nov 2012 21:07:20 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351890035.82.0.0191442648112.issue16353@psf.upfronthosting.co.za> Message-ID: <50943603.9030509@timgolden.me.uk> Tim Golden added the comment: On 02/11/2012 21:00, Andrew Svetlov wrote: > I guess to return sh if supported, cmd.exe for Windows. FWIW the canonical approach on Windows is to return whatever %COMSPEC% points to. ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:14:48 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Nov 2012 21:14:48 +0000 Subject: [issue16335] Integer overflow in unicode-escape decoder In-Reply-To: <1351292121.99.0.943463007307.issue16335@psf.upfronthosting.co.za> Message-ID: <1351890888.86.0.439679872579.issue16335@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I don't know what to make of this, but... Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)] on win32 Win7 pro, 24 gb mem >>> x=(b'\\N{WHITE SMILING FACE' + b'x' * 2**32 + b'}') >>> len(x) 4294967318 >>> y=x.decode('unicode-escape') >>> len(y) 1 >>> y '?' ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:17:59 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 02 Nov 2012 21:17:59 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351891079.01.0.218098995026.issue16353@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Well, the question then becomes whether Popen() shouldn't use the user's default shell instead? :) That's a good question, too. :) I was thinking just in terms of supporting the status quo. Maybe two functions would be useful? (as suggested also by Andrew) I do think the question of changing Popen()'s behavior should be decided independently of this issue though. In other words, even if we change Popen() in the future, I think exposing the system default shell would still be worthwhile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:17:59 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 02 Nov 2012 21:17:59 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351891079.24.0.356336591746.issue16218@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Looking on the last message from Stefan I think we have to check cmdpath to be encoded via sys.getfilesystemencoding() first and skip test if fails. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:25:49 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 02 Nov 2012 21:25:49 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351888331.08.0.0594536308558.issue16353@psf.upfronthosting.co.za> Message-ID: Gregory P. Smith added the comment: > That is, shouldn't we look up `pwd.getpwuid(os.getuid()).pw_shell` ? > (but only when os.getuid() == os.geteuid()?) No, you can't use the users shell from the pwd module. That can be any crazy program. Not a functional /bin/sh for use in making commands when shell=True in subprocess which is where this feature request came from. *system* default, not the user's. subprocess MUST use /bin/sh or equivalent, ignoring any per-user setting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:28:35 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 02 Nov 2012 21:28:35 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351891715.41.0.501283846703.issue16353@psf.upfronthosting.co.za> R. David Murray added the comment: The "system default shell" (which should always be a /bin/sh workalike, I think) should always be the default. Any other shell should be something that has to be specified explicitly. At least, that's the way most posix programs work, I think. As Chris said, different shells can use different syntax, so if you want to write portable code you want to be able to expect /bin/sh by default. So at a minimum we want a function for the system default shell. Anything else is a bonus :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:28:35 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Nov 2012 21:28:35 +0000 Subject: [issue16349] Document whether it's safe to use bytes for struct format string In-Reply-To: <1351428222.6.0.656645524198.issue16349@psf.upfronthosting.co.za> Message-ID: <1351891715.9.0.138388215204.issue16349@psf.upfronthosting.co.za> Terry J. Reedy added the comment: For 3.3, I verified that adding b prefix to first three doc examples gives same output as without, but also discovered that example outputs are wrong, at least on windows, because of byte ordering issues. >>> pack('hhl', 1, 2, 3) b'\x01\x00\x02\x00\x03\x00\x00\x00' >>> pack(b'hhl', 1, 2, 3) b'\x01\x00\x02\x00\x03\x00\x00\x00' >>> unpack(b'hhl', b'\x00\x01\x00\x02\x00\x00\x00\x03') (256, 512, 50331648) >>> unpack('hhl', b'\x00\x01\x00\x02\x00\x00\x00\x03') (256, 512, 50331648) ---------- nosy: +mark.dickinson, meador.inge, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:30:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Nov 2012 21:30:02 +0000 Subject: [issue16335] Integer overflow in unicode-escape decoder In-Reply-To: <1351292121.99.0.943463007307.issue16335@psf.upfronthosting.co.za> Message-ID: <1351891802.26.0.17416007014.issue16335@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Wow! Do we need a test for this case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:34:13 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 02 Nov 2012 21:34:13 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351892053.01.0.217534267792.issue16353@psf.upfronthosting.co.za> Andrew Svetlov added the comment: BTW, according to PEP 11 (http://www.python.org/dev/peps/pep-0011/) Python 3.4 will remove code for "Windows systems where COMSPEC points to command.com". There are only winner: cmd.exe as well known shell good as default, command.com is gone. cmd.exe can be assumed as default shell as well as sh for posix platforms. About subprocess: I like to add something to point str (or pathlib path when accepted) as shell, but it's definitely another issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:36:02 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Nov 2012 21:36:02 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351892162.67.0.0983895133421.issue16218@psf.upfronthosting.co.za> Stefan Krah added the comment: That sounds good for Unix. For Windows I'm getting a more informative error message than from the buildbot output if I run the test via an ssh client: ====================================================================== FAIL: test_non_utf8 (test.test_cmd_line_script.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Users\stefan\pydev\cpython\lib\test\test_cmd_line_script.py", line 373, in test_non_utf8 importlib.machinery.SourceFileLoader) File "C:\Users\stefan\pydev\cpython\lib\test\test_cmd_line_script.py", line 129, in _check_script expected_package, expected_loader) File "C:\Users\stefan\pydev\cpython\lib\test\test_cmd_line_script.py", line 113, in _check_output self.assertIn(printed_file.encode('utf-8'), data) AssertionError: b"__file__=='c:\\\\users\\\\stefan\\\\appdata\\\\local\\\\temp\\\\tmpr6shx4\\\\\\udcf1\\udce a\\udcf0\\udce8\\udcef\\udcf2.py'" not found in b"__loader__==\r \n__file__==''\r\n__package__==None\r\nsys.argv[0]=='c:\\\\users\\\\stefan\\\\appdata\\\\loc al\\\\temp\\\\tmpr6shx4\\\\\\udcf1\\udcea\\udcf0\\udce8\\udcef\\udcf2.py'\r\nsys.path[0]=='c:\\\\users\\\\st efan\\\\appdata\\\\local\\\\temp\\\\tmpr6shx4'\r\ncwd=='C:\\\\Users\\\\stefan\\\\pydev\\\\cpython\\\\build\\ \\test_python_2424'\r\n" It looks to me as if on Windows perhaps some utf-8 encoding steps should be skipped because the file name *is* unicode on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:43:12 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 02 Nov 2012 21:43:12 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351892592.89.0.957483102789.issue16218@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I will fix it tomorrow at Kiev Python sprint. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:43:25 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Nov 2012 21:43:25 +0000 Subject: [issue16354] Remember python version choice on docs.python.org In-Reply-To: <1351505767.0.0.302833012175.issue16354@psf.upfronthosting.co.za> Message-ID: <1351892605.46.0.405017201482.issue16354@psf.upfronthosting.co.za> Terry J. Reedy added the comment: It may be possible, but will not happen. A modern browser should displays your personal history options as you type. If I type 'docs' in Firefox, it gives me choices for the rest of the url, though there are a lot of obsolete entries to delete. Typing and selecting /2/ and /3/ enough will keep them at the top of the list. ---------- nosy: +terry.reedy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:43:37 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Nov 2012 21:43:37 +0000 Subject: [issue16354] Remember python version choice on docs.python.org In-Reply-To: <1351505767.0.0.302833012175.issue16354@psf.upfronthosting.co.za> Message-ID: <1351892617.31.0.191444276955.issue16354@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From mail at timgolden.me.uk Fri Nov 2 22:07:15 2012 From: mail at timgolden.me.uk (Tim Golden) Date: Fri, 02 Nov 2012 21:07:15 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351890035.82.0.0191442648112.issue16353@psf.upfronthosting.co.za> References: <1351890035.82.0.0191442648112.issue16353@psf.upfronthosting.co.za> Message-ID: <50943603.9030509@timgolden.me.uk> On 02/11/2012 21:00, Andrew Svetlov wrote: > I guess to return sh if supported, cmd.exe for Windows. FWIW the canonical approach on Windows is to return whatever %COMSPEC% points to. From report at bugs.python.org Fri Nov 2 22:54:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Nov 2012 21:54:52 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1351892162.67.0.0983895133421.issue16218@psf.upfronthosting.co.za> Message-ID: <1351893583.2706.16.camel@raxxla> Serhiy Storchaka added the comment: > For Windows I'm getting a more informative error message than from the > buildbot output if I run the test via an ssh client: Try with my last patch (pythonrun_filename_decoding_test.patch). It fixes also fail on Linux with 8-bit locale. $ LC_ALL=en_US.ISO-8859-1 LANG=en_US.ISO-8859-1 LANGUAGE= ./python -m test -m test_non_utf8 test_cmd_line_script [1/1] test_cmd_line_script test test_cmd_line_script failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_cmd_line_script.py", line 373, in test_non_utf8 importlib.machinery.SourceFileLoader) File "/home/serhiy/py/cpython/Lib/test/test_cmd_line_script.py", line 129, in _check_script expected_package, expected_loader) File "/home/serhiy/py/cpython/Lib/test/test_cmd_line_script.py", line 113, in _check_output self.assertIn(printed_file.encode('utf-8'), data) AssertionError: b"__file__=='/tmp/tmpda64hd/\\udcf1\\udcea\\udcf0\\udce8 \\udcef\\udcf2.py'" not found in b"__loader__==\n__file__=='/tmp/tmpda64hd/\\xf1\ \xea\\xf0\\xe8\\xef\\xf2.py'\n__package__==None \nsys.argv[0]=='/tmp/tmpda64hd/\\xf1\\xea\\xf0\\xe8\\xef\ \xf2.py'\nsys.path[0]=='/tmp/tmpda64hd'\ncwd=='/home/serhiy/py/cpython/build/test_python_3546'\n" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 22:55:37 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Nov 2012 21:55:37 +0000 Subject: [issue16384] import.c doesn't handle EOFError from PyMarshal_Read* In-Reply-To: <1351796179.35.0.165892579115.issue16384@psf.upfronthosting.co.za> Message-ID: <1351893337.65.0.31378682329.issue16384@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The import machinery was changed in 3.3.0. I suggest checking if it gives you *exactly* the same behavior. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 23:01:36 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 02 Nov 2012 22:01:36 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351893696.47.0.678543220462.issue1207589@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I guess the schema: keep the current state a while. Please test context menu for all configurations you have. If you will have any problem ? commits will be reverted. If anybody will report about backward incompatibility problems ? I'll revert changes. Modifying IDLE extensions is not big deal if somebody need it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 23:22:48 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Nov 2012 22:22:48 +0000 Subject: [issue16385] evaluating literal dict with repeated keys gives no warnings/errors In-Reply-To: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> Message-ID: <1351894968.48.0.193742627481.issue16385@psf.upfronthosting.co.za> Terry J. Reedy added the comment: (Benjamin, did you mean 'silently accepting duplicates'?) Without more use cases and support (from discussion on python-ideas), I think this should be rejected. Being able to re-write keys is fundamental to Python dicts and why they can be used for Python's mutable namespaces. A write-once or write-key-once dict would be something else. As for literals, a code generator could depend on being able to write duplicate keys without having to go back and erase previous output. A lint-type code checker program could check for duplicate keys. OP: have you checked to see if PyLint or PyChecker or ... already do this? I think this is the appropriate place for such a thing. Lukas' code could be modified to do this also. Keeping keys alphabetical (possibly within sections) should also solve this specialized problem. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 23:47:06 2012 From: report at bugs.python.org (Nikolay Bryskin) Date: Fri, 02 Nov 2012 22:47:06 +0000 Subject: [issue16391] terminator argument for logging.FileHandlers Message-ID: <1351896425.99.0.911168182655.issue16391@psf.upfronthosting.co.za> New submission from Nikolay Bryskin: "terminator" argument has appeared in logging.StreamHandler since 3.2, but it also may be useful for FileHandler classes. ---------- components: Library (Lib) messages: 174594 nosy: nikicat priority: normal severity: normal status: open title: terminator argument for logging.FileHandlers type: enhancement versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 2 23:53:41 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Nov 2012 22:53:41 +0000 Subject: [issue16218] Python launcher does not support non ascii characters In-Reply-To: <1351893583.2706.16.camel@raxxla> Message-ID: <20121102225309.GA26015@sleipnir.bytereef.org> Stefan Krah added the comment: Serhiy Storchaka wrote: > Try with my last patch (pythonrun_filename_decoding_test.patch). It > fixes also fail on Linux with 8-bit locale. Unfortunately your last patch does not work on Windows. -- I'm too lazy to step through the domain specific language of test_cmd_line_script.py. Is this what is supposed to be tested: Python 3.4.0a0 (default:b2bd62d1644f+, Nov 2 2012, 22:56:48) [MSC v.1600 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> s = '\udcf1\udcea\udcf0\udce8\udcef\udcf2' >>> f = open(s, "w") >>> f.write('print("hello world")\n') >>> f.close() C:\Users\stefan\pydev\cpython>PCbuild\amd64\python_d.exe ???????? hello world Because that just works without the complex test machinery. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 00:15:47 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 02 Nov 2012 23:15:47 +0000 Subject: [issue16385] evaluating literal dict with repeated keys gives no warnings/errors In-Reply-To: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> Message-ID: <1351898147.95.0.641407771907.issue16385@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 00:21:38 2012 From: report at bugs.python.org (Martin Panter) Date: Fri, 02 Nov 2012 23:21:38 +0000 Subject: [issue13238] Add shell command helpers to subprocess module In-Reply-To: <1319176813.33.0.203455355645.issue13238@psf.upfronthosting.co.za> Message-ID: <1351898498.69.0.825840618919.issue13238@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 00:57:03 2012 From: report at bugs.python.org (Martin Panter) Date: Fri, 02 Nov 2012 23:57:03 +0000 Subject: [issue8604] Adding an atomic FS write API In-Reply-To: <1272890639.26.0.821067455807.issue8604@psf.upfronthosting.co.za> Message-ID: <1351900623.12.0.636550064235.issue8604@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 01:08:42 2012 From: report at bugs.python.org (Martin Panter) Date: Sat, 03 Nov 2012 00:08:42 +0000 Subject: [issue7317] Display full tracebacks when an error occurs asynchronously In-Reply-To: <1258140215.22.0.835793798885.issue7317@psf.upfronthosting.co.za> Message-ID: <1351901322.02.0.39880782747.issue7317@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 01:10:07 2012 From: report at bugs.python.org (Ned Deily) Date: Sat, 03 Nov 2012 00:10:07 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351901407.56.0.802133276236.issue1207589@psf.upfronthosting.co.za> Ned Deily added the comment: "Leaving that aside, the right-click context menu is not mentioned in the brief Library manual chapter on IDLE." FTR, as I pointed out on python-dev, this is no longer true. The IDLE section of the Standard Library documentation, as well as the IDLE help file, were updated by the changes for Issue10405. The changes committed for this issue (#1207589) further updated those to document this new feature. See for instance: http://docs.python.org/2/library/idle.html#edit-context-menu ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 01:48:16 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 03 Nov 2012 00:48:16 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1351903696.04.0.841558169052.issue16389@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 01:56:57 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 03 Nov 2012 00:56:57 +0000 Subject: [issue16335] Integer overflow in unicode-escape decoder In-Reply-To: <1351292121.99.0.943463007307.issue16335@psf.upfronthosting.co.za> Message-ID: <1351904216.82.0.647535974935.issue16335@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >>> x=(b'\\N{WHITE SMILING FACE' + b'x' * 2**16 + b'}') >>> y=x.decode('unicode-escape') Traceback (most recent call last): File "", line 1, in y=x.decode('unicode-escape') UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 0-65557: unknown Unicode character name >>> x=(b'\\N{WHITE SMILING FACE}') >>> y=x.decode('unicode-escape') >>> y '?' A manageable number of extra spaces raises (I presume correctly), an unmagageable number are ignored (as it seems), is bizarre. Creating the long version took about 15 seconds on a fast machine, so test should be limited to test all (slowly) on machine with high memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 02:30:58 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 03 Nov 2012 01:30:58 +0000 Subject: [issue16390] re compilation slow in Python 3.3 due to functools.lru_cache overhead In-Reply-To: <1351881264.39.0.439395849292.issue16390@psf.upfronthosting.co.za> Message-ID: <1351906258.08.0.470797768776.issue16390@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- superseder: -> re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 02:44:33 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 03 Nov 2012 01:44:33 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1351907073.28.0.854874275863.issue16389@psf.upfronthosting.co.za> Nick Coghlan added the comment: Did you try moving the existing single-argument fast path to before the main if statement in _make_key? That is: if not kwds and len(args) == 1: key = args[0] key_type = type(key) if key_type in fasttypes: if typed: return key, key_type return key Such a special case is already present, but it's *after* a lot of the other processing *and* it doesn't fire when typed==True. So instead of the simple 2-tuple creation above, you instead do the relatively wasteful: args + tuple(type(v) for v in args) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 03:29:30 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Nov 2012 02:29:30 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1351909770.84.0.0914879986562.issue16389@psf.upfronthosting.co.za> Ezio Melotti added the comment: > re.compile() calls _compile() which has the lru_cache decorator so it > will trigger it. What's the point of using the lru_cache for compiled regexes? Unless I'm missing something, re.compile() should just return the compiled regex without going though lru_cache and needlessly wasting time and cache's slots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 03:42:50 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Nov 2012 02:42:50 +0000 Subject: [issue16354] Remember python version choice on docs.python.org In-Reply-To: <1351505767.0.0.302833012175.issue16354@psf.upfronthosting.co.za> Message-ID: <1351910570.29.0.82877707625.issue16354@psf.upfronthosting.co.za> Ezio Melotti added the comment: Maybe the OP wanted to get redirected when he reaches a doc page through e.g. Google or a direct link, rather than a bookmark/history/manually-entered URL. I usually get to the docs via Google, and either pick whatever version comes up, or edit the URL manually. That might get in the way when users open a link for a specific version and get redirected, so it's not a really good idea. > If I type 'docs' in Firefox, it gives me choices for the rest of the url You could even set keywords like 'pydoc' and 'py2doc' without relying on the history, and optionally they could supporting a search term too. > That would remove the minor annoyance of always ending up at the > Python 3 documentation and having to switch back to 2.7. Or you could remove the annoyance by switching your code forward to Python 3 . ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 04:19:48 2012 From: report at bugs.python.org (Roger Serwy) Date: Sat, 03 Nov 2012 03:19:48 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351912788.48.0.0540417218463.issue1207589@psf.upfronthosting.co.za> Roger Serwy added the comment: On IDLE Extensions: The public ecosystem of IDLE extensions is small, and even smaller are those that modify rmenu_specs. Changing it is trivial. However, existing users of the Squeezer extension under 2.7 will experience bugs, like triggering issue13582 on Windows. It is possible to make the code in make_rmenu backwards compatible. The attached patch against 2.7 (and 3.4) does it. ---------- Added file: http://bugs.python.org/file27847/backwards_compat.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 08:27:45 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sat, 03 Nov 2012 07:27:45 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351927665.67.0.0502691979754.issue16218@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- title: Python launcher does not support non ascii characters -> Python launcher does not support unicode characters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 09:44:14 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 03 Nov 2012 08:44:14 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1351932254.08.0.2877403154.issue1207589@psf.upfronthosting.co.za> Andrew Svetlov added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 11:50:18 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 03 Nov 2012 10:50:18 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <3Xtxkd27wHzRLB@mail.python.org> Roundup Robot added the comment: New changeset 884c2e93d3f7 by Andrew Svetlov in branch 'default': Issue #16218: Fix broken test for supporting nonascii characters in python launcher http://hg.python.org/cpython/rev/884c2e93d3f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 11:51:30 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 03 Nov 2012 10:51:30 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351939890.69.0.635596240554.issue16218@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I like to follow Stefan suggestion. New test is simple and it works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 12:22:56 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Sat, 03 Nov 2012 11:22:56 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1351941776.62.0.291447292671.issue16309@psf.upfronthosting.co.za> Alexey Kachayev added the comment: Unit test added. pythonpath2.diff is included into issue16309.diff. ---------- nosy: +kachayev Added file: http://bugs.python.org/file27848/issue16309.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 12:23:54 2012 From: report at bugs.python.org (Stefan Krah) Date: Sat, 03 Nov 2012 11:23:54 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1351939890.69.0.635596240554.issue16218@psf.upfronthosting.co.za> Message-ID: <20121103112354.GA32415@sleipnir.bytereef.org> Stefan Krah added the comment: I think this is what went wrong on Windows in the previous test (see Lib/test/test_cmd_line_script.py:43): >>> s = '\udcf1\udcea\udcf0\udce8\udcef\udcf2' >>> f = open(s, "w") >>> f.write("print('%s\\n' % __file__)") >>> f.close() C:\Users\stefan\pydev\cpython>PCbuild\amd64\python_d.exe ???????? So __file__ isn't set correctly, which looks like a bug to me. I'm not sure whether it should be part of this issue or if we should open a new one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 12:28:44 2012 From: report at bugs.python.org (Taras Lyapun) Date: Sat, 03 Nov 2012 11:28:44 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351942124.87.0.939004305106.issue16353@psf.upfronthosting.co.za> Taras Lyapun added the comment: Diff with implementation, test and doc. ---------- keywords: +patch nosy: +lyapun Added file: http://bugs.python.org/file27849/issue16353.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 12:34:21 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 03 Nov 2012 11:34:21 +0000 Subject: [issue13238] Add shell command helpers to subprocess module In-Reply-To: <1319176813.33.0.203455355645.issue13238@psf.upfronthosting.co.za> Message-ID: <1351942461.75.0.954996444977.issue13238@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 12:49:23 2012 From: report at bugs.python.org (Taras Lyapun) Date: Sat, 03 Nov 2012 11:49:23 +0000 Subject: [issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions. In-Reply-To: <1350641726.57.0.22505418852.issue16284@psf.upfronthosting.co.za> Message-ID: <1351943363.92.0.0290068791618.issue16284@psf.upfronthosting.co.za> Taras Lyapun added the comment: Added comments to patch ---------- nosy: +lyapun Added file: http://bugs.python.org/file27850/issue16284_with_comments.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 12:53:07 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 03 Nov 2012 11:53:07 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <3Xtz765hppzMDL@mail.python.org> Roundup Robot added the comment: New changeset 05f8f7544f92 by Andrew Svetlov in branch 'default': Issue #16309: Make PYTHONPATH= behavior the same as if PYTHONPATH not set at all. http://hg.python.org/cpython/rev/05f8f7544f92 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 12:53:49 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 03 Nov 2012 11:53:49 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1351943629.22.0.219257354867.issue16309@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 13:37:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 03 Nov 2012 12:37:47 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <3Xv06f6d9xzMCY@mail.python.org> Roundup Robot added the comment: New changeset 95d1adf144ee by Andrew Svetlov in branch 'default': Issue #16218: skip test if filesystem doesn't support required encoding http://hg.python.org/cpython/rev/95d1adf144ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 13:42:34 2012 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 03 Nov 2012 12:42:34 +0000 Subject: [issue16392] frozen importlib crashes on circular imports in ext modules Message-ID: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> New submission from Stefan Behnel: After compiling the stdlib with Cython with the attached script, modules that use circular imports fail to initialise. That includes os and posixpath, as well as shutil and tarfile. Example: $ ./python -c 'import shutil' Traceback (most recent call last): File "", line 1, in File "tarfile.py", line 44, in init tarfile (tarfile.c:44135) import shutil File "shutil.py", line 14, in init shutil (shutil.c:22497) import tarfile File "", line 1556, in _find_and_load RuntimeError: maximum recursion depth exceeded I've tried this with the latest CPython 3.4 hg version, but I'm pretty sure it fails in Py3.3 as well. ---------- components: Interpreter Core files: cystdlib.py messages: 174612 nosy: scoder priority: normal severity: normal status: open title: frozen importlib crashes on circular imports in ext modules type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file27851/cystdlib.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 13:52:07 2012 From: report at bugs.python.org (Eran Rundstein) Date: Sat, 03 Nov 2012 12:52:07 +0000 Subject: [issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever In-Reply-To: <1350905552.38.0.183421910215.issue16298@psf.upfronthosting.co.za> Message-ID: <1351947127.21.0.260755574002.issue16298@psf.upfronthosting.co.za> Eran Rundstein added the comment: The patch is probably trivial - however I would still like some verification. Would it be correct to call self.close() when fp.read returns ''? In case self.length is not present, I don't see a way around this anyway. When it is present, and fp.read returns '', how should we go about that? We can either return less data, or raise an exception to indicate that the connection terminated prematurely. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 14:15:10 2012 From: report at bugs.python.org (Taras Lyapun) Date: Sat, 03 Nov 2012 13:15:10 +0000 Subject: [issue15641] Clean up importlib for Python 3.4 In-Reply-To: <1344888035.57.0.935580041455.issue15641@psf.upfronthosting.co.za> Message-ID: <1351948510.1.0.301838540927.issue15641@psf.upfronthosting.co.za> Taras Lyapun added the comment: Deleted code, docs, tests, and tests related stuff (like mocks). Test passes. ---------- keywords: +patch nosy: +lyapun Added file: http://bugs.python.org/file27852/issue15641.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 14:20:21 2012 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 03 Nov 2012 13:20:21 +0000 Subject: [issue16393] typo in pkgutil.py Message-ID: <1351948821.5.0.882170021897.issue16393@psf.upfronthosting.co.za> New submission from Stefan Behnel: My guess is that line 454 in pkgutil.py should pass "pkg_name" into the import_module() function, not "pkg". I get the following error when compiling it with Cython: Error compiling Cython file: ------------------------------------------------------------ ... msg = "Relative module name {!r} not supported".format(fullname) raise ImportError(msg) if '.' in fullname: # Get the containing package's __path__ pkg_name = fullname.rpartition(".")[0] pkg = importlib.import_module(pkg) ^ ------------------------------------------------------------ pkgutil.py:454:41: local variable 'pkg' referenced before assignment ---------- components: Library (Lib) messages: 174615 nosy: scoder priority: normal severity: normal status: open title: typo in pkgutil.py type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 14:34:00 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Sat, 03 Nov 2012 13:34:00 +0000 Subject: [issue7317] Display full tracebacks when an error occurs asynchronously In-Reply-To: <1258140215.22.0.835793798885.issue7317@psf.upfronthosting.co.za> Message-ID: <1351949640.29.0.35619552031.issue7317@psf.upfronthosting.co.za> Alexey Kachayev added the comment: Updated test case for traceback printing, fixed test_cmd_line crashing with new ignored exception message formatting (test was based on regular expression). Patch is attached. ---------- nosy: +kachayev Added file: http://bugs.python.org/file27853/issue7317.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 14:36:11 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 03 Nov 2012 13:36:11 +0000 Subject: [issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions. In-Reply-To: <1350641726.57.0.22505418852.issue16284@psf.upfronthosting.co.za> Message-ID: <3Xv1Q24FqNzR9J@mail.python.org> Roundup Robot added the comment: New changeset 70cef0a160cf by Andrew Svetlov in branch 'default': Issue #16284: Prevent keeping unnecessary references to worker functions in concurrent.futures ThreadPoolExecutor. http://hg.python.org/cpython/rev/70cef0a160cf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 14:36:45 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 03 Nov 2012 13:36:45 +0000 Subject: [issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions. In-Reply-To: <1350641726.57.0.22505418852.issue16284@psf.upfronthosting.co.za> Message-ID: <1351949805.82.0.243401928736.issue16284@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed. Thanks. ---------- resolution: -> fixed stage: -> test needed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 14:41:24 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 03 Nov 2012 13:41:24 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351950084.18.0.0786337202417.issue16353@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I would to prefer *get_default_shell* as function name (it's a bit shorter). Also please add ".. versionadded:: 3.4" tag to docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 14:43:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 03 Nov 2012 13:43:43 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1351950223.15.0.34670241224.issue16218@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Andrew, you shod a flea. 1. Now the test skipped on non Cyrillic-compatible locales (such as en_US.ISO-8859-1). 2. On UTF-8 locale the test does not test the bug (it passed even without the patch). Here is a new patch. It should fail on FreeBSD with ASCII locale (because there is a yet not fixed bug), and I don't know how it will behave on Windows. Temporary you can explicitly skip the test for such case: @unittest.skipIf(sys.platform.startswith('freebsd') and sys.getfilesystemencoding() == 'ascii', 'skip on FreeBSD with ASCII filesystem encoding') ---------- Added file: http://bugs.python.org/file27854/pythonrun_filename_decoding_test_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 14:52:51 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 03 Nov 2012 13:52:51 +0000 Subject: [issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions. In-Reply-To: <1350641726.57.0.22505418852.issue16284@psf.upfronthosting.co.za> Message-ID: <1351950771.39.0.865389483798.issue16284@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- stage: test needed -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 14:55:16 2012 From: report at bugs.python.org (Taras Lyapun) Date: Sat, 03 Nov 2012 13:55:16 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351950916.01.0.403348349826.issue16353@psf.upfronthosting.co.za> Taras Lyapun added the comment: > I would to prefer *get_default_shell* as function name (it's a bit shorter). Hm... I'm not sure, because someone can imagine that function returns some object or something like this... 'path' indicates that function returns something like string. > Also please add ".. versionadded:: 3.4" tag to docs. Oh, sorry, added. ---------- Added file: http://bugs.python.org/file27855/issue16353_added_doc_tag.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 14:56:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 03 Nov 2012 13:56:22 +0000 Subject: [issue7317] Display full tracebacks when an error occurs asynchronously In-Reply-To: <1258140215.22.0.835793798885.issue7317@psf.upfronthosting.co.za> Message-ID: <3Xv1sK6kVczPwb@mail.python.org> Roundup Robot added the comment: New changeset a281604a5c9a by Andrew Svetlov in branch 'default': Issue #7317: Display full tracebacks when an error occurs asynchronously. http://hg.python.org/cpython/rev/a281604a5c9a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 15:09:53 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 03 Nov 2012 14:09:53 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351951793.83.0.673115440382.issue16353@psf.upfronthosting.co.za> Christian Heimes added the comment: which('sh') isn't correct here. 'which' searches in all PATH environ parts. However the shell must be looked up in CS_PATH only. >From man sh(1posix): > Applications should note that the standard PATH to the shell cannot be assumed to be either /bin/sh or /usr/bin/sh, and should be determined by interrogation of the PATH returned by getconf PATH , ensuring that the returned pathname is an absolute pathname and not a shell built-in. 'getconf PATH' queries confstr(_CS_PATH). I suggest that you modify the POSIX part to: path = os.confstr("CS_PATH") which('sh', path=path) ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 15:13:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 03 Nov 2012 14:13:20 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351952000.21.0.0969914990744.issue16353@psf.upfronthosting.co.za> Chris Jerdonek added the comment: +++ b/Lib/shutil.py Sat Nov 03 13:32:05 2012 +0200 + +def get_default_shell_path(): Why is the patch putting the function in the shutil module? The function should go in the os module as the title and comments of this issue state. shutil seems misplaced to me. For example, the description of shutil in the docs is, "The shutil module offers a number of high-level operations on files and collections of files. In particular, functions are provided which support file copying and removal." In contrast, the description of the os module is, "This module provides a portable way of using operating system dependent functionality." The default shell is operating system dependent functionality. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 15:14:34 2012 From: report at bugs.python.org (Berker Peksag) Date: Sat, 03 Nov 2012 14:14:34 +0000 Subject: [issue16393] typo in pkgutil.py In-Reply-To: <1351948821.5.0.882170021897.issue16393@psf.upfronthosting.co.za> Message-ID: <1351952074.64.0.591660658604.issue16393@psf.upfronthosting.co.za> Berker Peksag added the comment: Duplicate of issue 16163. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 15:27:02 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Nov 2012 14:27:02 +0000 Subject: [issue16393] typo in pkgutil.py In-Reply-To: <1351948821.5.0.882170021897.issue16393@psf.upfronthosting.co.za> Message-ID: <1351952822.0.0.391107802227.issue16393@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Wrong name in Lib/pkgutil.py:iter_importers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 15:31:41 2012 From: report at bugs.python.org (mike bayer) Date: Sat, 03 Nov 2012 14:31:41 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1351953101.57.0.0767168270281.issue16389@psf.upfronthosting.co.za> mike bayer added the comment: in response to ezio, I poked around the source here, since I've never been sure if re.compile() cached its result or not. It seems to be the case in 2.7 and 3.2 also - 2.7 uses a local caching scheme and 3.2 uses functools.lru_cache, yet we don't see as much of a slowdown with 3.2. so it seems like the caching behavior is precedent here, but I would revert re.py's caching scheme to the one used in 2.7 if the functools.lru_cache can't be sped up very significantly. ideally lru_cache would be native. also does python include any kind of benchmarking unit tests ? over in SQLA we have an approach that fails if the call-counts of various functions, as measured by cProfile, fall outside of a known range. it's caught many issues like these for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 15:48:02 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 03 Nov 2012 14:48:02 +0000 Subject: [issue7317] Display full tracebacks when an error occurs asynchronously In-Reply-To: <1258140215.22.0.835793798885.issue7317@psf.upfronthosting.co.za> Message-ID: <1351954082.95.0.849393982865.issue7317@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed. Thanks, guys! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 15:51:10 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 03 Nov 2012 14:51:10 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351954270.61.0.792882510567.issue16353@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm with Chris. The information should be stored in the os module. I suggest os.shell var or os.get_shell() function like this: def get_shell(): for path in confstr("CS_PATH").split(pathsep): sh = sep.join((path, "sh")) try: mode = stat(sh).st_mode except OSError: pass else: if st.S_ISREG(mode): return sh raise FileNotFound("sh") According to all examples S_ISREG() is sufficient here. On Windows the function should use the env var COMSPEC instead of hard coding "cmd.exe". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:04:58 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 03 Nov 2012 15:04:58 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351955098.65.0.370340918344.issue16353@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Is it ok to import *which* functions from shutil in *os* module? There is only reason to put function into shutil. But I like Christian's sketch. Also, what reason to get shell name from COMSPEC? What should we do if COMSPEC points to some another shell, not cmd.exe? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:08:09 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 03 Nov 2012 15:08:09 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1351955289.94.0.826976355288.issue16389@psf.upfronthosting.co.za> Nick Coghlan added the comment: Now that Brett has a substantial portion of the benchmark suite running on Py3k, we should see a bit more progress on the PyPy-inspired speed.python.org project (which should make it much easier to catch this kind of regression before it hits a production release). In this case, as I noted in my earlier comment, I think the 3.3 changes to make_key broke an important single-argument fast path that the re module was previously relying on, thus the major degradation in performance on a cache hit. I haven't looked into setting up the benchmark suite on my own machine though, so we won't know for sure until either I get around to doing that, or someone with it already set up tries the change I suggested above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:12:37 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 03 Nov 2012 15:12:37 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351955557.78.0.213505546746.issue16353@psf.upfronthosting.co.za> R. David Murray added the comment: I think it would not be ok to import shutil in os, so I'm glad there is an alternative. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:15:19 2012 From: report at bugs.python.org (Carsten Milkau) Date: Sat, 03 Nov 2012 15:15:19 +0000 Subject: [issue16394] Improving tee() memory footprint Message-ID: <1351955719.4.0.453680036148.issue16394@psf.upfronthosting.co.za> New submission from Carsten Milkau: The memory footprint of itertools.tee can be reduced substantially by using a shared buffer for the child iterators (see sample code). If local queues are desired for efficient threading support, they can be combined with a global queue, allowing to constrain the size of local queues. ---------- components: Library (Lib) files: tee.py messages: 174632 nosy: cami priority: normal severity: normal status: open title: Improving tee() memory footprint type: performance versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27856/tee.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:18:21 2012 From: report at bugs.python.org (Simon Law) Date: Sat, 03 Nov 2012 15:18:21 +0000 Subject: [issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list. Message-ID: <1351955901.81.0.627286470446.issue16395@psf.upfronthosting.co.za> New submission from Simon Law: The documentation in Python 2.7, 3.2, and 3.3 claim that: PyObject* PySequence_Fast(PyObject *o, const char *m) Return value: New reference. Returns the sequence o as a tuple, unless it is already a tuple or list, in which case o is returned... Unfortunately, the code does this in Objects/abstract.c: v = PySequence_List(it); And the header file in Include/abstract.h matches the documentation: PyAPI_FUNC(PyObject *) PySequence_Fast(PyObject *o, const char* m); /* Returns the sequence, o, as a tuple, unless it's already a tuple or list. */ ---------- components: Interpreter Core messages: 174633 nosy: sfllaw priority: normal severity: normal status: open title: Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list. type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:22:52 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 03 Nov 2012 15:22:52 +0000 Subject: [issue16396] Importing ctypes.wintypes on Linux gives a traceback Message-ID: <1351956172.0.0.64927799046.issue16396@psf.upfronthosting.co.za> New submission from anatoly techtonik: >>> import ctypes.wintypes Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.2/ctypes/wintypes.py", line 20, in class VARIANT_BOOL(ctypes._SimpleCData): ValueError: _type_ 'v' not supported >>> Shouldn't it just import silently without failing? Or if it's destined to fail, explain how to make a cross-platform import? ---------- components: ctypes messages: 174634 nosy: techtonik priority: normal severity: normal status: open title: Importing ctypes.wintypes on Linux gives a traceback versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:24:30 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 03 Nov 2012 15:24:30 +0000 Subject: [issue16396] Importing ctypes.wintypes on Linux gives a traceback In-Reply-To: <1351956172.0.0.64927799046.issue16396@psf.upfronthosting.co.za> Message-ID: <1351956270.17.0.151801046741.issue16396@psf.upfronthosting.co.za> anatoly techtonik added the comment: Perhaps the patch already there - see http://www.themacaque.com/?p=826 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:25:14 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 15:25:14 +0000 Subject: [issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list. In-Reply-To: <1351955901.81.0.627286470446.issue16395@psf.upfronthosting.co.za> Message-ID: <1351956314.52.0.0385046950371.issue16395@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:32:43 2012 From: report at bugs.python.org (Simon Law) Date: Sat, 03 Nov 2012 15:32:43 +0000 Subject: [issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list. In-Reply-To: <1351955901.81.0.627286470446.issue16395@psf.upfronthosting.co.za> Message-ID: <1351956763.34.0.958882751316.issue16395@psf.upfronthosting.co.za> Simon Law added the comment: It looks like this was caught in the 3.3 branch, but only fixed it in the comment: changeset: 75448:d8f68195210e user: Larry Hastings date: Mon Mar 05 22:59:13 2012 -0800 summary: Fix a comment: PySequence_Fast() creates a list, not a tuple. The included patch applies cleanly to Python 2.7 and 3.2. When applying to 3.3, include the failure in Objects/abstract.c because the same change has already been made. ---------- keywords: +patch Added file: http://bugs.python.org/file27857/16395.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:34:18 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 15:34:18 +0000 Subject: [issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list. In-Reply-To: <1351955901.81.0.627286470446.issue16395@psf.upfronthosting.co.za> Message-ID: <1351956858.77.0.597681709839.issue16395@psf.upfronthosting.co.za> ?ric Araujo added the comment: Larry, any objection to backporting this? ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python, eric.araujo, larry stage: -> patch review versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:40:20 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sat, 03 Nov 2012 15:40:20 +0000 Subject: [issue5184] Add -3 warning for extension types that implement tp_compare but not tp_richcompare In-Reply-To: <1234089256.12.0.28890692519.issue5184@psf.upfronthosting.co.za> Message-ID: <1351957220.36.0.479174653933.issue5184@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:41:41 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sat, 03 Nov 2012 15:41:41 +0000 Subject: [issue5720] ctime: I don't think that word means what you think it means. In-Reply-To: <1239141469.77.0.706973197517.issue5720@psf.upfronthosting.co.za> Message-ID: <1351957301.04.0.344637587335.issue5720@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:43:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 03 Nov 2012 15:43:19 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1351957399.63.0.173490130638.issue16389@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is not only 3.3 regression, this is also 3.2 regression. 3.1, 3.2 and 3.3 have different caching implementation. Mikrobenchmark: $ ./python -m timeit -s "import re" "re.match('', '')" Results: 3.1: 2.61 usec per loop 3.2: 5.77 usec per loop 3.3: 11.8 usec per loop ---------- keywords: +3.2regression nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:45:03 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sat, 03 Nov 2012 15:45:03 +0000 Subject: [issue5141] C API for appending to arrays In-Reply-To: <1233654934.43.0.515749486926.issue5141@psf.upfronthosting.co.za> Message-ID: <1351957503.71.0.483427433936.issue5141@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:47:34 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sat, 03 Nov 2012 15:47:34 +0000 Subject: [issue6933] Threading issue with Tkinter Frame.insert In-Reply-To: <1253206861.41.0.487118668051.issue6933@psf.upfronthosting.co.za> Message-ID: <1351957654.71.0.473669151854.issue6933@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Bump. ---------- nosy: +ramchandra.apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:51:38 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 03 Nov 2012 15:51:38 +0000 Subject: [issue16152] Trailing whitespace makes tokenize.generate_tokens pathological In-Reply-To: <1349557761.41.0.537472367724.issue16152@psf.upfronthosting.co.za> Message-ID: <3Xv4QL1mz6zR8T@mail.python.org> Roundup Robot added the comment: New changeset eb7ea51e658e by Ezio Melotti in branch '2.7': #16152: fix tokenize to ignore whitespace at the end of the code when no newline is found. Patch by Ned Batchelder. http://hg.python.org/cpython/rev/eb7ea51e658e New changeset 3ffff1798ed5 by Ezio Melotti in branch '3.2': #16152: fix tokenize to ignore whitespace at the end of the code when no newline is found. Patch by Ned Batchelder. http://hg.python.org/cpython/rev/3ffff1798ed5 New changeset 1fdeddabddda by Ezio Melotti in branch '3.3': #16152: merge with 3.2. http://hg.python.org/cpython/rev/1fdeddabddda New changeset ed091424f230 by Ezio Melotti in branch 'default': #16152: merge with 3.3. http://hg.python.org/cpython/rev/ed091424f230 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:53:58 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Nov 2012 15:53:58 +0000 Subject: [issue16152] Trailing whitespace makes tokenize.generate_tokens pathological In-Reply-To: <1349557761.41.0.537472367724.issue16152@psf.upfronthosting.co.za> Message-ID: <1351958038.49.0.37421199577.issue16152@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patch! ---------- assignee: -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: -> behavior versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 16:59:26 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Sat, 03 Nov 2012 15:59:26 +0000 Subject: [issue16048] Tutorial-classes-remarks: replace paragraph In-Reply-To: <1348603562.92.0.789475109772.issue16048@psf.upfronthosting.co.za> Message-ID: <1351958366.3.0.277025275848.issue16048@psf.upfronthosting.co.za> Changes by Yongzhi Pan : ---------- nosy: +fossilet _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 17:00:08 2012 From: report at bugs.python.org (=?utf-8?q?C=C3=A9dric_Krier?=) Date: Sat, 03 Nov 2012 16:00:08 +0000 Subject: [issue9625] argparse: Problem with defaults for variable nargs when using choices In-Reply-To: <1282036744.37.0.964764969496.issue9625@psf.upfronthosting.co.za> Message-ID: <1351958408.75.0.113837065751.issue9625@psf.upfronthosting.co.za> C?dric Krier added the comment: Here is a new version of the patch with tests ---------- nosy: +ced Added file: http://bugs.python.org/file27858/issue9625.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 17:06:30 2012 From: report at bugs.python.org (Jim Pattee) Date: Sat, 03 Nov 2012 16:06:30 +0000 Subject: [issue16383] Python 3.3 Permission Error with User Library on Windows In-Reply-To: <1351790923.15.0.230780432409.issue16383@psf.upfronthosting.co.za> Message-ID: <1351958790.59.0.0684968975888.issue16383@psf.upfronthosting.co.za> Jim Pattee added the comment: You have been in contact with my friends at Mensa. Further information: Just branching into the library causes a problem with permissions when opening files, even if the library just immediately returns. Opening the file in the library, before returning to the calling program, will work. You definitely have a problem somewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 17:14:54 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 16:14:54 +0000 Subject: [issue4711] Wide literals in the table of contents overflow in documentation In-Reply-To: <1229878552.94.0.178929851509.issue4711@psf.upfronthosting.co.za> Message-ID: <1351959294.65.0.142176863337.issue4711@psf.upfronthosting.co.za> ?ric Araujo added the comment: Screenshot looks great, +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 17:25:09 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 16:25:09 +0000 Subject: [issue14302] Rename Scripts directory to bin and move python.exe to bin In-Reply-To: <1331742575.57.0.919941207524.issue14302@psf.upfronthosting.co.za> Message-ID: <1351959909.97.0.62087019051.issue14302@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: needs patch -> title: Move python.exe to bin/ -> Rename Scripts directory to bin and move python.exe to bin versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 17:26:21 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 16:26:21 +0000 Subject: [issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable In-Reply-To: <1218820643.64.0.47446345444.issue3561@psf.upfronthosting.co.za> Message-ID: <1351959981.68.0.0295444331202.issue3561@psf.upfronthosting.co.za> ?ric Araujo added the comment: Can this issue be closed? If there are still disagreements about the UI or UX, it could be a separate 3.4 report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 17:26:55 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 03 Nov 2012 16:26:55 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351960015.29.0.213353377043.issue16353@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Also, what reason to get shell name from COMSPEC? What should we do if COMSPEC points to some another shell, not cmd.exe? FWIW, the subprocess module does this (with surrounding code linked after): comspec = os.environ.get("COMSPEC", "cmd.exe") http://hg.python.org/cpython/file/ed091424f230/Lib/subprocess.py#l1060 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 17:29:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 03 Nov 2012 16:29:43 +0000 Subject: [issue4711] Wide literals in the table of contents overflow in documentation In-Reply-To: <1229878552.94.0.178929851509.issue4711@psf.upfronthosting.co.za> Message-ID: <3Xv5GH1JVnzRJl@mail.python.org> Roundup Robot added the comment: New changeset cae65dd22826 by Ezio Melotti in branch '2.7': #4711: break long words in the docs sidebar to avoid overflow. http://hg.python.org/cpython/rev/cae65dd22826 New changeset 1046110a819d by Ezio Melotti in branch '3.2': #4711: break long words in the docs sidebar to avoid overflow. http://hg.python.org/cpython/rev/1046110a819d New changeset 1bdab9112e59 by Ezio Melotti in branch '3.3': #4711: merge with 3.2. http://hg.python.org/cpython/rev/1bdab9112e59 New changeset c6237edff631 by Ezio Melotti in branch 'default': #4711: merge with 3.3. http://hg.python.org/cpython/rev/c6237edff631 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 17:30:58 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Nov 2012 16:30:58 +0000 Subject: [issue4711] Wide literals in the table of contents overflow in documentation In-Reply-To: <1229878552.94.0.178929851509.issue4711@psf.upfronthosting.co.za> Message-ID: <1351960258.37.0.992756741527.issue4711@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: behavior -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 17:33:46 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 Nov 2012 16:33:46 +0000 Subject: [issue15641] Clean up importlib for Python 3.4 In-Reply-To: <1344888035.57.0.935580041455.issue15641@psf.upfronthosting.co.za> Message-ID: <1351960426.4.0.303572818374.issue15641@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the patch, Taras! It looks good and I will apply it when I have time (or some other core dev beats me to it). ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 17:46:25 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 Nov 2012 16:46:25 +0000 Subject: [issue16392] frozen importlib crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1351961185.72.0.392758321574.issue16392@psf.upfronthosting.co.za> Brett Cannon added the comment: I don't mean for this to sound rude, but this seems like a Cython issue and not one for the stdlib. Can you reproduce the problem without using Cython? The new per-module locking mechanism Antoine prevents this from being a problem normally, so it makes me think Cython is at fault here. ---------- nosy: +brett.cannon, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 17:49:57 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 Nov 2012 16:49:57 +0000 Subject: [issue16163] Wrong name in Lib/pkgutil.py:iter_importers In-Reply-To: <1349697246.97.0.772309039282.issue16163@psf.upfronthosting.co.za> Message-ID: <1351961397.77.0.173291751772.issue16163@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 17:53:39 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 03 Nov 2012 16:53:39 +0000 Subject: [issue13615] setup.py register fails with -r argument In-Reply-To: <1324070497.95.0.248126770194.issue13615@psf.upfronthosting.co.za> Message-ID: <1351961619.73.0.168071653349.issue13615@psf.upfronthosting.co.za> anatoly techtonik added the comment: It is ok with http://pypi.python.org/pypi, but not with http://pypi.python.org, for example. Complaining that http://pypi.python.org is not found in .pypirc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 17:58:18 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Nov 2012 16:58:18 +0000 Subject: [issue16392] frozen importlib crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1351961898.9.0.382075040642.issue16392@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, it might be a legitimate issue, but due to the setup needed to reproduce, I would hope a Cython developer could do the diagnosis and possibly submit a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 18:07:43 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 03 Nov 2012 17:07:43 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351962463.91.0.54147044821.issue16353@psf.upfronthosting.co.za> Christian Heimes added the comment: The os module can't import shutil as it would create a circular import. Also shutil.which() does lots of stat calls and we don't want additional stat calls in a core module like os. My implementation requires just one stat() call. COMSPEC can point to an alternative command implementation. That's the point of COMSPEC. Perhaps some people remember 4DOS and 4NT. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 18:21:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 03 Nov 2012 17:21:36 +0000 Subject: [issue16394] Improving tee() memory footprint In-Reply-To: <1351955719.4.0.453680036148.issue16394@psf.upfronthosting.co.za> Message-ID: <1351963296.83.0.670001132586.issue16394@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Why do you think that your implementation uses less memory? You have some measurements confirming it? ---------- nosy: +serhiy.storchaka versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 18:55:21 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 03 Nov 2012 17:55:21 +0000 Subject: [issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list. In-Reply-To: <1351955901.81.0.627286470446.issue16395@psf.upfronthosting.co.za> Message-ID: <1351965321.84.0.0887969953476.issue16395@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PySequence_Tuple() was changed to PySequence_List() in the changeset 4714aff4bf75 in 2004. Are there any measurements which show PySequence_List() faster than PySequence_Tuple() on modern Python? I don't see any references in 4714aff4bf75 description. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 18:58:08 2012 From: report at bugs.python.org (Simon Law) Date: Sat, 03 Nov 2012 17:58:08 +0000 Subject: [issue15125] argparse: positional arguments containing - in name not handled well In-Reply-To: <1340292847.64.0.123942573403.issue15125@psf.upfronthosting.co.za> Message-ID: <1351965488.96.0.04043398729.issue15125@psf.upfronthosting.co.za> Simon Law added the comment: >> But patching the module to allow explicitly setting dest via keyword >> argument shouldn't hurt anybody. > > I agree that it wouldn't hurt anybody. If you can find a way to do > this, feel free to provide a patch. > > However, the correct way to have one name for the attribute (i.e. > dest=) and one name for the help (i.e. metavar=) is to use the > metavar argument like so: > > parser.add_argument('positional_args', metavar='positional-args') I don't think that making ``dest`` more magical is a good idea. In the included patch, you'll find a change that makes the ValueError tell people about ``metavar``, which is the right way to go about things anyway. > That said, this is not the first time I've seen someone run into this > problem. I think the documentation could be improved in a few ways: > > (1) In the "name or flags" section, describe how the flags (for > optional arguments) are translated into both a default "dest" > (stripping initial '-' and converting '-' to '_') and into a default > "metavar" (stripping initial '-' and uppercasing). Part of this is > in the "dest" and "metavar" documentation, but probably belongs up > in the "name or flags" documentation. Add cross-references to "dest" > and "metavar" sections. In the included patch. > (2) In the "name or flags" section, describe how the name (for > positional arguments) are translated into the same default "dest" > and "metavar" (no string munging at all). Again, move stuff from the > "dest" and "metavar" sections as necessary. Add cross-references to > "dest" and "metavar" sections. > > (3) In the "dest" section and somewhere in the "parse_args" section, > describe how "getattr" can be used to get attributes whose names > aren't valid Python identifiers. Maybe cross-reference this section > from the edits in (2). If we make optional and positional arguments consistent, and provide backwards-compatibility for positional arguments, then these two are not necesssary. ---------- nosy: +sfllaw Added file: http://bugs.python.org/file27859/15125-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:01:11 2012 From: report at bugs.python.org (Simon Law) Date: Sat, 03 Nov 2012 18:01:11 +0000 Subject: [issue15125] argparse: positional arguments containing - in name not handled well In-Reply-To: <1340292847.64.0.123942573403.issue15125@psf.upfronthosting.co.za> Message-ID: <1351965671.63.0.681439978278.issue15125@psf.upfronthosting.co.za> Simon Law added the comment: Sorry, there was a small typo in the previous patch. Here's the newer version. ---------- Added file: http://bugs.python.org/file27860/15125-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:04:23 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 03 Nov 2012 18:04:23 +0000 Subject: [issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable In-Reply-To: <1218820643.64.0.47446345444.issue3561@psf.upfronthosting.co.za> Message-ID: <1351965863.65.0.209736739453.issue3561@psf.upfronthosting.co.za> Martin v. L?wis added the comment: As Eric says: any further issues with this change should be reported separately. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:13:13 2012 From: report at bugs.python.org (Jorge Cardona) Date: Sat, 03 Nov 2012 18:13:13 +0000 Subject: [issue16397] UserString doesn't combine nicely with strings Message-ID: <1351966393.52.0.468233404693.issue16397@psf.upfronthosting.co.za> New submission from Jorge Cardona: Hi, I think UserString must play nicely with other standard objects to be useful. For example, right now is not possible to join a list of UserString with a string. This shouldn't fail: from UserString import UserString '.'.join([UserString('some')]) but it fails in 2.7 and it fails too with 3.2 (replacing with collections). I'm assuming most of the user of UserString, use it as a replacement of a string, and it would be great to actually be able to replace strings passed to thid parties with userstrings. I imagine there would be some edge situations harder to resolve, but if someone is just using standard libraries it should be safe to pass a string or an userstring. Bye. ---------- messages: 174658 nosy: Jorge.Cardona priority: normal severity: normal status: open title: UserString doesn't combine nicely with strings type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:15:19 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 18:15:19 +0000 Subject: [issue15125] argparse: positional arguments containing - in name not handled well In-Reply-To: <1340292847.64.0.123942573403.issue15125@psf.upfronthosting.co.za> Message-ID: <1351966519.14.0.55797318282.issue15125@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file27859/15125-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:19:37 2012 From: report at bugs.python.org (Carsten Milkau) Date: Sat, 03 Nov 2012 18:19:37 +0000 Subject: [issue16394] Improving tee() memory footprint In-Reply-To: <1351955719.4.0.453680036148.issue16394@psf.upfronthosting.co.za> Message-ID: <1351966777.77.0.541110677033.issue16394@psf.upfronthosting.co.za> Carsten Milkau added the comment: No. The sample code is a demonstration how to do it, it's by no means a full-fledged patch. The drawback of the current implementation is that if you tee n-fold, and then advance one of the iterators m times, it fills n queues with m references each, for a total of (n-1)*m references. The documentation explicitly mentions this is unfortunate. I only demonstrate that it is perfectly unnecessary to fill n separate queues, as you can use a single queue and index into it. Instead of storing duplicate references, you can store a counter with each cached item reference. Replacing duplicates by refcounts, it turns (n-1)*m references into 2*m references (half of which being the counters). Not in the demo code: you can improve this further by storing items in iterator-local queues when that iterator is the only one that still needs to return it, and in a shared queue with refcount when there are more of them. That way, you eleminate the overhead of storing (item, 1) instead of item for a fix-cost per-iterator. ---------- versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:26:47 2012 From: report at bugs.python.org (Simon Law) Date: Sat, 03 Nov 2012 18:26:47 +0000 Subject: [issue15125] argparse: positional arguments containing - in name not handled well In-Reply-To: <1340292847.64.0.123942573403.issue15125@psf.upfronthosting.co.za> Message-ID: <1351967207.42.0.0919072776293.issue15125@psf.upfronthosting.co.za> Simon Law added the comment: Note that 15125-1.patch applies to Python 2.7 cleanly as it is a bugfix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:31:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 03 Nov 2012 18:31:05 +0000 Subject: [issue16397] UserString doesn't combine nicely with strings In-Reply-To: <1351966393.52.0.468233404693.issue16397@psf.upfronthosting.co.za> Message-ID: <1351967465.01.0.704067036064.issue16397@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Library (Lib) nosy: +rhettinger versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:32:09 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 03 Nov 2012 18:32:09 +0000 Subject: [issue16397] UserString doesn't combine nicely with strings In-Reply-To: <1351966393.52.0.468233404693.issue16397@psf.upfronthosting.co.za> Message-ID: <1351967529.88.0.910423112709.issue16397@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is not a bug, but a potential new feature. Therefore, it can go only into 3.4 (if at all). ---------- nosy: +loewis versions: -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:33:58 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 03 Nov 2012 18:33:58 +0000 Subject: [issue16397] UserString doesn't combine nicely with strings In-Reply-To: <1351966393.52.0.468233404693.issue16397@psf.upfronthosting.co.za> Message-ID: <1351967638.7.0.456513290414.issue16397@psf.upfronthosting.co.za> Martin v. L?wis added the comment: If you want a class that behaves like a string object, you should subclass from str. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:34:30 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 18:34:30 +0000 Subject: [issue10395] new os.path function to extract common prefix based on path components In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1351967670.99.0.637002427502.issue10395@psf.upfronthosting.co.za> ?ric Araujo added the comment: Rafik is working on os.path.commonpath for the bug day. ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:34:32 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 03 Nov 2012 18:34:32 +0000 Subject: [issue12759] "(?P=)" input for Tools/scripts/redemo.py raises unnhandled exception In-Reply-To: <1313495654.73.0.277709437369.issue12759@psf.upfronthosting.co.za> Message-ID: <3Xv82H3bqHzPyx@mail.python.org> Roundup Robot added the comment: New changeset 5b5c2c3b2268 by Ezio Melotti in branch '2.7': #12759: sre_parse now raises a proper error when the name of the group is missing. Initial patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/5b5c2c3b2268 New changeset 29983dd7191e by Ezio Melotti in branch '3.2': #12759: sre_parse now raises a proper error when the name of the group is missing. Initial patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/29983dd7191e New changeset 28be586287c8 by Ezio Melotti in branch '3.3': #12759: merge with 3.2. http://hg.python.org/cpython/rev/28be586287c8 New changeset 3f4fbad75c99 by Ezio Melotti in branch 'default': #12759: merge with 3.3. http://hg.python.org/cpython/rev/3f4fbad75c99 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:36:54 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Nov 2012 18:36:54 +0000 Subject: [issue12759] "(?P=)" input for Tools/scripts/redemo.py raises unnhandled exception In-Reply-To: <1313495654.73.0.277709437369.issue12759@psf.upfronthosting.co.za> Message-ID: <1351967814.75.0.700184257323.issue12759@psf.upfronthosting.co.za> Ezio Melotti added the comment: I updated the patch to use 'missing group name' instead of 'bad group name', and added a couple more tests. This also fixes the issue in redemo.py. Thanks Serhiy and Masha for the patches! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:39:04 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 18:39:04 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1351967944.89.0.364566251752.issue13349@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- title: Uninformal error message in index() and remove() functions -> Non-informative error message in index() and remove() functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:41:57 2012 From: report at bugs.python.org (Sean Ochoa) Date: Sat, 03 Nov 2012 18:41:57 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1351968117.24.0.302036381396.issue13349@psf.upfronthosting.co.za> Sean Ochoa added the comment: Working on issue as part of Python Bug Day, Oct 2012. ---------- nosy: +Sean.Ochoa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:46:19 2012 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 03 Nov 2012 18:46:19 +0000 Subject: [issue6683] smtplib authentication - try all mechanisms In-Reply-To: <1250007436.58.0.446313092376.issue6683@psf.upfronthosting.co.za> Message-ID: <1351968379.13.0.217751295112.issue6683@psf.upfronthosting.co.za> A.M. Kuchling added the comment: The attached patch against trunk (3.4) exercises the multiple-authentication functionality; the SMTP server advertises four different authentication methods, and the code will try CRAM-MD5 first, which will fail, but LOGIN succeeds. If this patch is OK, or if having a test isn't considered necessary, then this bug can be closed. ---------- nosy: +akuchling Added file: http://bugs.python.org/file27861/bug6683-patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:47:43 2012 From: report at bugs.python.org (Jorge Cardona) Date: Sat, 03 Nov 2012 18:47:43 +0000 Subject: [issue16397] UserString doesn't combine nicely with strings In-Reply-To: <1351967638.7.0.456513290414.issue16397@psf.upfronthosting.co.za> Message-ID: Jorge Cardona added the comment: mm, I thought that was impossible, and that I should be using UserString actually. I didn't notice the big warning at the beginning of the section at the docs. Sorry, I will change my code. Thanks. On Sat, Nov 3, 2012 at 2:33 PM, Martin v. L?wis wrote: > > Martin v. L?wis added the comment: > > If you want a class that behaves like a string object, you should subclass > from str. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > -- Jorge Eduardo Cardona jorgeecardona at gmail.com jorge at cardona.co cardona.co github.com/jorgeecardona ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:48:46 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 18:48:46 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1351968526.04.0.830006847807.issue7976@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +easy -patch versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:51:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 03 Nov 2012 18:51:25 +0000 Subject: [issue16394] Improving tee() memory footprint In-Reply-To: <1351955719.4.0.453680036148.issue16394@psf.upfronthosting.co.za> Message-ID: <1351968685.46.0.917820770235.issue16394@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The documentation explicitly mentions this is unfortunate. Ah, here's the thing. The code in the documentation is provided only for the explanation. In fact tee() is implemented in the same way that you suggest (but uses a more efficient deque implementation). I propose to close this issue as invalid. Thanks for the suggestion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:51:38 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Nov 2012 18:51:38 +0000 Subject: [issue8401] Strange behavior of bytearray slice assignment In-Reply-To: <1271259710.42.0.373058487219.issue8401@psf.upfronthosting.co.za> Message-ID: <1351968698.46.0.33554061152.issue8401@psf.upfronthosting.co.za> Mark Dickinson added the comment: The patch looks fine to me. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 19:55:14 2012 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 03 Nov 2012 18:55:14 +0000 Subject: [issue9109] absolute import cleanups for Python 3 In-Reply-To: <1277763863.2.0.681054558963.issue9109@psf.upfronthosting.co.za> Message-ID: <1351968914.16.0.395714846746.issue9109@psf.upfronthosting.co.za> A.M. Kuchling added the comment: It seems to me that this issue was fixed for Python 3.3 by commit 2dd046be2c88 for #2377, which made importlib the implementation of __import__(). Python/import.c now raises a ValueError if level < 0, and the docstring has been corrected to have 'level=0' as the default. I'll therefore close this issue. ---------- nosy: +akuchling resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:03:24 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 19:03:24 +0000 Subject: [issue12634] Random Remarks in class documentation In-Reply-To: <1311575810.71.0.0727071558423.issue12634@psf.upfronthosting.co.za> Message-ID: <1351969404.73.0.905960462459.issue12634@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 to something like Terry?s proposal. ---------- keywords: +easy stage: -> needs patch type: enhancement -> versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:03:55 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 19:03:55 +0000 Subject: [issue12614] Allow to explicitly set the method of urllib.request.Request In-Reply-To: <1311357087.35.0.723496130819.issue12614@psf.upfronthosting.co.za> Message-ID: <1351969435.71.0.776685521117.issue12614@psf.upfronthosting.co.za> ?ric Araujo added the comment: Senthil, any objections on committing this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:11:21 2012 From: report at bugs.python.org (Carsten Milkau) Date: Sat, 03 Nov 2012 19:11:21 +0000 Subject: [issue16394] Improving tee() memory footprint In-Reply-To: <1351955719.4.0.453680036148.issue16394@psf.upfronthosting.co.za> Message-ID: <1351969881.17.0.94806652318.issue16394@psf.upfronthosting.co.za> Carsten Milkau added the comment: Oh great! Then I can use it as-is. How about reassigning the issue to documentation (for clarifying the inefficiency warning)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:11:44 2012 From: report at bugs.python.org (Carsten Milkau) Date: Sat, 03 Nov 2012 19:11:44 +0000 Subject: [issue16394] Improving tee() memory footprint In-Reply-To: <1351955719.4.0.453680036148.issue16394@psf.upfronthosting.co.za> Message-ID: <1351969904.17.0.94429632752.issue16394@psf.upfronthosting.co.za> Changes by Carsten Milkau : ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:17:33 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Nov 2012 19:17:33 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1351970253.86.0.0837661909403.issue14794@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch. ---------- keywords: +patch stage: needs patch -> patch review type: behavior -> enhancement versions: -Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27862/issue14794.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:25:03 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 03 Nov 2012 19:25:03 +0000 Subject: [issue8401] Strange behavior of bytearray slice assignment In-Reply-To: <1271259710.42.0.373058487219.issue8401@psf.upfronthosting.co.za> Message-ID: <3Xv98Z4KD5zPbB@mail.python.org> Roundup Robot added the comment: New changeset 1bd2b272c568 by Ezio Melotti in branch '2.7': #8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now raises an error. http://hg.python.org/cpython/rev/1bd2b272c568 New changeset 8f00af8abaf9 by Ezio Melotti in branch '3.2': #8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now raises an error. http://hg.python.org/cpython/rev/8f00af8abaf9 New changeset 06577f6b1c99 by Ezio Melotti in branch '3.3': #8401: merge with 3.2. http://hg.python.org/cpython/rev/06577f6b1c99 New changeset db40752c6cc7 by Ezio Melotti in branch 'default': #8401: merge with 3.3. http://hg.python.org/cpython/rev/db40752c6cc7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:25:20 2012 From: report at bugs.python.org (Simon Law) Date: Sat, 03 Nov 2012 19:25:20 +0000 Subject: [issue15125] argparse: positional arguments containing - in name not handled well In-Reply-To: <1340292847.64.0.123942573403.issue15125@psf.upfronthosting.co.za> Message-ID: <1351970720.26.0.980080269554.issue15125@psf.upfronthosting.co.za> Simon Law added the comment: 15125-2.patch applies to the default branch. It makes dest behave the same for positional and optional arguments in terms of name mangling. Also, there is a backward-compatibility path in Namespace to support old-style getattr() access. However, it's not documented as we really don't want people to use it. ---------- Added file: http://bugs.python.org/file27863/15125-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:25:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 03 Nov 2012 19:25:54 +0000 Subject: [issue16394] Improving tee() memory footprint In-Reply-To: <1351955719.4.0.453680036148.issue16394@psf.upfronthosting.co.za> Message-ID: <1351970754.69.0.217135778647.issue16394@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: -serhiy.storchaka stage: -> needs patch type: performance -> enhancement versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:28:20 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Nov 2012 19:28:20 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1351970900.58.0.0409354765513.issue14794@psf.upfronthosting.co.za> Mark Dickinson added the comment: I should note that this patch fixes/changes one other aspect of slice.indices: namely that it used to accept a negative length, and return essentially meaningless results in that case: >>> slice(0, 10, 1).indices(-3) (-3, -3, 1) With the patch, it now raises ValueError if given a negative length: >>> slice(0, 10, 1).indices(-3) Traceback (most recent call last): File "", line 1, in ValueError: length should not be negative ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:31:06 2012 From: report at bugs.python.org (Simon Law) Date: Sat, 03 Nov 2012 19:31:06 +0000 Subject: [issue16398] deque.rotate() could be much faster Message-ID: <1351971066.78.0.209275581981.issue16398@psf.upfronthosting.co.za> New submission from Simon Law: If you look at the implementation of deque.rotate(), it does the equivalent of deque.append(deque.popleft()) or deque.appendleft(deque.pop()). Unfortunately, for larger rotations, the pop() and append() calls just do too much work. Since the documentation recommends using rotate() to do slicing-style operations, this could get seriously slow. deque.rotate() could just touch up the internal pointers and use memmove() to realign the data. Benchmarks, of course, would have to be written to make sure this is a win. ---------- components: Library (Lib) messages: 174679 nosy: sfllaw priority: normal severity: normal status: open title: deque.rotate() could be much faster type: performance versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:35:49 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Nov 2012 19:35:49 +0000 Subject: [issue16349] Document whether it's safe to use bytes for struct format string In-Reply-To: <1351428222.6.0.656645524198.issue16349@psf.upfronthosting.co.za> Message-ID: <1351971349.18.0.0884957681374.issue16349@psf.upfronthosting.co.za> Mark Dickinson added the comment: > but also discovered that example outputs are wrong That's documented to some extent: there's a line in the docs that says: "All examples assume a native byte order, size, and alignment with a big-endian machine". Given that little-endian machines are much more common that big-endian these days, it may be worth rewriting the examples for little-endian machines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:36:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 03 Nov 2012 19:36:46 +0000 Subject: [issue8401] Strange behavior of bytearray slice assignment In-Reply-To: <1271259710.42.0.373058487219.issue8401@psf.upfronthosting.co.za> Message-ID: <3Xv9Q52NLVzRHf@mail.python.org> Roundup Robot added the comment: New changeset a7ebc0db5c18 by Ezio Melotti in branch 'default': Merge typo fixes (and the fix for #8401 that I wrongly merged) with 3.3. http://hg.python.org/cpython/rev/a7ebc0db5c18 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:40:04 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Nov 2012 19:40:04 +0000 Subject: [issue16349] Document whether it's safe to use bytes for struct format string In-Reply-To: <1351428222.6.0.656645524198.issue16349@psf.upfronthosting.co.za> Message-ID: <1351971604.03.0.11210970073.issue16349@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Also it would be nice to clarify if struct.Struct.format is meant to be > a byte string. Hmm. That seems wrong to me. After all, the format string is supposed to be a piece of human-readable text rather than a collection of bytes. I think it's borderline acceptable to allow a bytes instance to be passed in for the format (practicality beats purity and all that), but I'd say that the output format should definitely be unicode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:42:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 03 Nov 2012 19:42:03 +0000 Subject: [issue16398] deque.rotate() could be much faster In-Reply-To: <1351971066.78.0.209275581981.issue16398@psf.upfronthosting.co.za> Message-ID: <1351971723.87.0.807271975631.issue16398@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Extension Modules -Library (Lib) stage: -> needs patch versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:42:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 03 Nov 2012 19:42:26 +0000 Subject: [issue16398] deque.rotate() could be much faster In-Reply-To: <1351971066.78.0.209275581981.issue16398@psf.upfronthosting.co.za> Message-ID: <1351971746.18.0.471572917852.issue16398@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:43:04 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 03 Nov 2012 19:43:04 +0000 Subject: [issue16398] deque.rotate() could be much faster In-Reply-To: <1351971066.78.0.209275581981.issue16398@psf.upfronthosting.co.za> Message-ID: <1351971784.86.0.664566086509.issue16398@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 20:54:44 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Nov 2012 19:54:44 +0000 Subject: [issue8401] Strange behavior of bytearray slice assignment In-Reply-To: <1271259710.42.0.373058487219.issue8401@psf.upfronthosting.co.za> Message-ID: <1351972484.1.0.198581078848.issue8401@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 21:08:27 2012 From: report at bugs.python.org (hideaki) Date: Sat, 03 Nov 2012 20:08:27 +0000 Subject: [issue10796] readline completion flaw In-Reply-To: <1293714489.48.0.717157988045.issue10796@psf.upfronthosting.co.za> Message-ID: <1351973307.53.0.752546966179.issue10796@psf.upfronthosting.co.za> hideaki added the comment: I think this is the default behavior of readline module. the default word delimiters for completion contains dash(-). so completion breaks at dash. >>> import readline >>> readline.get_completer_delims() ' \t\n`~!@#$%^&*()-=+[{]}\\|;:\'",<>/?' In contrast, the default word delimitors of GNU readline is "\t\n\"\\'`@$><=;|&{(" and perl binding does not change it. when I remove dash from delims like below, it works. >>> readline.set_completer_delims(readline.get_completer_delims().replace('-', '')) >>> input() a- a-bc a-de a- ---------- nosy: +hideaki_t _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 21:11:51 2012 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 03 Nov 2012 20:11:51 +0000 Subject: [issue16392] frozen importlib crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1351973511.32.0.329876856636.issue16392@psf.upfronthosting.co.za> Stefan Behnel added the comment: Well, it's not like the setup was all that difficult. 1) Install the latest github master of Cython (they provide one-click archives that pip can install for you), 2) change into the CPython stdlib directory and run the script I attached, 3) execute "import os" in Python. You need to install Cython rather than just unpacking it because it uses 2to3 for installation in Py3. Anyway, I ran gdb on it and it turns out that the exception is correct, there is an infinite recursion taking place. According to the (otherwise not very interesting) stack trace at the point where it raises the RuntimeError, the module init function of the first Cython module (say, "os") calls the builtin "__import__()" to import "posixpath". That triggers the load of that shared library and the execution of its module init function. Fine so far. However, that module init function then executes an import of "os" through "__import__()", which then runs the module init function of the "os" module again. Bug right here. It shouldn't try to reimport a module that it is already importing. I could reduce the test case down to one line: # reimport.py import reimport Compiling that with Cython gives the C code I attached. Build it, import it, see it fail. However, remember that fixing only this isn't enough, the import cycle might be nested arbitrarily deep. ---------- versions: +Python 3.3 Added file: http://bugs.python.org/file27864/reimport.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 21:13:25 2012 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 03 Nov 2012 20:13:25 +0000 Subject: [issue16392] frozen importlib crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1351973605.88.0.58440092571.issue16392@psf.upfronthosting.co.za> Changes by Stefan Behnel : Added file: http://bugs.python.org/file27865/cystdlibbug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 21:16:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Nov 2012 20:16:49 +0000 Subject: [issue6584] gzip module has no custom exception In-Reply-To: <1248675050.27.0.747048824781.issue6584@psf.upfronthosting.co.za> Message-ID: <1351973809.43.0.177669814429.issue6584@psf.upfronthosting.co.za> Ezio Melotti added the comment: The new exception should also be documented, and a versionadded and Doc/whatsnew/3.4.rst entry added. ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 21:17:08 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 20:17:08 +0000 Subject: [issue10796] readline completion flaw In-Reply-To: <1293714489.48.0.717157988045.issue10796@psf.upfronthosting.co.za> Message-ID: <1351973828.19.0.723784375739.issue10796@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think I get it: Python sets custom delimiters that include '-' because for the Python REPL, it?s not possible to have one identifier with a dash, so it?s considered a delimiter and when you press tab, a new completion is started. For a custom REPL however, you may want to have dashes as legal parts of your completed words, so you want to call set_completer_delims. Reclassifying as a doc patch. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) keywords: +easy nosy: +docs at python stage: -> needs patch versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 21:18:10 2012 From: report at bugs.python.org (Guillaume P) Date: Sat, 03 Nov 2012 20:18:10 +0000 Subject: =?utf-8?q?=5Bissue13424=5D_Add_examples_for_open=E2=80=99s_new_opener_arg?= =?utf-8?q?ument?= In-Reply-To: <1321609933.89.0.531165464334.issue13424@psf.upfronthosting.co.za> Message-ID: <1351973890.77.0.308595036317.issue13424@psf.upfronthosting.co.za> Guillaume P added the comment: Here is a proposed patch to the documentation. ---------- keywords: +patch nosy: +guillaumep Added file: http://bugs.python.org/file27866/13424.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 21:20:17 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Nov 2012 20:20:17 +0000 Subject: [issue16163] Wrong name in Lib/pkgutil.py:iter_importers In-Reply-To: <1349697246.97.0.772309039282.issue16163@psf.upfronthosting.co.za> Message-ID: <1351974017.06.0.848811845546.issue16163@psf.upfronthosting.co.za> Ezio Melotti added the comment: I don't think it's necessary to check for UnboundLocalError/NameError in the tests. ---------- nosy: +ezio.melotti priority: normal -> high stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 21:21:36 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 20:21:36 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351974096.04.0.685876161532.issue16353@psf.upfronthosting.co.za> ?ric Araujo added the comment: Any interest in doing like os.get_terminal_size/shutil.get_terminal_size with the os function being basic (i.e. current patch) and the shutil version querying the env var SHELL in addition? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 21:27:38 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 20:27:38 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1351974458.71.0.0821122686254.issue16353@psf.upfronthosting.co.za> ?ric Araujo added the comment: Please use ``sh`` or maybe :command:`sh` (check the sphinx doc) instead of `sh`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 21:53:23 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 03 Nov 2012 20:53:23 +0000 Subject: [issue1605192] Make Imap Error more helpful Message-ID: <1351976003.14.0.71140808054.issue1605192@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can this be closed as the code from rev. 54343 is live on Python 3.3. See also Issue6426. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:02:46 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 03 Nov 2012 21:02:46 +0000 Subject: [issue4683] urllib2.HTTPDigestAuthHandler fails on third hostname? In-Reply-To: <1229523259.96.0.571468029932.issue4683@psf.upfronthosting.co.za> Message-ID: <1351976566.58.0.500551926927.issue4683@psf.upfronthosting.co.za> Mark Lawrence added the comment: Are the tests for HTTPAuthDigest still outstanding? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:05:33 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 03 Nov 2012 21:05:33 +0000 Subject: [issue16336] Check input in surrogatepass error handler In-Reply-To: <1351332370.82.0.307074271772.issue16336@psf.upfronthosting.co.za> Message-ID: <3XvCNV3PRhzPnk@mail.python.org> Roundup Robot added the comment: New changeset 18ed608ee594 by Ezio Melotti in branch '3.2': #16336: fix input checking in the surrogatepass error handler. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/18ed608ee594 New changeset 8d5c147f030d by Ezio Melotti in branch '3.3': #16336: merge with 3.2. http://hg.python.org/cpython/rev/8d5c147f030d New changeset e4aedd239e45 by Ezio Melotti in branch 'default': #16336: merge with 3.3. http://hg.python.org/cpython/rev/e4aedd239e45 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:09:52 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Nov 2012 21:09:52 +0000 Subject: [issue16336] Check input in surrogatepass error handler In-Reply-To: <1351332370.82.0.307074271772.issue16336@psf.upfronthosting.co.za> Message-ID: <1351976992.68.0.949113327722.issue16336@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks for spotting the error and fixing it! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:10:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 03 Nov 2012 21:10:12 +0000 Subject: =?utf-8?q?=5Bissue13424=5D_Add_examples_for_open=E2=80=99s_new_opener_arg?= =?utf-8?q?ument?= In-Reply-To: <1321609933.89.0.531165464334.issue13424@psf.upfronthosting.co.za> Message-ID: <3XvCTs6DFQzMMp@mail.python.org> Roundup Robot added the comment: New changeset 17b094c08600 by ?ric Araujo in branch '3.3': Add examples for opener argument of open (#13424). http://hg.python.org/cpython/rev/17b094c08600 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:11:28 2012 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 03 Nov 2012 21:11:28 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1351977088.63.0.701491919555.issue16392@psf.upfronthosting.co.za> Stefan Behnel added the comment: Since it's quite possible that this has nothing to do with the frozen part of the importlib specifically, I'm removing that bit from the ticket title. ---------- title: frozen importlib crashes on circular imports in ext modules -> import crashes on circular imports in ext modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:11:57 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Nov 2012 21:11:57 +0000 Subject: [issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2? In-Reply-To: <1351359067.41.0.359232821509.issue16339@psf.upfronthosting.co.za> Message-ID: <1351977117.66.0.657003251485.issue16339@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:13:53 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 21:13:53 +0000 Subject: =?utf-8?q?=5Bissue13424=5D_Add_examples_for_open=E2=80=99s_new_opener_arg?= =?utf-8?q?ument?= In-Reply-To: <1321609933.89.0.531165464334.issue13424@psf.upfronthosting.co.za> Message-ID: <1351977233.78.0.896434132889.issue13424@psf.upfronthosting.co.za> ?ric Araujo added the comment: Fixed, thanks! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:14:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 03 Nov 2012 21:14:35 +0000 Subject: =?utf-8?q?=5Bissue13424=5D_Add_examples_for_open=E2=80=99s_new_opener_arg?= =?utf-8?q?ument?= In-Reply-To: <1321609933.89.0.531165464334.issue13424@psf.upfronthosting.co.za> Message-ID: <1351977275.06.0.931814115928.issue13424@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See my comments in Rietveld. ---------- nosy: +serhiy.storchaka type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:15:31 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 21:15:31 +0000 Subject: =?utf-8?q?=5Bissue13424=5D_Add_examples_for_open=E2=80=99s_new_opener_arg?= =?utf-8?q?ument?= In-Reply-To: <1321609933.89.0.531165464334.issue13424@psf.upfronthosting.co.za> Message-ID: <1351977331.96.0.698035008267.issue13424@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: fixed -> stage: committed/rejected -> commit review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:27:17 2012 From: report at bugs.python.org (Robert de Vries) Date: Sat, 03 Nov 2012 21:27:17 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1351978037.69.0.537042269524.issue10030@psf.upfronthosting.co.za> Robert de Vries added the comment: Attached you will find the updated patch for the python 3 tree as of now. I have measured a speed-up of more than a factor 100. ---------- nosy: +rhdv Added file: http://bugs.python.org/file27867/zipdecrypt-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:28:33 2012 From: report at bugs.python.org (Robert de Vries) Date: Sat, 03 Nov 2012 21:28:33 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1351978113.94.0.985426589669.issue10030@psf.upfronthosting.co.za> Robert de Vries added the comment: Patch for python 2.7 Same patch as for python 3, backported to python 2.7 Tested on Linux only. ---------- Added file: http://bugs.python.org/file27868/zipdecrypt-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:41:59 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 21:41:59 +0000 Subject: =?utf-8?q?=5Bissue13424=5D_Add_examples_for_open=E2=80=99s_new_opener_arg?= =?utf-8?q?ument?= In-Reply-To: <1321609933.89.0.531165464334.issue13424@psf.upfronthosting.co.za> Message-ID: <1351978919.26.0.789568685231.issue13424@psf.upfronthosting.co.za> ?ric Araujo added the comment: fd leak fixed in 95ea024f0569. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:42:08 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Nov 2012 21:42:08 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1351978928.21.0.109040107838.issue14794@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch (only cosmetic fixes with respect to the first patch). Thanks Ezio Melotti for comments on #python-dev. ---------- Added file: http://bugs.python.org/file27869/issue14794_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:50:26 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 21:50:26 +0000 Subject: [issue16304] re: Match Objects always have a boolean value of True In-Reply-To: <1350993549.54.0.0789320233606.issue16304@psf.upfronthosting.co.za> Message-ID: <1351979426.77.0.626604710719.issue16304@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the patch. Note that :const:`True` should be ``True``. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:50:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Nov 2012 21:50:42 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1351979442.17.0.345314289264.issue16392@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Are you sure this worked before 3.3? Regardless, it seems you could fix this issue by adding a single line just after the PyModule_Create() call: __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (PyDict_SetItemString(PyImport_GetModuleDict(), __Pyx_NAMESTR("reimport"), __pyx_m)) goto __pyx_L1_error; The fundamental issue is that an extension is inserted into sys.modules only after its initialization function returns, so importing it recursively won't detect that it already exists. (by contrast, a Python module is inserted into sys.modules before its code is executed inside the module's global namespace) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:50:47 2012 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 03 Nov 2012 21:50:47 +0000 Subject: [issue16024] Doc cleanup regarding path=fd, dir_fd, follow_symlinks, etc In-Reply-To: <1348500599.22.0.118178834994.issue16024@psf.upfronthosting.co.za> Message-ID: <1351979447.3.0.0128113066239.issue16024@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Patch looks good with two small changes. * "for consistency's sakes" is used in 2 places; this should be "sake", not the plural "sakes". * "Normally the *path* argument specified to functions": 'specified to' sounds wrong, and IMHO would be better as 'provided to' or 'passed to'. The last hunk in the patch to 3.3.rst, but the new text still seems an improvement. ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:53:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Nov 2012 21:53:42 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1351979622.95.0.605039469042.issue16392@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A simple test seems to confirm the problem already existed in 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 22:54:56 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 03 Nov 2012 21:54:56 +0000 Subject: [issue5411] Add xz support to shutil In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1351979696.47.0.0579505996065.issue5411@psf.upfronthosting.co.za> ?ric Araujo added the comment: I will upload my patch and compare it with Serhiy?s. Now that 3.3.0 is released, there is no hurry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:00:03 2012 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 03 Nov 2012 22:00:03 +0000 Subject: [issue11166] No exit when daemon thread is running. In-Reply-To: <1297309203.91.0.996465848565.issue11166@psf.upfronthosting.co.za> Message-ID: <1351980003.83.0.824435056674.issue11166@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Closing, since the original reporter believes the problem was fixed. ---------- nosy: +akuchling resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:01:06 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Nov 2012 22:01:06 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1351980066.71.0.522982055317.issue16392@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Note that Py_InitModule4 in Python 2 did add the module object to sys.modules (by calling PyImport_AddModule) before returning, but PyModule_Create in Python 3 doesn't. (PEP 3121 doesn't seem to mention PyModule_Create at all, strangely; it seems the PEP doesn't follow the implementation) ---------- nosy: +loewis versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:03:05 2012 From: report at bugs.python.org (George Peristerakis) Date: Sat, 03 Nov 2012 22:03:05 +0000 Subject: [issue9674] make install DESTDIR=/home/blah fails when the prefix specified is / In-Reply-To: <1282677588.85.0.771807305266.issue9674@psf.upfronthosting.co.za> Message-ID: <1351980185.54.0.556719450285.issue9674@psf.upfronthosting.co.za> George Peristerakis added the comment: Correction a typo error in the test. ---------- Added file: http://bugs.python.org/file27870/issue9674.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:05:08 2012 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 03 Nov 2012 22:05:08 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1351980308.56.0.786404982575.issue9584@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:06:11 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Nov 2012 22:06:11 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1351980371.09.0.960788420089.issue10030@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +serhiy.storchaka versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:13:58 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 03 Nov 2012 22:13:58 +0000 Subject: [issue16349] Document whether it's safe to use bytes for struct format string In-Reply-To: <1351428222.6.0.656645524198.issue16349@psf.upfronthosting.co.za> Message-ID: <1351980838.75.0.480213494459.issue16349@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think the example should be switched *and* the formats should specify the endianess so the examples work on all systems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:15:37 2012 From: report at bugs.python.org (George Peristerakis) Date: Sat, 03 Nov 2012 22:15:37 +0000 Subject: [issue16190] Misleading warning in random module docs In-Reply-To: <1349885590.41.0.193272073786.issue16190@psf.upfronthosting.co.za> Message-ID: <1351980937.37.0.209963617808.issue16190@psf.upfronthosting.co.za> Changes by George Peristerakis : ---------- nosy: +George.Peristerakis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:17:30 2012 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 03 Nov 2012 22:17:30 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1351981050.81.0.423688747072.issue9584@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Help is still needed to debug the failing test_glob.py on Windows. I just tried this patch against 3.4trunk. The first hunk of the glob.py patch doesn't apply because 'for name in glob1(None, basename): yield name' was changed to 'yield from glob1(None, basename)'. The tests still pass w/ Ezio's suggested change to use (',' in sub). ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:18:45 2012 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 03 Nov 2012 22:18:45 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1351981125.38.0.978499041216.issue16392@psf.upfronthosting.co.za> Stefan Behnel added the comment: Hmm, we already do that for packages (i.e. when compiling __init__.py). Looks like this just needs to be done for all modules in Py3. And unless there is a compelling reason for Py_InitModule4() not to do it, I think it should be reverted to its Py2 behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:21:38 2012 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 03 Nov 2012 22:21:38 +0000 Subject: [issue7695] missing termios constants In-Reply-To: <1263412950.84.0.252347161386.issue7695@psf.upfronthosting.co.za> Message-ID: <1351981298.75.0.598084883353.issue7695@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Patch seems clearly correct; compiles & works on MacOS. We could just apply this. ---------- nosy: +akuchling versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:31:19 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Nov 2012 22:31:19 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1351981879.58.0.378239765609.issue14794@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated for Serhiy's comments on Rietveld: - fix some refleaks in error cases - streamline the C code somewhat following Serhiy's suggestions. Serhiy: you made a comment on the slice_indices function in test_slice.py: "Can we use Python implementation for builtin object?". I don't understand what you mean---can you elaborate? ---------- Added file: http://bugs.python.org/file27871/issue14794_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:37:03 2012 From: report at bugs.python.org (Sean Ochoa) Date: Sat, 03 Nov 2012 22:37:03 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1351982223.8.0.231702148722.issue13349@psf.upfronthosting.co.za> Sean Ochoa added the comment: It seems that this has been fixed. Using simple tests from msg147215: ~/hg/cpython/working $ env-py3.3/bin/python Python 3.3.0 (default, Nov 3 2012, 15:28:29) [GCC 4.7.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> [].index(list(range(1000))) Traceback (most recent call last): File "", line 1, in ValueError: [0, 1, 2, 3, 4, 5, ... 995, 996, 997, 998, 999] is not in list [60649 refs] >>> class Foo: pass ... [60679 refs] >>> [].index(Foo()) Traceback (most recent call last): File "", line 1, in ValueError: <__main__.Foo object at 0x7f7fad31bc30> is not in list [60677 refs] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:40:51 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Nov 2012 22:40:51 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1351982451.43.0.418174099427.issue16392@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I have detected a compatibility issue when reverting to the 2.x behaviour: extension modules which lie about their name in their PyModuleDef are broken. There are two such modules in 3.3: _io and _decimal. Patch attached, anyway. ---------- keywords: +patch Added file: http://bugs.python.org/file27872/modulecreate.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:41:59 2012 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 03 Nov 2012 22:41:59 +0000 Subject: [issue15076] Sometimes couldn't import os, shown 'import site' failed, use -v for trackback In-Reply-To: <1339753863.16.0.615623699476.issue15076@psf.upfronthosting.co.za> Message-ID: <1351982519.39.0.271390133984.issue15076@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Installation bug; nothing to fix. ---------- nosy: +akuchling resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 3 23:49:12 2012 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 03 Nov 2012 22:49:12 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1351982952.25.0.708797183553.issue16392@psf.upfronthosting.co.za> Stefan Behnel added the comment: Now that you mention it - wouldn't that suffer from not actually knowing the FQMN? There's that hack in the dynlib loader that stores the package context in a global variable so that the module creation function can figure it out. That might be a reason not to register the module automatically. Only the loader would know the correct package, not the module creation code. Also see issue 13429. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 01:03:15 2012 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 04 Nov 2012 00:03:15 +0000 Subject: [issue14713] PEP 414 installation hook fails with an AssertionError In-Reply-To: <1336059741.48.0.751323304263.issue14713@psf.upfronthosting.co.za> Message-ID: <1351987395.27.0.425788214544.issue14713@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Duplicate of #9974. The tokenizer is choking on lines that end in '\'. So even this can't be parsed: a = 1 + \ 2 ---------- nosy: +akuchling superseder: -> tokenizer.untokenize not invariant with line continuations _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 01:30:52 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Nov 2012 00:30:52 +0000 Subject: [issue5894] Lookup of localised language name by ISO 639 language code and reverse look up In-Reply-To: <1241162689.75.0.736429390254.issue5894@psf.upfronthosting.co.za> Message-ID: <1351989052.69.0.497087430607.issue5894@psf.upfronthosting.co.za> ?ric Araujo added the comment: Suggest closing, as pycountry is available and Babel is excellent. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 01:35:16 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Nov 2012 00:35:16 +0000 Subject: [issue4318] optparse: formatting of help text/descriptions In-Reply-To: <1226623065.62.0.674807245437.issue4318@psf.upfronthosting.co.za> Message-ID: <1351989316.56.0.262073892336.issue4318@psf.upfronthosting.co.za> ?ric Araujo added the comment: optparse is not being developed anymore. ---------- nosy: +eric.araujo resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 01:36:09 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Nov 2012 00:36:09 +0000 Subject: [issue4318] optparse: formatting of help text/descriptions In-Reply-To: <1226623065.62.0.674807245437.issue4318@psf.upfronthosting.co.za> Message-ID: <1351989369.37.0.823199297717.issue4318@psf.upfronthosting.co.za> ?ric Araujo added the comment: amk: could you say if this applies to argparse? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 01:37:26 2012 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 04 Nov 2012 00:37:26 +0000 Subject: [issue4318] optparse: formatting of help text/descriptions In-Reply-To: <1226623065.62.0.674807245437.issue4318@psf.upfronthosting.co.za> Message-ID: <1351989446.3.0.896699938778.issue4318@psf.upfronthosting.co.za> A.M. Kuchling added the comment: I have no idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 01:39:29 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Nov 2012 00:39:29 +0000 Subject: [issue15125] argparse: positional arguments containing - in name not handled well In-Reply-To: <1340292847.64.0.123942573403.issue15125@psf.upfronthosting.co.za> Message-ID: <1351989569.45.0.362305257073.issue15125@psf.upfronthosting.co.za> ?ric Araujo added the comment: Will apply the doc patches soon? and wait for Steven?s feedback about the 3.4 behavior change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 01:41:33 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 04 Nov 2012 00:41:33 +0000 Subject: [issue5894] Lookup of localised language name by ISO 639 language code and reverse look up In-Reply-To: <1241162689.75.0.736429390254.issue5894@psf.upfronthosting.co.za> Message-ID: <1351989693.19.0.443111914175.issue5894@psf.upfronthosting.co.za> Christian Heimes added the comment: Agreed! Like time zones country and language information are altered ever so often. Babel, zope.i18n and pyicu provide excellent interfaces to the information and can be updated separately from the stdlib. ---------- nosy: +christian.heimes resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 01:42:59 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 04 Nov 2012 00:42:59 +0000 Subject: [issue7695] missing termios constants In-Reply-To: <1263412950.84.0.252347161386.issue7695@psf.upfronthosting.co.za> Message-ID: <1351989779.34.0.406418560615.issue7695@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch looks good to me but it's missing doc updates. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 01:53:26 2012 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 04 Nov 2012 00:53:26 +0000 Subject: [issue9974] tokenizer.untokenize not invariant with line continuations In-Reply-To: <1285695065.99.0.439423855227.issue9974@psf.upfronthosting.co.za> Message-ID: <1351990406.07.0.0211080867725.issue9974@psf.upfronthosting.co.za> A.M. Kuchling added the comment: I looked at this a bit and made a revised version of the patch that doesn't add any line continuations when the token is ENDMARKER. It works on the example program and a few variations I tried, though I'm not convinced that it'll work for all possible permutations of line continuations, whitespace, and ENDMARKER. (I couldn't find one that failed, though.) Is this worth pursuing? I could put together the necessary test cases. ---------- nosy: +akuchling Added file: http://bugs.python.org/file27873/issue9974-2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 02:06:21 2012 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 04 Nov 2012 01:06:21 +0000 Subject: [issue11313] Speed up default encode()/decode() In-Reply-To: <1298586589.12.0.407554806858.issue11313@psf.upfronthosting.co.za> Message-ID: <1351991181.97.0.0632814219989.issue11313@psf.upfronthosting.co.za> A.M. Kuchling added the comment: MAL suggested adding "a comment explaining why this can be done". If Alexander or someone wants to do that, great! Otherwise, there seems no other reason to leave this issue open. ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 02:11:07 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Nov 2012 01:11:07 +0000 Subject: [issue15837] Added test to test_random.py testing Random.shuffle In-Reply-To: <1346465179.1.0.118516816378.issue15837@psf.upfronthosting.co.za> Message-ID: <3XvJqt2lsnzR7F@mail.python.org> Roundup Robot added the comment: New changeset 58776cc74e89 by Antoine Pitrou in branch 'default': Issue #15837: add some tests for random.shuffle(). http://hg.python.org/cpython/rev/58776cc74e89 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 02:11:50 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 04 Nov 2012 01:11:50 +0000 Subject: [issue15837] Added test to test_random.py testing Random.shuffle In-Reply-To: <1346465179.1.0.118516816378.issue15837@psf.upfronthosting.co.za> Message-ID: <1351991510.63.0.45782237838.issue15837@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed the patch, thank you Alessandro. ---------- assignee: rhettinger -> nosy: +pitrou resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 02:14:15 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sun, 04 Nov 2012 01:14:15 +0000 Subject: [issue16183] ZipExtFile object close without file handle closed In-Reply-To: <1349859552.28.0.331403312725.issue16183@psf.upfronthosting.co.za> Message-ID: <1351991655.26.0.556895915988.issue16183@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: This bug was solved in python 3.2. Pyhton 3.1 is affected. This is not a windows issue: the file reference is kept in all platforms. This seems to be solved in 2c370065c1b4 and 260ff379115c. See issue #9846. ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 02:16:55 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sun, 04 Nov 2012 01:16:55 +0000 Subject: [issue9846] ZipExtFile provides no mechanism for closing the underlying file object In-Reply-To: <1284394640.99.0.715812735205.issue9846@psf.upfronthosting.co.za> Message-ID: <1351991815.63.0.693074439177.issue9846@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: This code was not backported to python 2.7. See Issue #16183 ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 02:18:11 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 04 Nov 2012 01:18:11 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1351991891.59.0.184310277559.issue16392@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Now that you mention it - wouldn't that suffer from not actually > knowing the FQMN? There's that hack in the dynlib loader that stores > the package context in a global variable so that the module creation > function can figure it out. That might be a reason not to register the > module automatically. That's possible (although I would expect a module to know in which package it's supposed to live). Another solution would have been to pass the module object to the init function, instead of letting the init function create it, but it's a bit too late (or too early :-)) to change the extension module init signature again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 02:30:23 2012 From: report at bugs.python.org (Markus Amalthea Magnuson) Date: Sun, 04 Nov 2012 01:30:23 +0000 Subject: [issue16399] argparse: Message-ID: <1351992623.71.0.851432414607.issue16399@psf.upfronthosting.co.za> New submission from Markus Amalthea Magnuson: If the default value for a flag is a list, and the action append is used, argparse doesn't seem to override the default, but instead adding to it. I did this test script: import argparse parser = argparse.ArgumentParser() parser.add_argument( '--foo', action='append', default=['bar1', 'bar2'] ) args = parser.parse_args() print args.foo Output is as follows: $ ./argparse_foo_test.py ['bar1', 'bar2'] $ ./argparse_foo_test.py --foo bar3 ['bar1', 'bar2', 'bar3'] I would expect the last output to be ['bar3']. Is this on purpose (although very confusing) or is it a bug? ---------- components: Library (Lib) files: argparse_foo_test.py messages: 174735 nosy: Markus.Amalthea.Magnuson priority: normal severity: normal status: open title: argparse: type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file27874/argparse_foo_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 02:31:33 2012 From: report at bugs.python.org (Markus Amalthea Magnuson) Date: Sun, 04 Nov 2012 01:31:33 +0000 Subject: [issue16399] argparse: append action with default list adds to list instead of overriding In-Reply-To: <1351992623.71.0.851432414607.issue16399@psf.upfronthosting.co.za> Message-ID: <1351992693.81.0.237660053127.issue16399@psf.upfronthosting.co.za> Changes by Markus Amalthea Magnuson : ---------- title: argparse: -> argparse: append action with default list adds to list instead of overriding _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 02:33:45 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Nov 2012 01:33:45 +0000 Subject: [issue9846] ZipExtFile provides no mechanism for closing the underlying file object In-Reply-To: <1284394640.99.0.715812735205.issue9846@psf.upfronthosting.co.za> Message-ID: <3XvKKz5VvszRF0@mail.python.org> Roundup Robot added the comment: New changeset 6a14f692df1c by Jesus Cea in branch '2.7': Closes #16183: ZipExtFile object close without file handle closed (backporting of Issue #9846) http://hg.python.org/cpython/rev/6a14f692df1c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 02:33:45 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Nov 2012 01:33:45 +0000 Subject: [issue16183] ZipExtFile object close without file handle closed In-Reply-To: <1349859552.28.0.331403312725.issue16183@psf.upfronthosting.co.za> Message-ID: <3XvKKz08hCzR9h@mail.python.org> Roundup Robot added the comment: New changeset 6a14f692df1c by Jesus Cea in branch '2.7': Closes #16183: ZipExtFile object close without file handle closed (backporting of Issue #9846) http://hg.python.org/cpython/rev/6a14f692df1c ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 02:43:41 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Nov 2012 01:43:41 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1351993421.52.0.216303967872.issue16355@psf.upfronthosting.co.za> Ezio Melotti added the comment: That's arguably a bug though. If the pragma was critical the program will silently do the wrong thing by ignoring an existing pragma when the source is missing (e.g. in production, even after passing all the tests locally). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 02:56:18 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sun, 04 Nov 2012 01:56:18 +0000 Subject: [issue11016] Add S_ISDOOR to the stat module In-Reply-To: <1296039446.69.0.66523737586.issue11016@psf.upfronthosting.co.za> Message-ID: <1351994178.43.0.5500477123.issue11016@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: After reviewing the code, I agree with Martin v. L?wis that "stat.py" is a joke. Neither can we trust the numerical constants (each OS is free to choose a different meaning) neither the code in "filemode()" can cope with modes with more than a bit active (like DOORS). I think all this code should be moved to a C module, able to access the underlining real constant definitions. What do you think?. Time to deprecate this and move the functionality into posix module, as suggested by Martin?. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 02:56:32 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sun, 04 Nov 2012 01:56:32 +0000 Subject: [issue11016] Add S_ISDOOR to the stat module In-Reply-To: <1296039446.69.0.66523737586.issue11016@psf.upfronthosting.co.za> Message-ID: <1351994192.57.0.029155353084.issue11016@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 03:13:41 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Nov 2012 02:13:41 +0000 Subject: [issue11313] Speed up default encode()/decode() In-Reply-To: <1298586589.12.0.407554806858.issue11313@psf.upfronthosting.co.za> Message-ID: <1351995221.74.0.590522220773.issue11313@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I don't think a comment explaining that default encoding is utf-8 in python 3.x will improve readability of this code. if (encoding == NULL) return PyUnicode_DecodeUTF8(s, size, errors); seems quite self-explanatory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 03:30:31 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 04 Nov 2012 02:30:31 +0000 Subject: [issue11842] slice.indices with negative step and default stop In-Reply-To: <1302727853.06.0.703796407001.issue11842@psf.upfronthosting.co.za> Message-ID: <1351996231.52.0.995191223135.issue11842@psf.upfronthosting.co.za> Mark Lawrence added the comment: I think this should be closed as slice.indices behaves exactly as I expect it to, and the returned values are for any sequence and not just range(). ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 03:41:24 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Nov 2012 02:41:24 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1351996884.52.0.48612749897.issue5288@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Is it practical to implement GPS time as datetime given that we don't have support for leap seconds? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 03:46:45 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 04 Nov 2012 02:46:45 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1351997205.24.0.47726750261.issue1100942@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone please review this with a view to getting the patch into the 3.4 code base, thanks. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 03:52:48 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Nov 2012 02:52:48 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1351997568.79.0.313895923457.issue13349@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The original example was about tuples and displaying 'x' instead of '4'. Have that and *all* the others been fixed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 03:53:33 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 04 Nov 2012 02:53:33 +0000 Subject: [issue16394] Reducing tee() memory footprint In-Reply-To: <1351955719.4.0.453680036148.issue16394@psf.upfronthosting.co.za> Message-ID: <1351997613.71.0.414687259027.issue16394@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- title: Improving tee() memory footprint -> Reducing tee() memory footprint _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 03:59:26 2012 From: report at bugs.python.org (Dmytro Korsakov) Date: Sun, 04 Nov 2012 02:59:26 +0000 Subject: [issue15001] segmentation fault with del sys.module['__main__'] In-Reply-To: <1338839365.76.0.631007627601.issue15001@psf.upfronthosting.co.za> Message-ID: <1351997966.77.0.131176095468.issue15001@psf.upfronthosting.co.za> Dmytro Korsakov added the comment: I was unable to reproduce the case with stock python 2.7 neither on OSX nor on Linux. System python 3.2 seems to be fine too. At the same time python 2.7 built with debug enabled gets infinite loop and uses all the cpu. However, python 3.4 crashes just as described built both with or without debug flag, and suggested patch fixes it. ---------- nosy: +shaitanich _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 04:01:22 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Nov 2012 03:01:22 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1351998082.44.0.944438210755.issue1100942@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Juarez, Are you planning to implement format validation as you described in msg165882? Without that, date.strptime() is not very useful because it is almost equivalent to datetime.strptime().date(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 04:29:28 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 04 Nov 2012 03:29:28 +0000 Subject: [issue9495] argparse unittest tracebacks are confusing if an error is raised when not expected In-Reply-To: <1280852518.56.0.709280463518.issue9495@psf.upfronthosting.co.za> Message-ID: <1351999768.21.0.473411432905.issue9495@psf.upfronthosting.co.za> Mark Lawrence added the comment: Presumably the implementation of PEP 409 on issue 6210 can be used to fix this problem. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 04:32:40 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Nov 2012 03:32:40 +0000 Subject: [issue15001] segmentation fault with del sys.module['__main__'] In-Reply-To: <1338839365.76.0.631007627601.issue15001@psf.upfronthosting.co.za> Message-ID: <1351999960.21.0.435465784704.issue15001@psf.upfronthosting.co.za> Ezio Melotti added the comment: Same here, I tested the patch on 3.4 (debug and non-debug) and it seems to fix the problem. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 04:56:24 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 04 Nov 2012 03:56:24 +0000 Subject: [issue11797] 2to3 does not correct "reload" In-Reply-To: <1302191844.85.0.922084217825.issue11797@psf.upfronthosting.co.za> Message-ID: <1352001384.7.0.166929024149.issue11797@psf.upfronthosting.co.za> Mark Lawrence added the comment: Please find attached a new file with the copyright notice removed. Would someone like to review it please. ---------- nosy: +BreamoreBoy Added file: http://bugs.python.org/file27875/fix_reload.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 05:14:32 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Nov 2012 04:14:32 +0000 Subject: [issue11797] 2to3 does not correct "reload" In-Reply-To: <1302191844.85.0.922084217825.issue11797@psf.upfronthosting.co.za> Message-ID: <1352002472.8.0.354378249008.issue11797@psf.upfronthosting.co.za> ?ric Araujo added the comment: FixIntern ? FixReload ---------- stage: -> patch review versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 05:14:58 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Nov 2012 04:14:58 +0000 Subject: [issue11797] 2to3 does not correct "reload" In-Reply-To: <1302191844.85.0.922084217825.issue11797@psf.upfronthosting.co.za> Message-ID: <1352002498.52.0.224628677865.issue11797@psf.upfronthosting.co.za> ?ric Araujo added the comment: More importantly, tests would be great. ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 05:18:15 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Nov 2012 04:18:15 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1352002695.82.0.78645138086.issue1100942@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 05:32:01 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Nov 2012 04:32:01 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <1352003521.33.0.804578458031.issue10182@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 05:36:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Nov 2012 04:36:42 +0000 Subject: [issue16048] Tutorial-classes-remarks: replace paragraph In-Reply-To: <1348603562.92.0.789475109772.issue16048@psf.upfronthosting.co.za> Message-ID: <1352003802.06.0.23807741751.issue16048@psf.upfronthosting.co.za> Ezio Melotti added the comment: This seems to be a duplicate of #12634. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Random Remarks in class documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 05:37:12 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Nov 2012 04:37:12 +0000 Subject: [issue12634] Random Remarks in class documentation In-Reply-To: <1311575810.71.0.0727071558423.issue12634@psf.upfronthosting.co.za> Message-ID: <1352003832.96.0.777975347998.issue12634@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #16048. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 06:00:18 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Nov 2012 05:00:18 +0000 Subject: [issue16304] re: Match Objects always have a boolean value of True In-Reply-To: <1350993549.54.0.0789320233606.issue16304@psf.upfronthosting.co.za> Message-ID: <3XvPwK5s7kzR7r@mail.python.org> Roundup Robot added the comment: New changeset dc96df8556d8 by Ezio Melotti in branch '2.7': #16304: clarify match objects docs. Initial patch by Jan Duzinkiewicz. http://hg.python.org/cpython/rev/dc96df8556d8 New changeset 1805fc284201 by Ezio Melotti in branch '3.2': #16304: clarify match objects docs. Initial patch by Jan Duzinkiewicz. http://hg.python.org/cpython/rev/1805fc284201 New changeset 7fde4b4f7e56 by Ezio Melotti in branch '3.3': #16304: merge with 3.2. http://hg.python.org/cpython/rev/7fde4b4f7e56 New changeset 63b45c959a2a by Ezio Melotti in branch 'default': #16304: merge with 3.3. http://hg.python.org/cpython/rev/63b45c959a2a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 06:00:58 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 04 Nov 2012 05:00:58 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1352005258.83.0.957742168424.issue16355@psf.upfronthosting.co.za> R. David Murray added the comment: It doesn't matter whether it is a bug or not (though it is not in the situation I described). The point is that a working program would stop working. That is the kind of breakage our backward compatibility policy is designed to protect against. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 06:01:53 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Nov 2012 05:01:53 +0000 Subject: [issue16304] re: Match Objects always have a boolean value of True In-Reply-To: <1350993549.54.0.0789320233606.issue16304@psf.upfronthosting.co.za> Message-ID: <1352005313.35.0.609233418925.issue16304@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks for the patch! I committed a slightly modified version. ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 06:05:18 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 04 Nov 2012 05:05:18 +0000 Subject: [issue12634] Random Remarks in class documentation In-Reply-To: <1311575810.71.0.0727071558423.issue12634@psf.upfronthosting.co.za> Message-ID: <1352005518.75.0.127390775329.issue12634@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 06:07:01 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 04 Nov 2012 05:07:01 +0000 Subject: [issue16399] argparse: append action with default list adds to list instead of overriding In-Reply-To: <1351992623.71.0.851432414607.issue16399@psf.upfronthosting.co.za> Message-ID: <1352005621.28.0.916535171057.issue16399@psf.upfronthosting.co.za> R. David Murray added the comment: This behavior is inherited from optparse. I think it is more-or-less intentional, and in any case it is of long enough standing that I don't think we can change it. We documented it for optparse in another issue, but I don't think we made the corresponding improvement to the argparse docs. ---------- assignee: -> docs at python components: +Documentation nosy: +bethard, docs at python, r.david.murray versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 06:07:39 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Nov 2012 05:07:39 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1352005659.3.0.528192188399.issue16355@psf.upfronthosting.co.za> Ezio Melotti added the comment: > The point is that a working program would stop working. My point is that the program might not be a "working" program, if the function fails silently. Anyway this function is probably not widely used, so I'm fine either ways. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 07:54:59 2012 From: report at bugs.python.org (Sean Ochoa) Date: Sun, 04 Nov 2012 06:54:59 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1352012099.75.0.246685255075.issue13349@psf.upfronthosting.co.za> Sean Ochoa added the comment: After discussing with folks on the #python-dev tonight, I learned that I was testing with a list and I should've been using a set. I'm working on a patch now, and I'm almost ready to have it reviewed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 08:11:28 2012 From: report at bugs.python.org (Fergus Noble) Date: Sun, 04 Nov 2012 07:11:28 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1352013088.6.0.287772908066.issue5288@psf.upfronthosting.co.za> Fergus Noble added the comment: GPS time doesn't include leap seconds so I think datetime is a good representation. If datetime doesn't know about leap seconds then there would still be some issues with finding the timedelta between a GPS time and a UTC time straddling a leap second but I guess a similar issue also exists with two UTC times. For my application all the times I am dealing with are in a short period and will have the same UTC offset so its a little easier, I can probably avoid most of these issues. However, wouldn't it be possible to implement the general case with a non-constant utcoffset function (and new fromutc implementation) in the tzinfo class? Of course there is no way to properly handle UTC times more than 6 months or so in the future... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 08:31:33 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Nov 2012 07:31:33 +0000 Subject: [issue11842] slice.indices with negative step and default stop In-Reply-To: <1302727853.06.0.703796407001.issue11842@psf.upfronthosting.co.za> Message-ID: <1352014293.46.0.537889482309.issue11842@psf.upfronthosting.co.za> Mark Dickinson added the comment: Agreed. Closing. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 08:41:00 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Sun, 04 Nov 2012 07:41:00 +0000 Subject: [issue12634] Random Remarks in class documentation In-Reply-To: <1311575810.71.0.0727071558423.issue12634@psf.upfronthosting.co.za> Message-ID: <1352014860.98.0.532091902245.issue12634@psf.upfronthosting.co.za> Changes by Yongzhi Pan : ---------- nosy: +fossilet _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 08:47:25 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 Nov 2012 07:47:25 +0000 Subject: [issue11383] compilation seg faults on insanely large expressions In-Reply-To: <1299149806.17.0.789738887671.issue11383@psf.upfronthosting.co.za> Message-ID: <1352015245.44.0.794430741381.issue11383@psf.upfronthosting.co.za> Nick Coghlan added the comment: I've started looking into what would be needed to fix this. The basic problem is that the compilation process involves many recursive operations, but doesn't contain *any* calls to the recursion control functions (http://docs.python.org/3/c-api/exceptions.html#recursion-control). Files to be investigated: Python/ast.c Python/symtable.c Python/compile.c Suspicion should fall immediately on any functions in these files which end with "_stmt" and "_expr". The reason as that these are the self-recursive constructs in the Python grammar: statements can contain other statements (via the compound statements with their nested suites) and expressions can contain other expressions. The symtable analysis also recurses through the block stack via the "analyze_block" function, making that another candidate for flagging with the recursive call functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 08:53:41 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 Nov 2012 07:53:41 +0000 Subject: [issue11383] compilation seg faults on insanely large expressions In-Reply-To: <1299149806.17.0.789738887671.issue11383@psf.upfronthosting.co.za> Message-ID: <1352015621.05.0.0418058737565.issue11383@psf.upfronthosting.co.za> Nick Coghlan added the comment: One caveat on this idea: it may not be possible to use the standard recursion limiting functions here, since the Python level recursion limit is generally set quite low (1000 by default on my Fedora system). While this crash *is* a design flaw in our compiler implementation, whatever enforced limit we choose, we run the risk of breaking currently working applications. Thus, adjusting the target versions to 3.4. The problem still *affects* all versions since 2.5, I'm just indicating that any fix is almost certainly going to be too intrusive to risk in a maintenance release. ---------- versions: +Python 3.4 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 09:30:46 2012 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 04 Nov 2012 08:30:46 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1352017846.57.0.381681266787.issue16392@psf.upfronthosting.co.za> Stefan Behnel added the comment: The problem is a) that the module does not necessarily know to which place it eventually gets installed (Cython relies on the distutils Extension not lying to it, for example, which people do from time to time), and b) that the call to Py_InitModule() only receives the plain module name, not the package path. And yes, as mentioned in the other issue, passing a pointer to a context description struct into the module init function would have been the right thing to change for Py3 and still is the right thing to change for Py4. BTW, I can confirm that registering the module in sys.modules explicitly right after creation works around this issue. Given that Cython needs to know the FQMN at compile time anyway, this works for us. It still leaves the problem open for other extension code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 10:17:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 09:17:17 +0000 Subject: [issue11383] compilation seg faults on insanely large expressions In-Reply-To: <1299149806.17.0.789738887671.issue11383@psf.upfronthosting.co.za> Message-ID: <1352020637.95.0.635998831475.issue11383@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Isn't it a duplicate of issue5765? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 10:18:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 09:18:31 +0000 Subject: [issue11383] compilation seg faults on insanely large expressions In-Reply-To: <1299149806.17.0.789738887671.issue11383@psf.upfronthosting.co.za> Message-ID: <1352020711.17.0.852762634569.issue11383@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> duplicate superseder: -> stack overflow evaluating eval("()" * 30000) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 10:37:05 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 Nov 2012 09:37:05 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1239838657.22.0.326859227165.issue5765@psf.upfronthosting.co.za> Message-ID: <1352021825.95.0.66102577565.issue5765@psf.upfronthosting.co.za> Nick Coghlan added the comment: We want to minimise the risk of breaking working code. Making it easy to adjust this recursion limit separately from the main recursion limit by using a scaling factor is a good way to do that. It shouldn't increase the maintenance burden in any significant way, since the ratio of the stack depth increase in the compiler vs the main interpreter loop should be relatively constant across platforms. Autogenerated code could easily hit the 1000 term limit - if anything, I'd be inclined to set it *higher* than 4 rather than lower, as breaking previously working code in a maintenance release is a bad thing, regardless of our opinion of the sanity of that code. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 10:39:53 2012 From: report at bugs.python.org (Daniel Urban) Date: Sun, 04 Nov 2012 09:39:53 +0000 Subject: [issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains In-Reply-To: <1319611391.89.0.610441716125.issue13266@psf.upfronthosting.co.za> Message-ID: <1352021993.06.0.110466646257.issue13266@psf.upfronthosting.co.za> Daniel Urban added the comment: I've attached a patch addressing the comments on Rietveld. I've added another modification: inspect.signature uses inspect.unwrap. (It already tried to unwrap the function, but it wasn't protected from infinite recursion. I don't know if this worth fixing in 3.3.) ---------- Added file: http://bugs.python.org/file27876/inspect_unwrap_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 10:55:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 09:55:13 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1352022913.96.0.564566233786.issue14794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I don't understand what you mean---can you elaborate? The Python implementation of this method only 40 lines length, including blank lines, docstring and comments. The C implementation requires over 160 lines and less clear. Are there ways to use in Python interpreter core Python implementation for method of builtin class slice. As already used C implementations for some Python-implemented classes. May be add the file _builtins.py where Python version of some cumbersome methods will be implemented? Then execute the followed code on interpreter initialization: from _builtins import slice_indices slice.indices = slice_indices del slice_indices (or an analog in C). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 10:57:35 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 04 Nov 2012 09:57:35 +0000 Subject: [issue16400] update default PyPI behavior in docs re: listing versions Message-ID: <1352023055.39.0.262942434831.issue16400@psf.upfronthosting.co.za> New submission from Chris Jerdonek: There is a mismatch between what PyPI and the docs say regarding listing versions of packages on PyPI. The current docs say, "By default PyPI will list all versions of a given package." (from http://docs.python.org/3.4/distutils/packageindex.html ) However, PyPI says (and behaves) the opposite way, "By default, each new release will hide all other release from the regular display." (from the "releases" management page of a project) ---------- assignee: eric.araujo components: Distutils, Documentation keywords: easy messages: 174769 nosy: chris.jerdonek, eric.araujo, loewis, tarek priority: normal severity: normal status: open title: update default PyPI behavior in docs re: listing versions type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 11:04:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 10:04:39 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1352023479.46.0.872756522317.issue14794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch looks good to me. Now benchmarks and special casing for Py_ssize_t values needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 11:19:24 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Nov 2012 10:19:24 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1352024364.52.0.106409323854.issue14794@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Now benchmarks and special casing for Py_ssize_t values needed. I thought about that, but I don't think it's worth it. I did some quick timings, and as expected the new version of slice.indices is somewhat slower than the original. But I think adding a special case for Py_ssize_t values would be premature optimization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 11:19:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 10:19:32 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1352024372.49.0.793549848386.issue16389@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which reverts 3.1 implementation (and adds some optimization). Microbenchmark: $ ./python -m timeit -s "import re" "re._compile('', 0)" Results: 3.1: 1.45 usec per loop 3.2: 4.45 usec per loop 3.3: 9.91 usec per loop 3.4patched: 0.89 usec per loop ---------- keywords: +patch Added file: http://bugs.python.org/file27877/re_compile_cache.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 11:19:41 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 04 Nov 2012 10:19:41 +0000 Subject: [issue16401] mention PKG-INFO in the documentation Message-ID: <1352024381.32.0.925896266965.issue16401@psf.upfronthosting.co.za> New submission from Chris Jerdonek: Currently, the documentation makes no mention of the PKG-INFO file. It would be useful if the documentation mentioned what this file is and how it is created (e.g. via the sdist command), and also linked to PEP 314. This can be covered somewhere in the distutils documentation: http://docs.python.org/3.4/distutils/index.html Index entries should also be created as appropriate. ---------- assignee: eric.araujo components: Distutils, Documentation messages: 174773 nosy: chris.jerdonek, eric.araujo, ezio.melotti, georg.brandl, tarek priority: normal severity: normal status: open title: mention PKG-INFO in the documentation type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 11:23:48 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 10:23:48 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1352024628.76.0.186401947087.issue14794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Look at compute_slice_indices() in Objects/rangeobject.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 11:25:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 04 Nov 2012 10:25:45 +0000 Subject: [issue16401] mention PKG-INFO in the documentation In-Reply-To: <1352024381.32.0.925896266965.issue16401@psf.upfronthosting.co.za> Message-ID: <1352024745.71.0.248512631003.issue16401@psf.upfronthosting.co.za> Chris Jerdonek added the comment: PEP 345 can also be linked to (Metadata version 1.2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 11:37:02 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Nov 2012 10:37:02 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1352025422.47.0.433824308333.issue14794@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hmm: one more thing that needs to be fixed before this can be committed---the error messages for maltyped start, stop and step are less informative than they used to be. Before the patch: >>> slice(0, 2.3, 4).indices(5) Traceback (most recent call last): File "", line 1, in TypeError: slice indices must be integers or None or have an __index__ method After the patch: >>> slice(0, 2.3, 4).indices(5) Traceback (most recent call last): File "", line 1, in TypeError: 'float' object cannot be interpreted as an integer I'll fix this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 11:51:37 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 04 Nov 2012 10:51:37 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1352021825.95.0.66102577565.issue5765@psf.upfronthosting.co.za> Message-ID: <1352026269.3394.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > Autogenerated code could easily hit the 1000 term limit - if anything, > I'd be inclined to set it *higher* than 4 rather than lower, as > breaking previously working code in a maintenance release is a bad > thing, regardless of our opinion of the sanity of that code. We can simply apply the 1000 limit in Python 3.4 and mark the bug as won't fix in other versions. I don't think adding a scaling factor just to cope with hypothetical silly code is a good thing in the long term. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 12:00:46 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Nov 2012 11:00:46 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1352026846.8.0.0382780401053.issue14794@psf.upfronthosting.co.za> Mark Dickinson added the comment: New patch that fixes the error message for badly typed slice arguments. Also tweaks a couple of other details: - replace Py_GE with Py_GT, Py_LE with Py_LT in the out-of-range comparisons, as suggested by Serhiy; this also makes it more closely match the Python reference implementation (since max(x, y) and min(x, y) both return x when x and y are equal) - make sure exception messages match between the Python reference implementation and the C version. > Look at compute_slice_indices() in Objects/rangeobject.c. Will do. I'm not quite sure I even understand how that code's managing to work at the moment: I see the Py_ssize_t case, but I don't see the fallback code for the case when things are too large for a Py_ssize_t. ---------- Added file: http://bugs.python.org/file27878/issue14794_v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 12:09:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 11:09:55 +0000 Subject: =?utf-8?q?=5Bissue13424=5D_Add_examples_for_open=E2=80=99s_new_opener_arg?= =?utf-8?q?ument?= In-Reply-To: <1321609933.89.0.531165464334.issue13424@psf.upfronthosting.co.za> Message-ID: <1352027394.99.0.396110604586.issue13424@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Isn't it be clearer? >>> import os >>> dir_fd = os.open('somedir', os.O_RDONLY) >>> def opener(path, flags): ... return os.open(path, flags, dir_fd=dir_fd) ... >>> with open('spamspam.txt', 'w', opener=opener) as f: ... print('This will be written to somedir/spamspam.txt', file=f) ... >>> os.close(dir_fd) # don't leak a file descriptor Or if you want stronger example: >>> import os, contextlib, functools >>> @contextlib.contextmanager ... def open_relative(dirname): ... dir_fd = os.open(dirname, os.O_RDONLY) ... def opener(path, flags): ... return os.open(path, flags, dir_fd=dir_fd) ... try: ... yield functools.partial(open, opener=opener) ... finally: ... os.close(dir_fd) ... >>> with open_relative('somedir') as open: ... with open('spamspam.txt', 'w') as f: ... print('This will be written to somedir/spamspam.txt', file=f) ... Frankly speaking, all of these examples looks unconvincing to me. Even the second example could be implemented without an "opener" argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 12:11:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 11:11:56 +0000 Subject: [issue16183] ZipExtFile object close without file handle closed In-Reply-To: <1349859552.28.0.331403312725.issue16183@psf.upfronthosting.co.za> Message-ID: <1352027516.73.0.267181059983.issue16183@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: -Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 12:19:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 11:19:53 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1352027993.65.0.984094645595.issue14794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: compute_slice_indices() and slice_indices() looks as partially duplicates. I think the similar code should be merged and reused. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 12:26:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 04 Nov 2012 11:26:06 +0000 Subject: [issue16108] Include maintainer information in register/upload In-Reply-To: <1349154240.01.0.151032575778.issue16108@psf.upfronthosting.co.za> Message-ID: <1352028366.06.0.085670080686.issue16108@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Previous issues like this include issue 962772 (from 5/2004) and issue 3686 (from 8/2008). Copying the nosy lists from those issues. This issue affects me also because I maintain a project that I did not author. However, PyPI lists me as the author because of distutils's maintainer/author replacement logic when generating PKG-INFO. This issue has come up before, and PyPI continues to list "maintainers" as "authors" because of it. Whether or not we start sending both pieces of data, can PyPI perhaps be updated to display "Contact" instead of "Author" when Metadata-Version 1.1 is used? This seems better to me because distutils is not actually sending the author but rather contact information in this case (method get_contact())? http://hg.python.org/cpython/file/63b45c959a2a/Lib/distutils/dist.py#l1025 ---------- nosy: +akitada, chris.jerdonek, jbelmonte, lemburg, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 12:27:44 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Nov 2012 11:27:44 +0000 Subject: [issue16402] range slicing swallows exceptions from __index__ methods. Message-ID: <1352028464.86.0.0930717180418.issue16402@psf.upfronthosting.co.za> New submission from Mark Dickinson: >>> class A(object): ... def __index__(self): raise ZeroDivisionError ... [66062 refs] >>> a = A() [66065 refs] >>> range(10)[0:a] Traceback (most recent call last): File "", line 1, in TypeError: slice indices must be integers or None or have an __index__ method [66105 refs] ---------- assignee: mark.dickinson messages: 174782 nosy: mark.dickinson priority: normal severity: normal status: open title: range slicing swallows exceptions from __index__ methods. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 12:28:50 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Nov 2012 11:28:50 +0000 Subject: [issue16402] range slicing swallows exceptions from __index__ methods. In-Reply-To: <1352028464.86.0.0930717180418.issue16402@psf.upfronthosting.co.za> Message-ID: <1352028530.99.0.785452954372.issue16402@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch. ---------- keywords: +patch stage: -> patch review type: -> behavior versions: +Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27879/issue16402.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 12:31:14 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Nov 2012 11:31:14 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1352028674.26.0.0818513706095.issue14794@psf.upfronthosting.co.za> Mark Dickinson added the comment: Agreed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 12:37:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 04 Nov 2012 11:37:06 +0000 Subject: [issue16403] update distutils docs to say that maintainer replaces author Message-ID: <1352029026.5.0.383021349699.issue16403@psf.upfronthosting.co.za> New submission from Chris Jerdonek: As discussed in issue 16108 and other issues referenced there, distutils lists the maintainer as the author in PKG-INFO when the maintainer is provided. However, the documentation does not state this. This issue is to update the distutils documentation to state this, e.g. here: http://docs.python.org/dev/distutils/setupscript.html#additional-meta-data and here: http://docs.python.org/dev/distutils/apiref.html#distutils.core.setup ---------- assignee: eric.araujo components: Distutils, Documentation keywords: easy messages: 174785 nosy: chris.jerdonek, eric.araujo, ezio.melotti, georg.brandl, tarek priority: normal severity: normal status: open title: update distutils docs to say that maintainer replaces author type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 12:38:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 04 Nov 2012 11:38:58 +0000 Subject: [issue16108] Include maintainer information in register/upload In-Reply-To: <1349154240.01.0.151032575778.issue16108@psf.upfronthosting.co.za> Message-ID: <1352029138.43.0.372588620956.issue16108@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I also created issue 16403 to update the distutils docs to say that distutils lists the maintainer as the author in PKG-INFO when maintainer is provided. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 12:39:25 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Nov 2012 11:39:25 +0000 Subject: [issue16402] range slicing swallows exceptions from __index__ methods. In-Reply-To: <1352028464.86.0.0930717180418.issue16402@psf.upfronthosting.co.za> Message-ID: <1352029165.88.0.393182031462.issue16402@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 12:48:11 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Nov 2012 11:48:11 +0000 Subject: [issue16402] range slicing swallows exceptions from __index__ methods. In-Reply-To: <1352028464.86.0.0930717180418.issue16402@psf.upfronthosting.co.za> Message-ID: <3XvZyy48P0zRFy@mail.python.org> Roundup Robot added the comment: New changeset 94d15358ad6e by Mark Dickinson in branch '3.2': Issue #16402: In range slicing, fix shadowing of exceptions from __index__ method. http://hg.python.org/cpython/rev/94d15358ad6e New changeset 2b656a2cf7ef by Mark Dickinson in branch '3.3': Issue #16402: Merge fix from 3.2 http://hg.python.org/cpython/rev/2b656a2cf7ef New changeset f02555353544 by Mark Dickinson in branch 'default': Issue #16402: Merge fix from 3.3 http://hg.python.org/cpython/rev/f02555353544 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 12:51:01 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Nov 2012 11:51:01 +0000 Subject: [issue16402] range slicing swallows exceptions from __index__ methods. In-Reply-To: <1352028464.86.0.0930717180418.issue16402@psf.upfronthosting.co.za> Message-ID: <1352029861.34.0.351921183012.issue16402@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 12:56:47 2012 From: report at bugs.python.org (Ray Donnelly) Date: Sun, 04 Nov 2012 11:56:47 +0000 Subject: [issue16235] Add python-config.sh for use during cross compilation. In-Reply-To: <1350251714.79.0.226527559426.issue16235@psf.upfronthosting.co.za> Message-ID: <1352030207.81.0.665826353406.issue16235@psf.upfronthosting.co.za> Ray Donnelly added the comment: I agree in principle about not having to maintain two implementations but I would worry about breaking external packages that depend on the python implementation. In the meantime, please find an updated version of this patch that adds support for --configdir ---------- Added file: http://bugs.python.org/file27880/0000-add-python-config-sh.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 13:17:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 12:17:00 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1352031420.76.0.830070411866.issue10030@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I quote from Gregory P. Smith (msg91897): """ The decryption provided by the zipfile module is for the worthless 32-bit crc based "encryption" of zipfiles. I think promoting the use of that is a bad idea. zipfile can be used by people to get their data out of such files. We should not encourage them to put it and/or their code into such a stupid format. """ I think that the effort required for speedup of this almost useless feature is excessive. If someone want to implement the "strong encryption" for zip files - welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 13:21:17 2012 From: report at bugs.python.org (Ray Donnelly) Date: Sun, 04 Nov 2012 12:21:17 +0000 Subject: [issue16235] Add python-config.sh for use during cross compilation. In-Reply-To: <1350251714.79.0.226527559426.issue16235@psf.upfronthosting.co.za> Message-ID: <1352031677.42.0.359938382155.issue16235@psf.upfronthosting.co.za> Ray Donnelly added the comment: I also checked the Windows releases and python-config isn't included. However, I don't think there's a good reason for that. python-config would in theory work fine if people wanted to link their programs to Python on Windows, as would python-config.sh given a posix-y shell that e.g. Cygwin or MSYS provide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 13:27:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 12:27:51 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1352032071.6.0.19550459348.issue10030@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also criticism in the original discussion: http://mail.python.org/pipermail/python-dev/2009-August/091450.html . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 13:40:20 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 04 Nov 2012 12:40:20 +0000 Subject: [issue16108] Include maintainer information in register/upload In-Reply-To: <1349154240.01.0.151032575778.issue16108@psf.upfronthosting.co.za> Message-ID: <1352032820.58.0.673001826696.issue16108@psf.upfronthosting.co.za> Stefan Krah added the comment: "Would that result in displaying both author and maintainer info on the PyPI page? For what cases is it useful?" It gives due credit to the original author if another person maintains the package. I think it's a matter of common courtesy not to suppress author information (or worse, list the maintainer as the author). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 14:20:20 2012 From: report at bugs.python.org (Robert de Vries) Date: Sun, 04 Nov 2012 13:20:20 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1352035220.65.0.948092193536.issue10030@psf.upfronthosting.co.za> Robert de Vries added the comment: My use case is decrypting files of 100's of megabytes. This is so slow that it is quite useless. About an hour or so. I do agree that the encryption is worthless, but that is not important for my use case where I want to discourage people from reverse engineering the contents. If it is so dangerous as some people have pointed out, it should be removed at the cost of not supporting a standard feature of ZIP files. In my opinion you either support a feature and you support it good (efficient) or you don't. As it stands now, users will be disappointed in using a supported feature. Some people argue that adding C code to Python is dangerous as it will lead to bugs, vulnerabilities etc. You could dismiss every addition with C code to Python with this argument, so there must be some positive aspects to outweigh the negative side. The negative side is fairly small (50 lines of very simple C code), plus some standard Python glue code. The benefit is a 100 fold increase in performance and the removal of 1 line of documentation telling that this feature is extremely slow. (patch attached) ---------- Added file: http://bugs.python.org/file27881/doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 14:43:22 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 04 Nov 2012 13:43:22 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1352036602.6.0.485725422928.issue10030@psf.upfronthosting.co.za> R. David Murray added the comment: We aren't particularly interested in helping people make their files slightly harder to reverse engineer, either, so I don't think that is a good enough reason for accepting this. There might be other reasons that are good enough, but I don't think that is one of them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 14:48:57 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 04 Nov 2012 13:48:57 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1352036937.94.0.772139506971.issue10030@psf.upfronthosting.co.za> Christian Heimes added the comment: >From the zlib FAQ: 38. How can I encrypt/decrypt zip files with zlib? zlib doesn't support encryption. The original PKZIP encryption is very weak and can be broken with freely available programs. To get strong encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib compression. For PKZIP compatible "encryption", look at http://www.info-zip.org/ I don't see the point of a weak and easily breakable encryption. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 14:54:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Nov 2012 13:54:22 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1239838657.22.0.326859227165.issue5765@psf.upfronthosting.co.za> Message-ID: <3XvdmY3GVZzRFj@mail.python.org> Roundup Robot added the comment: New changeset ab02cd145f56 by Nick Coghlan in branch '3.3': Issue #5765: Apply a hard recursion limit in the compiler http://hg.python.org/cpython/rev/ab02cd145f56 New changeset bd1db93d76e1 by Nick Coghlan in branch 'default': Issue #5765: Merge from 3.3 http://hg.python.org/cpython/rev/bd1db93d76e1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 14:55:59 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 Nov 2012 13:55:59 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1239838657.22.0.326859227165.issue5765@psf.upfronthosting.co.za> Message-ID: <1352037359.3.0.821457546037.issue5765@psf.upfronthosting.co.za> Nick Coghlan added the comment: You can take the scaling factor out if you really want, but it adds no real maintenance overhead, and better reflects the real stack usage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 14:57:42 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 Nov 2012 13:57:42 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1239838657.22.0.326859227165.issue5765@psf.upfronthosting.co.za> Message-ID: <1352037462.34.0.251673287563.issue5765@psf.upfronthosting.co.za> Nick Coghlan added the comment: However, agreed on the won't fix for 3.2 and 2.7, although I'd consider it at least for 2.7 if someone went through and worked out a patch that applies cleanly. For 3.2, this really isn't the kind of thing we'd want to do in the final regular maintenance release. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 14:58:55 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 04 Nov 2012 13:58:55 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1352037359.3.0.821457546037.issue5765@psf.upfronthosting.co.za> Message-ID: <1352037508.3394.3.camel@localhost.localdomain> Antoine Pitrou added the comment: > You can take the scaling factor out if you really want, but it adds no > real maintenance overhead, and better reflects the real stack usage. Can you also add a related snippet in Tools/scripts/find_recursionlimit.py ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 15:00:52 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 Nov 2012 14:00:52 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1239838657.22.0.326859227165.issue5765@psf.upfronthosting.co.za> Message-ID: <1352037652.04.0.299238816115.issue5765@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note: if you do take the scaling factor out, don't forget to track down the reasons behind the original commit that added the test that broke *without* the scaling factor. For me, "the test suite fails without it" is reason enough for me to say its needed - someone decided at some point to ensure that level of nesting worked, so if we're going to go back on that, we need to know the original reason why the test was added. I think it's easier just to keep that code working, since we have a solution that *doesn't* break it and really isn't that complicated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 15:20:01 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Nov 2012 14:20:01 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1239838657.22.0.326859227165.issue5765@psf.upfronthosting.co.za> Message-ID: <3XvfL85lQzzM1p@mail.python.org> Roundup Robot added the comment: New changeset cf2515d0328b by Nick Coghlan in branch '3.3': Issue #5765: Also check the compiler when finding the recursion limit http://hg.python.org/cpython/rev/cf2515d0328b New changeset 3712028a0c34 by Nick Coghlan in branch 'default': Issue #5765: Merge from 3.3 http://hg.python.org/cpython/rev/3712028a0c34 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 15:26:03 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 Nov 2012 14:26:03 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1239838657.22.0.326859227165.issue5765@psf.upfronthosting.co.za> Message-ID: <1352039163.97.0.616874660052.issue5765@psf.upfronthosting.co.za> Nick Coghlan added the comment: The sanity check in the recursion limit finding script is definitely a good idea, so I added that (as the commits show). For the record, running that script on the 3.3 branch with my 4 GB RAM Fedora 17 ASUS Zenbook finds a maximum recursion limit around 16800, at which point test_add is the first one to die. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 15:28:46 2012 From: report at bugs.python.org (Robert de Vries) Date: Sun, 04 Nov 2012 14:28:46 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1352039326.41.0.616158954811.issue10030@psf.upfronthosting.co.za> Robert de Vries added the comment: If the encryption is so horrible why is there any support (with bad performance) at all in Python? It would be better to remove it altogether. This prevents users from building software using this feature only to find out later how bad the performance is. (This is the main reason why I have submitted this patch.) If the support had not been in Python I would not have used this feature to begin with. To reiterate my previous point. Either support something and do it well, or don't. Don't do a half job. Please note that there are more attempts to fix this, so I am not completely alone here. http://pypi.python.org/pypi/czipfile ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 15:33:58 2012 From: report at bugs.python.org (Mark Shannon) Date: Sun, 04 Nov 2012 14:33:58 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1239838657.22.0.326859227165.issue5765@psf.upfronthosting.co.za> Message-ID: <1352039638.86.0.941981055143.issue5765@psf.upfronthosting.co.za> Mark Shannon added the comment: I don't think there is any need for a scaling factor. Expressions in auto-generated trees will tend to be trees of binary operator rather lists of purely unary operators. A tree of a billion items only has a depth of ~30. There is no way an expression tree >1000 deep could possibly have any sane behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 15:35:40 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 04 Nov 2012 14:35:40 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1352039163.97.0.616874660052.issue5765@psf.upfronthosting.co.za> Message-ID: <1352039713.3394.4.camel@localhost.localdomain> Antoine Pitrou added the comment: > The sanity check in the recursion limit finding script is definitely a > good idea, so I added that (as the commits show). Didn't you make a mistake in the recursion factor there? Or is it really 10 rather than 3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 15:45:54 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 04 Nov 2012 14:45:54 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1352039326.41.0.616158954811.issue10030@psf.upfronthosting.co.za> Message-ID: <1352040326.3394.8.camel@localhost.localdomain> Antoine Pitrou added the comment: > If the encryption is so horrible why is there any support (with bad > performance) at all in Python? > It would be better to remove it altogether. We don't remove it as it would break existing programs which rely on this feature. However adding a bunch of C code to improve performance of such a questionable feature is controversial. I wouldn't be against the acceleration myself, however I am not interested in reviewing or accepting it, sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 15:47:41 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 04 Nov 2012 14:47:41 +0000 Subject: [issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever In-Reply-To: <1351947127.21.0.260755574002.issue16298@psf.upfronthosting.co.za> Message-ID: <1352040433.3394.10.camel@localhost.localdomain> Antoine Pitrou added the comment: > The patch is probably trivial - however I would still like some > verification. > Would it be correct to call self.close() when fp.read returns ''? In > case self.length is not present, I don't see a way around this anyway. > When it is present, and fp.read returns '', how should we go about > that? We can either return less data, or raise an exception to > indicate that the connection terminated prematurely. It's probably better to return less data. No need to break user programs when they download from a slightly misbehaved Web site. The patch should include some kind of unit test, if possible. See Lib/test/test_httplib.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 15:54:25 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 Nov 2012 14:54:25 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1239838657.22.0.326859227165.issue5765@psf.upfronthosting.co.za> Message-ID: <1352040865.28.0.760336243273.issue5765@psf.upfronthosting.co.za> Nick Coghlan added the comment: Antoine: The scaling is deliberate higher in the recursion limit finder because we just want to ensure it hits the recursion limit (or blows the stack, if the scaling is wrong). In the tests, I cut it finer because I wanted to ensure we were straddling the allowed/disallowed boundary fairly closely in order to properly test the code that accounts for the *existing* recursion depth when initialising the compiler's internal state. Mark: same answer I gave Antoine earlier. Without the scaling factor, a test fails. If you want to advocate for removing or changing that test instead, track down why it was added and provide a rationale for why it's no longer applicable. However, before you invest too much time in that, note that the trees generated by binary operators of the same precedence in CPython are *not* balanced (IIRC, the LHS is handled as a leaf expression), thus they also suffer from this recursion problem (if you look at the patch I committed, I added an extra test beyond those Andrea provided: a multiplication expression with a ridiculously large number of terms). I agree that path is the only one generated code is likely to hit, though, which is why I added a specific test for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 15:57:07 2012 From: report at bugs.python.org (Ned Batchelder) Date: Sun, 04 Nov 2012 14:57:07 +0000 Subject: [issue16404] Uses of PyLong_FromLong that don't check for errors Message-ID: <1352041027.23.0.922968343734.issue16404@psf.upfronthosting.co.za> New submission from Ned Batchelder: Examining the CPython sources, there are a number of places where PyLong_FromLong is used without checking its return value. In places where it is done correctly, PyErr_Occurred is often used to avoid having to check every call. Here are places where it isn't done properly. I can make patches if desired, though I can't build and test on Windows. This code is from CPython tip, but the same issues exist in the 2.7 branch. In Modules/arraymodule.c: static PyObject * array_buffer_info(arrayobject *self, PyObject *unused) { PyObject* retval = NULL; retval = PyTuple_New(2); if (!retval) return NULL; PyTuple_SET_ITEM(retval, 0, PyLong_FromVoidPtr(self->ob_item)); PyTuple_SET_ITEM(retval, 1, PyLong_FromLong((long)(Py_SIZE(self)))); return retval; } In Modules/ossaudiodev.c /* Construct the return value: a (fmt, channels, rate) tuple that tells what the audio hardware was actually set to. */ rv = PyTuple_New(3); if (rv == NULL) return NULL; PyTuple_SET_ITEM(rv, 0, PyLong_FromLong(fmt)); PyTuple_SET_ITEM(rv, 1, PyLong_FromLong(channels)); PyTuple_SET_ITEM(rv, 2, PyLong_FromLong(rate)); return rv; These 7 lines could be replaced simply with: return Py_BuildValue("(iii)", fmt, channels, rate); In Python/sysmodule.c, where the PyUnicode_FromString is far more worrisome: static PyObject * sys_getwindowsversion(PyObject *self) { PyObject *version; int pos = 0; OSVERSIONINFOEX ver; ver.dwOSVersionInfoSize = sizeof(ver); if (!GetVersionEx((OSVERSIONINFO*) &ver)) return PyErr_SetFromWindowsErr(0); version = PyStructSequence_New(&WindowsVersionType); if (version == NULL) return NULL; PyStructSequence_SET_ITEM(version, pos++, PyLong_FromLong(ver.dwMajorVersion)); PyStructSequence_SET_ITEM(version, pos++, PyLong_FromLong(ver.dwMinorVersion)); PyStructSequence_SET_ITEM(version, pos++, PyLong_FromLong(ver.dwBuildNumber)); PyStructSequence_SET_ITEM(version, pos++, PyLong_FromLong(ver.dwPlatformId)); PyStructSequence_SET_ITEM(version, pos++, PyUnicode_FromString(ver.szCSDVersion)); PyStructSequence_SET_ITEM(version, pos++, PyLong_FromLong(ver.wServicePackMajor)); PyStructSequence_SET_ITEM(version, pos++, PyLong_FromLong(ver.wServicePackMinor)); PyStructSequence_SET_ITEM(version, pos++, PyLong_FromLong(ver.wSuiteMask)); PyStructSequence_SET_ITEM(version, pos++, PyLong_FromLong(ver.wProductType)); return version; } In Doc/extending/extending.rst, as an example of a correct function!: void no_bug(PyObject *list) { PyObject *item = PyList_GetItem(list, 0); Py_INCREF(item); PyList_SetItem(list, 1, PyLong_FromLong(0L)); PyObject_Print(item, stdout, 0); Py_DECREF(item); } ---------- messages: 174809 nosy: nedbat priority: normal severity: normal status: open title: Uses of PyLong_FromLong that don't check for errors versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 16:04:11 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 Nov 2012 15:04:11 +0000 Subject: [issue16405] Explain how to set up the whitespace commit hook locally Message-ID: <1352041451.32.0.465920697634.issue16405@psf.upfronthosting.co.za> New submission from Nick Coghlan: Setting up the same commit checks locally that the main repo enforces for incoming patch sets can save a great deal of frustration with the server rejecting "hg push" for changes (this can be especially frustrating if you have already merged changes across branches). The committer section of the devguide [1] should explain how to: 1. Check out the hooks repo from hg.python.org 2. Configure the whitespace checking hook by adding this to hgrc for the relevant repo(s) (adjusting the path appropriately for the checked out location of the hooks repo): [hooks] commit = python:~/devel/hg_hooks/checkwhitespace.py:check_whitespace_single [1] http://docs.python.org/devguide/committing.html#committing-and-pushing-changes ---------- components: Devguide messages: 174810 nosy: ezio.melotti, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Explain how to set up the whitespace commit hook locally type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 16:06:52 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 04 Nov 2012 15:06:52 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1352041612.03.0.298759844879.issue16392@psf.upfronthosting.co.za> Brett Cannon added the comment: It sounds like Cython has its fix and CPython knows what should eventually be changed in Python 4 to bring extension module initialization closer to how Python module code is initialized. Maybe we should add a warning in some documentation somewhere about this and then close the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 16:10:44 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Nov 2012 15:10:44 +0000 Subject: [issue16405] Explain how to set up the whitespace commit hook locally In-Reply-To: <1352041451.32.0.465920697634.issue16405@psf.upfronthosting.co.za> Message-ID: <1352041844.64.0.0314729889126.issue16405@psf.upfronthosting.co.za> Ezio Melotti added the comment: Configuring the editor to remove trailing whitespace, and using make patchcheck are other valid solutions to this problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 16:16:49 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 04 Nov 2012 15:16:49 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1352042209.22.0.231951470113.issue16248@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm all with Antoine's suggestion. readprofile() should not be executed when sys.flags.ignore_environment is set. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 16:33:13 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 Nov 2012 15:33:13 +0000 Subject: [issue16405] Explain how to set up the whitespace commit hook locally In-Reply-To: <1352041451.32.0.465920697634.issue16405@psf.upfronthosting.co.za> Message-ID: <1352043193.73.0.906456981692.issue16405@psf.upfronthosting.co.za> Nick Coghlan added the comment: Sure, but both of those can fail (forgetting to run make patchcheck, using a different editor from your normal one for some reason) Once the commit hook is set up properly, you get alerted to the problem as soon as you try to commit, rather than having to untangle a merge chain when you realise on pushing that you stuffed up the whitespace in the original bugfix commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 16:44:30 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Nov 2012 15:44:30 +0000 Subject: [issue16405] Explain how to set up the whitespace commit hook locally In-Reply-To: <1352041451.32.0.465920697634.issue16405@psf.upfronthosting.co.za> Message-ID: <1352043870.67.0.343880914342.issue16405@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm not against your proposal. If the goal is to explain how to get rid of trailing whitespace then the other solutions should be mentioned too (I think made patchcheck already is). If the goal is to show how to set up local hooks and where to get them, then the other solutions don't belong there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 17:00:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 16:00:58 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1352044858.22.0.312324846263.issue10030@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which optimize (speed up 2x) Python implementation of ZIP decryptor. It is almost the maximum of what can be achieved without significant degradation of maintainability. Of course, 2x is less then 100x, but it more portable and costs almost nothing. If that's not enough, I suggest to use an external unzip. You can even run multiple unzips at a time for the parallel extraction of multiple files. If in the future someone will implement the strong encryption for ZIP files, it is possible it will required a C accelerator module and it is possible there will be a place for PKWARE's traditional encryption. ---------- Added file: http://bugs.python.org/file27882/zipfile_decryptor_speedup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 17:10:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 16:10:37 +0000 Subject: [issue16404] Uses of PyLong_FromLong that don't check for errors In-Reply-To: <1352041027.23.0.922968343734.issue16404@psf.upfronthosting.co.za> Message-ID: <1352045437.93.0.68539996659.issue16404@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue15989. ---------- assignee: -> docs at python components: +Documentation, Extension Modules, Interpreter Core nosy: +docs at python, mark.dickinson, serhiy.storchaka stage: -> needs patch type: -> behavior versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 17:10:38 2012 From: report at bugs.python.org (Rafik Draoui) Date: Sun, 04 Nov 2012 16:10:38 +0000 Subject: [issue10395] new os.path function to extract common prefix based on path components In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1352045438.09.0.529117214642.issue10395@psf.upfronthosting.co.za> Rafik Draoui added the comment: Here is a patch with an implementation of os.path.commonpath, along with tests and documentation. At the moment, this is only implemented for POSIX, as I don't feel like I know enough about Windows to tackle drive letters and UNC in paths without spending some more time on it. This probably needs more tests for corner cases. ---------- nosy: +rafik Added file: http://bugs.python.org/file27883/patch10395 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 17:13:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 16:13:09 +0000 Subject: [issue10395] new os.path function to extract common prefix based on path components In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1352045589.3.0.298332158354.issue10395@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 17:44:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 16:44:13 +0000 Subject: [issue10395] new os.path function to extract common prefix based on path components In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1352047453.75.0.444594961485.issue10395@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > At the moment, this is only implemented for POSIX, as I don't feel like I know enough about Windows to tackle drive letters and UNC in paths without spending some more time on it. Just use splitdrive() and first ensure that all drivespecs are same, then find common prefix for pathspecs. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 18:05:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 17:05:41 +0000 Subject: [issue14811] decoding_fgets() truncates long lines and fails with a SyntaxError("Non-UTF-8 code starting with...") In-Reply-To: <1337056300.81.0.374626607094.issue14811@psf.upfronthosting.co.za> Message-ID: <1352048741.43.0.69126507276.issue14811@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 18:09:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 17:09:32 +0000 Subject: [issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing In-Reply-To: <1332305186.87.0.484792091693.issue14377@psf.upfronthosting.co.za> Message-ID: <1352048972.67.0.515403563063.issue14377@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 18:29:24 2012 From: report at bugs.python.org (Sean Ochoa) Date: Sun, 04 Nov 2012 17:29:24 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1352050164.83.0.206608349331.issue13349@psf.upfronthosting.co.za> Sean Ochoa added the comment: Ready for review. ---------- keywords: +patch Added file: http://bugs.python.org/file27884/issue-13349.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 18:44:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 17:44:18 +0000 Subject: [issue13968] Support recursive globs In-Reply-To: <1328700146.65.0.884103301197.issue13968@psf.upfronthosting.co.za> Message-ID: <1352051058.09.0.249871347801.issue13968@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 18:48:01 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Nov 2012 17:48:01 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1352051281.7.0.192169061179.issue13349@psf.upfronthosting.co.za> Ezio Melotti added the comment: You should use assertRaises/assertRaisesRegex to check the error message and add more tests to cover all the changes. I also noticed an inconsistence between 'element not in container' and 'element is not in container' (note the extra 'is'). FWIW I prefer the version without 'is'. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 18:50:33 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 04 Nov 2012 17:50:33 +0000 Subject: [issue16163] Wrong name in Lib/pkgutil.py:iter_importers In-Reply-To: <1349697246.97.0.772309039282.issue16163@psf.upfronthosting.co.za> Message-ID: <1352051433.84.0.051435305031.issue16163@psf.upfronthosting.co.za> Berker Peksag added the comment: > I don't think it's necessary to check for UnboundLocalError/NameError > in the tests. Thanks for the review. Attached a new patch. ---------- Added file: http://bugs.python.org/file27885/pkgutil-name-with-test_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 18:52:11 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 04 Nov 2012 17:52:11 +0000 Subject: [issue15276] unicode format does not really work in Python 2.x In-Reply-To: <1341668447.61.0.319523039673.issue15276@psf.upfronthosting.co.za> Message-ID: <1352051531.87.0.0805517050525.issue15276@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: -berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 19:03:34 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 04 Nov 2012 18:03:34 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1352052214.94.0.20397273602.issue10030@psf.upfronthosting.co.za> R. David Murray added the comment: > If the encryption is so horrible why is there any support (with bad > performance) at all in Python? I would say it there so that people can use python to "decrypt" an "encrypted" zip archive they have been sent that was generated by some other tool. I would say this is not a particularly strong use case since there are other tools that can be used for this, but as Antoine said removing the "feature" could break existing working code, so we are unlikely to do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 19:07:17 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 04 Nov 2012 18:07:17 +0000 Subject: [issue6478] time.tzset does not reset _strptime's locale time cache In-Reply-To: <1247506425.36.0.284798334504.issue6478@psf.upfronthosting.co.za> Message-ID: <1352052437.05.0.762800210854.issue6478@psf.upfronthosting.co.za> Berker Peksag added the comment: Alexander: Did you have a chance to review the test? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 20:03:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 04 Nov 2012 19:03:13 +0000 Subject: [issue16406] move the "Uploading Packages" section to distutils/packageindex.rst Message-ID: <1352055793.2.0.149261948913.issue16406@psf.upfronthosting.co.za> New submission from Chris Jerdonek: I think the Package Index (PyPI) documentation would be clearer if the section called "Uploading Packages to the Package Index": http://docs.python.org/3.4/distutils/uploading.html were made a part of the previous section about PyPI (now called "Registering with the Package Index"): http://docs.python.org/3.4/distutils/packageindex.html The combined section could then be renamed simply to "The Python Package Index (PyPI)". Both sections are small and very closely related. For example, the second half of the section on uploading (the subsection called "PyPI package display") is not actually about uploading but rather about registering and PyPI in general. Similarly, the second half of the first section on registering (the subsection called "The .pypirc file") applies equally to uploading as it does to registering. I was affected by the current organization, for example, because it gave the impression that uploading updates the PyPI package display (which is conceivable since PKG-INFO is part of the uploaded files). Rather, it is registering a version which updates the package display for that version. A combined section on PyPI would better reflect how things should be understood. ---------- assignee: eric.araujo components: Distutils, Documentation keywords: easy messages: 174825 nosy: chris.jerdonek, eric.araujo, ezio.melotti, georg.brandl, tarek priority: normal severity: normal status: open title: move the "Uploading Packages" section to distutils/packageindex.rst type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 20:26:30 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Nov 2012 19:26:30 +0000 Subject: [issue6478] time.tzset does not reset _strptime's locale time cache In-Reply-To: <1247506425.36.0.284798334504.issue6478@psf.upfronthosting.co.za> Message-ID: <1352057190.74.0.366278732675.issue6478@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: issue6478_v2.patch looks good to me. There is a long line in _strptime.py which I will fix before committing. ---------- stage: test needed -> commit review versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 20:49:38 2012 From: report at bugs.python.org (yrammos) Date: Sun, 04 Nov 2012 19:49:38 +0000 Subject: [issue16407] Python 2.7.3: test_sys fails when building under 10.7.5 with dtrace support Message-ID: <1352058578.46.0.0988393547736.issue16407@psf.upfronthosting.co.za> New submission from yrammos: I am building Python 2.7.3 using Homebrew as follows: > brew install --with-dtrace --quicktest python The failing tests are: test_ctypes test_sys Omitting --with-dtrace reduces the failures to one test: test_ctypes @samueljohn from github suggested that I ping Jes?s Cea Avi?n or Ronald Oussoren for this. ---------- components: Tests messages: 174827 nosy: yrammos priority: normal severity: normal status: open title: Python 2.7.3: test_sys fails when building under 10.7.5 with dtrace support type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 21:06:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 20:06:26 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1352059586.91.0.704224786263.issue8271@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file25709/issue8271-3.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 21:06:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 20:06:44 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1352059604.3.0.728827508875.issue8271@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file26116/issue8271-3.3-fast-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 21:07:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 20:07:41 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1352059661.57.0.169518076952.issue8271@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 21:18:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 20:18:23 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1352060303.21.0.576576745089.issue8271@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about commit? All Ezio's tests passsed, microbenchmark shows less than 10% differences: vanilla patched MB/s MB/s 2076 (-3%) 2007 decode utf-8 'A'*10000 414 (-0%) 413 decode utf-8 '\x80'*10000 1283 (-1%) 1275 decode utf-8 '\x80'+'A'*9999 556 (-8%) 514 decode utf-8 '\u0100'*10000 1227 (-4%) 1172 decode utf-8 '\u0100'+'A'*9999 556 (-8%) 514 decode utf-8 '\u0100'+'\x80'*9999 406 (+10%) 447 decode utf-8 '\u8000'*10000 1225 (-5%) 1167 decode utf-8 '\u8000'+'A'*9999 554 (-7%) 513 decode utf-8 '\u8000'+'\x80'*9999 552 (-8%) 508 decode utf-8 '\u8000'+'\u0100'*9999 358 (-4%) 345 decode utf-8 '\U00010000'*10000 1173 (-5%) 1118 decode utf-8 '\U00010000'+'A'*9999 492 (+1%) 495 decode utf-8 '\U00010000'+'\x80'*9999 492 (+1%) 496 decode utf-8 '\U00010000'+'\u0100'*9999 383 (+5%) 401 decode utf-8 '\U00010000'+'\u8000'*9999 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 21:22:59 2012 From: report at bugs.python.org (Eric Busboom) Date: Sun, 04 Nov 2012 20:22:59 +0000 Subject: [issue16408] zipfile.testzip() opens file but does not close it. Message-ID: <1352060579.29.0.995643495141.issue16408@psf.upfronthosting.co.za> New submission from Eric Busboom: The zipfile.testzip() method will open each of the files in a zip archive, but does not close the files, resulting in a file descriptor leak. ---------- components: Library (Lib) messages: 174829 nosy: Eric.Busboom priority: normal severity: normal status: open title: zipfile.testzip() opens file but does not close it. type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 21:36:25 2012 From: report at bugs.python.org (Robert de Vries) Date: Sun, 04 Nov 2012 20:36:25 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1352061385.38.0.122323932909.issue10030@psf.upfronthosting.co.za> Robert de Vries added the comment: The current situation is now that the decryption is part of Python. It is well known to be computationally intensive and should therefore be implemented in C. This patch provides that support. The discussion if Python should support the decryption is behind us, as the support is already in. The only discussion should be about if there are enough users wanting this performance improvement to add it. >From the download statistics of czipfile I would say that there are roughly 2500 users interested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 21:46:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 20:46:00 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1352061960.18.0.69786459922.issue12892@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: test needed -> patch review versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 22:23:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Nov 2012 21:23:36 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <3Xvqkv5SC2zRBH@mail.python.org> Roundup Robot added the comment: New changeset 5962f192a483 by Ezio Melotti in branch '3.3': #8271: the utf-8 decoder now outputs the correct number of U+FFFD characters when used with the "replace" error handler on invalid utf-8 sequences. Patch by Serhiy Storchaka, tests by Ezio Melotti. http://hg.python.org/cpython/rev/5962f192a483 New changeset 5b205fff1972 by Ezio Melotti in branch 'default': #8271: merge with 3.3. http://hg.python.org/cpython/rev/5b205fff1972 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 22:37:03 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Nov 2012 21:37:03 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1352065023.88.0.799022396466.issue8271@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for updating the patch! I committed it on 3.3 too, and while this could have gone on 2.7/3.2 too IMHO, it's to much work to port it there and not worth it. ---------- status: open -> closed versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 22:40:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 21:40:09 +0000 Subject: [issue5057] Unicode-width dependent optimization leads to non-portable pyc file In-Reply-To: <1232900172.29.0.659028766072.issue5057@psf.upfronthosting.co.za> Message-ID: <1352065209.82.0.858891731114.issue5057@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: issue5057-3.diff LGTM. I added debug output in peepholer, ran tests and found that this optimization happened for unicode strings only in test_multibytecodec (where it used deliberately) and test_peepholer. Seems as this is very rare case. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 22:50:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 21:50:05 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1352065023.88.0.799022396466.issue8271@psf.upfronthosting.co.za> Message-ID: <201211042349.49833.storchaka@gmail.com> Serhiy Storchaka added the comment: Agree. In 2.7 UTF-8 codec still broken in corner cases (it accepts surrogates) and 3.2 is coming to an end of maintaining. In any case it is only recomendation, not demands. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 23:13:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Nov 2012 22:13:05 +0000 Subject: [issue16408] zipfile.testzip() opens file but does not close it. In-Reply-To: <1352060579.29.0.995643495141.issue16408@psf.upfronthosting.co.za> Message-ID: <1352067185.41.0.0335647061888.issue16408@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +easy stage: -> needs patch type: behavior -> resource usage versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 23:15:07 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Nov 2012 22:15:07 +0000 Subject: [issue5057] Unicode-width dependent optimization leads to non-portable pyc file In-Reply-To: <1232900172.29.0.659028766072.issue5057@psf.upfronthosting.co.za> Message-ID: <3XvrtL5kvZzRD3@mail.python.org> Roundup Robot added the comment: New changeset 9481e062fe26 by Ezio Melotti in branch '2.7': #5057: the peepholer no longer optimizes subscription on unicode literals (e.g. u"foo"[0]) in order to produce compatible pyc files between narrow and wide builds. http://hg.python.org/cpython/rev/9481e062fe26 New changeset 56bc323288d1 by Ezio Melotti in branch '3.2': #5057: the peepholer no longer optimizes subscription on unicode literals (e.g. u"foo"[0]) in order to produce compatible pyc files between narrow and wide builds. http://hg.python.org/cpython/rev/56bc323288d1 New changeset 3b4f2f9272b4 by Ezio Melotti in branch '3.3': #5057: null merge with 3.2 (only add tests). http://hg.python.org/cpython/rev/3b4f2f9272b4 New changeset 0790c16bb275 by Ezio Melotti in branch 'default': #5057: null merge with 3.3 (only add tests). http://hg.python.org/cpython/rev/0790c16bb275 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 23:16:20 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Nov 2012 22:16:20 +0000 Subject: [issue5057] Unicode-width dependent optimization leads to non-portable pyc file In-Reply-To: <1232900172.29.0.659028766072.issue5057@psf.upfronthosting.co.za> Message-ID: <1352067380.87.0.176664537582.issue5057@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 23:27:05 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 04 Nov 2012 22:27:05 +0000 Subject: [issue16409] urlretrieve regression: first call returns block size as 0 Message-ID: <1352068025.04.0.157597994471.issue16409@psf.upfronthosting.co.za> New submission from anatoly techtonik: Renamed urllib.urlretrieve changed behaviour in Py3k, which leads to ZeroDivisionErrors in applications that use block_size parameter for calculations. Previously, block size was constant. Now it varies making it impossible to exactly calculate value transferred so far. Test file attached. C:\Python33\python.exe test.py 0 0 59654 1 8192 59654 2 8192 59654 3 8192 59654 4 8192 59654 5 8192 59654 6 8192 59654 7 8192 59654 8 2310 59654 C:\Python27\python.exe test.py (0, 8192, 59654) (1, 8192, 59654) (2, 8192, 59654) (3, 8192, 59654) (4, 8192, 59654) (5, 8192, 59654) (6, 8192, 59654) (7, 8192, 59654) (8, 8192, 59654) ---------- components: Library (Lib) files: test.py messages: 174836 nosy: techtonik priority: normal severity: normal status: open title: urlretrieve regression: first call returns block size as 0 versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27886/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 23:53:22 2012 From: report at bugs.python.org (Eric Busboom) Date: Sun, 04 Nov 2012 22:53:22 +0000 Subject: [issue16408] zipfile.testzip() opens file but does not close it. In-Reply-To: <1352060579.29.0.995643495141.issue16408@psf.upfronthosting.co.za> Message-ID: <1352069602.97.0.56883989346.issue16408@psf.upfronthosting.co.za> Eric Busboom added the comment: I've tried just closing the ZipExtFile created in testzip, but that didn't actually close the file. It looks like ZipExtClose.close() also doesn't close the file descriptor, at least when the ZipFile is constructed on a filename. This code worked (Addition of f._fileobj.close() ) f = zf.open(zinfo.filename, "r") while f.read( 2 ** 20): # Check CRC-32 pass f.close() f._fileobj.close() # This shoulnd't be necessary, but it is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 23:53:32 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 04 Nov 2012 22:53:32 +0000 Subject: [issue16410] rewrite winsound with ctypes Message-ID: <1352069612.71.0.36893630411.issue16410@psf.upfronthosting.co.za> New submission from anatoly techtonik: http://hg.python.org/cpython/file/tip/PC/winsound.c No need to maintain this in C. It doesn't seem like a critical part of code. Will there be significant performance penalty? ---------- components: Library (Lib), ctypes messages: 174838 nosy: techtonik priority: normal severity: normal status: open title: rewrite winsound with ctypes versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 4 23:54:47 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 04 Nov 2012 22:54:47 +0000 Subject: [issue13740] winsound.SND_NOWAIT ignored on modern Windows platforms In-Reply-To: <1326059265.01.0.0567556069676.issue13740@psf.upfronthosting.co.za> Message-ID: <1352069687.98.0.847676883816.issue13740@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 00:00:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Nov 2012 23:00:39 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <3Xvstt5pFNzRFP@mail.python.org> Roundup Robot added the comment: New changeset 96f4cee8ea5e by Victor Stinner in branch '3.3': Issue #8271: Fix compilation on Windows http://hg.python.org/cpython/rev/96f4cee8ea5e New changeset 6f44f33460cd by Victor Stinner in branch 'default': (Merge 3.3) Issue #8271: Fix compilation on Windows http://hg.python.org/cpython/rev/6f44f33460cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 00:07:35 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 04 Nov 2012 23:07:35 +0000 Subject: [issue16410] rewrite winsound with ctypes In-Reply-To: <1352069612.71.0.36893630411.issue16410@psf.upfronthosting.co.za> Message-ID: <1352070455.11.0.839926483079.issue16410@psf.upfronthosting.co.za> Martin v. L?wis added the comment: ctypes is not an acceptable implementation strategy for modules in the standard library. No need to reimplement it. ---------- nosy: +loewis resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 00:14:00 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 04 Nov 2012 23:14:00 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352070840.46.0.102112278003.issue16218@psf.upfronthosting.co.za> STINNER Victor added the comment: test_cmd_line_script.test_non_utf8() is failing on Mac OS X since the changeset 95d1adf144ee. ====================================================================== FAIL: test_non_utf8 (test.test_cmd_line_script.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/test_cmd_line_script.py", line 381, in test_non_utf8 rc, out, _ = assert_python_ok(*run_args) File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/script_helper.py", line 54, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/script_helper.py", line 46, in _assert_python "stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore'))) AssertionError: Process return code is 2, stderr follows: /Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/python.exe: can't open file '': [Errno 92] Illegal byte sequence http://buildbot.python.org/all/builders/AMD64%20Mountain%20Lion%20%5BSB%5D%203.x/builds/404/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 00:18:23 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 04 Nov 2012 23:18:23 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352071103.23.0.665471841997.issue16218@psf.upfronthosting.co.za> STINNER Victor added the comment: > @unittest.skipIf(sys.platform.startswith('freebsd') and > sys.getfilesystemencoding() == 'ascii', > 'skip on FreeBSD with ASCII filesystem encoding') Such skip is not a good idea. Many OS uses the Latin1 encoding when the C locale is used (even if ASCII encoding is announced :-/): Solaris, FreeBSD, Mac OS X, etc. pythonrun_filename_decoding_test_2.patch: 'surrogateescape' error handler is not used on Windows (and must not be used), whereas the initial issue was reported on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 00:22:41 2012 From: report at bugs.python.org (Bradley Froehle) Date: Sun, 04 Nov 2012 23:22:41 +0000 Subject: [issue5141] C API for appending to arrays In-Reply-To: <1233654934.43.0.515749486926.issue5141@psf.upfronthosting.co.za> Message-ID: <1352071361.03.0.956605210427.issue5141@psf.upfronthosting.co.za> Changes by Bradley Froehle : ---------- nosy: +bfroehle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 00:31:54 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Nov 2012 23:31:54 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1352071914.32.0.236073234104.issue4965@psf.upfronthosting.co.za> Ezio Melotti added the comment: The attached patch makes the sidebar fixed and adds a scrollbar to scroll it separately when it's longer than the page. To test the patch without rebuilding all the Docs you can do something like: hg import --no-c cp Doc/tools/sphinxext/static/basic.css Doc/build/html/_static/basic.css firefox Doc/build/html/library/multiprocessing.html Since the sidebar doesn't start at the top of the page because there's the header first, when the main page is scrolled down, some empty space is left over the sidebar. I think this can't be fixed with css alone (unless some major changes are done to the layout), it could be fixed with js or the header could use position:fixed too. ---------- keywords: +patch Added file: http://bugs.python.org/file27887/issue4965.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 00:35:09 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 04 Nov 2012 23:35:09 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352072109.29.0.892636997767.issue16218@psf.upfronthosting.co.za> STINNER Victor added the comment: I propose a test with a single non-ASCII character, which should be supported by more code pages/locale encodings. It checks also the value of __file__. I only ran the test on Linux with UTF-8 locale encoding. ---------- Added file: http://bugs.python.org/file27888/test_non_ascii.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 00:44:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Nov 2012 23:44:27 +0000 Subject: [issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data In-Reply-To: <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za> Message-ID: <3XvtsR0ct1zQ2J@mail.python.org> Roundup Robot added the comment: New changeset be882735e0b6 by Nadeem Vawda in branch '3.2': Issue #16350: Fix zlib decompressor handling of unused_data with multiple calls to decompress() after EOF. http://hg.python.org/cpython/rev/be882735e0b6 New changeset 4182119c3f0a by Nadeem Vawda in branch '3.3': Issue #16350: Fix zlib decompressor handling of unused_data with multiple calls to decompress() after EOF. http://hg.python.org/cpython/rev/4182119c3f0a New changeset bcdb3836be72 by Nadeem Vawda in branch 'default': Issue #16350: Fix zlib decompressor handling of unused_data with multiple calls to decompress() after EOF. http://hg.python.org/cpython/rev/bcdb3836be72 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 00:45:38 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 04 Nov 2012 23:45:38 +0000 Subject: [issue15276] unicode format does not really work in Python 2.x In-Reply-To: <1341668447.61.0.319523039673.issue15276@psf.upfronthosting.co.za> Message-ID: <1352072738.97.0.418198410455.issue15276@psf.upfronthosting.co.za> STINNER Victor added the comment: "If we don't fix this (I'm leaning that way myself), I think we should somehow document the limitation. There are ways to acknowledge the limitation without getting into the specifics of this particular issue." I agree to documentation the limitation and close this issue as "wontfix". A workaround is to format as a bytes string, and then decode the result from the locale encoding. It looks like locale.getpreferredencoding(True) should be used, not locale.getpreferredencoding(False). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 00:51:09 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 04 Nov 2012 23:51:09 +0000 Subject: [issue16281] TODO in tailmatch(): it does not support backward in all cases In-Reply-To: <1350607883.61.0.918476063498.issue16281@psf.upfronthosting.co.za> Message-ID: <1352073069.42.0.996016548186.issue16281@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, PyUnicode_Tailmatch() documentation doesn't mention that the function can fail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 00:57:30 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Nov 2012 23:57:30 +0000 Subject: [issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data In-Reply-To: <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za> Message-ID: <3Xvv8Q2wBhzQ2J@mail.python.org> Roundup Robot added the comment: New changeset 1c54def5947c by Nadeem Vawda in branch '2.7': Issue #16350: Fix zlib decompressor handling of unused_data with multiple calls to decompress() after EOF. http://hg.python.org/cpython/rev/1c54def5947c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 00:58:58 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 04 Nov 2012 23:58:58 +0000 Subject: [issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data In-Reply-To: <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za> Message-ID: <1352073538.89.0.803988688212.issue16350@psf.upfronthosting.co.za> Nadeem Vawda added the comment: Fixed. Thanks for the patch! > This hacking is not needed, if first argument of PyBytes_FromStringAndSize() > is NULL, the contents of the bytes object are uninitialized. Oh, cool. I didn't know about that. > What should unconsumed_tail be equal after EOF? b'' or unused_data? Definitely b''. unconsumed_tail is meant to hold compressed data that should be passed in to the next call to decompress(). If we are at EOF, then decompress() should not be called again, and so it would be misleading to have unconsumed_tail be non-empty. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 01:21:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 05 Nov 2012 00:21:14 +0000 Subject: [issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename In-Reply-To: <1343479745.83.0.410557070565.issue15478@psf.upfronthosting.co.za> Message-ID: <3Xvvgs08XwzR94@mail.python.org> Roundup Robot added the comment: New changeset 817a90752470 by Victor Stinner in branch 'default': Issue #15478: Oops, fix regression in os.open() on Windows http://hg.python.org/cpython/rev/817a90752470 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 01:25:52 2012 From: report at bugs.python.org (Ned Deily) Date: Mon, 05 Nov 2012 00:25:52 +0000 Subject: [issue16407] Python 2.7.3: test_sys fails when building under 10.7.5 with dtrace support In-Reply-To: <1352058578.46.0.0988393547736.issue16407@psf.upfronthosting.co.za> Message-ID: <1352075152.37.0.24649039624.issue16407@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for your report. Without more details on exactly what errors you are seeing and exactly what configure options the Homebrew recipe is using and exactly which compiler you are using, it is not possible to be 100% certain what you are experiencing. Furthermore, you are reporting two separate problems; in the future, please stick to one problem per bug tracker issue. As to the problems: 1. test_sys fails with Homebrew's --with-dtrace option Python 2.7.3 does not include dtrace support so this is a non-issue. Looking at the current Homebrew recipe, it appears that it is applying a large patch from its own repo probably based on the ongoing and as yet unapplied patch proposed in Issue13405. If there are specific comments on the proposed Issue13405 patch, I suggest they be added to that issue. Otherwise, there is nothing to be done here for this item. https://github.com/mxcl/homebrew/blob/master/Library/Formula/python.rb 2. test_ctypes fails Most likely, test_ctypes failures are due to compiling with the OS X Clang compiler which is the default on the most recent releases of Xcode 4 for 10.7 and 10.8. Those test failures have been fixed by the changes applied for Issue13370, which will be released in upcoming maintenance releases, including Python 2.7.4. If these assumptions about the problems you've seen are not correct, please re-open and supply appropriate supporting materials. ---------- nosy: +jcea, ned.deily, ronaldoussoren resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 01:28:17 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 05 Nov 2012 00:28:17 +0000 Subject: [issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename In-Reply-To: <1343479745.83.0.410557070565.issue15478@psf.upfronthosting.co.za> Message-ID: <3Xvvr03fbmzPjB@mail.python.org> Roundup Robot added the comment: New changeset 11ea4eb79e9d by Victor Stinner in branch 'default': Issue #15478: Fix test_pep277 on Windows http://hg.python.org/cpython/rev/11ea4eb79e9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 01:29:24 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Mon, 05 Nov 2012 00:29:24 +0000 Subject: [issue16411] zlib.Decompress.decompress() retains pointer to input buffer without acquiring reference to it Message-ID: <1352075364.32.0.439696678294.issue16411@psf.upfronthosting.co.za> New submission from Nadeem Vawda: When calling zlib.Decompress.decompress() with a max_length argument, if the input data is not full consumed, the next_in pointer in the z_stream struct are left pointing into the data object, but the decompressor does not hold a reference to this object. This same pointer is reused (perhaps unintentionally) if flush() is called without calling decompress() again. If the data object gets deallocated between the calls to decompress() and to flush(), zlib will then try to access this deallocated memory, and most likely return bogus output (or segfault). See the attached script for a demonstration. I see two potential solutions: 1. Set avail_in to zero in flush(), so that it does not try to use leftover data (or whatever is else where that data used to be). 2. Have decompress() check if there is leftover data, and if so, save a reference to the object until a) we consume the rest of the data in flush(), or b) discard it in a subsequent call to decompress(). Solution 2 would be less disruptive to code that depends on the existing behavior (in non-pathological cases), but I'm don't like the maintenance burden of adding yet another thing to keep track of to the decompressor state. The PyZlib_objdecompress function is complex enough as it is, and we can expect more bugs like this to creep in the more we cram additional logic into it. So I'm more in favor of solution 1. Any thoughts? ---------- files: zlib_stale_ptr.py messages: 174853 nosy: nadeem.vawda, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: zlib.Decompress.decompress() retains pointer to input buffer without acquiring reference to it type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27889/zlib_stale_ptr.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 01:31:40 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Mon, 05 Nov 2012 00:31:40 +0000 Subject: [issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data In-Reply-To: <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za> Message-ID: <1352075500.5.0.441456161616.issue16350@psf.upfronthosting.co.za> Nadeem Vawda added the comment: > flush() does not update unconsumed_tail and unused_data. > > >>> import zlib > >>> x = zlib.compress(b'abcdefghijklmnopqrstuvwxyz') + b'0123456789' > >>> dco = zlib.decompressobj() > >>> dco.decompress(x, 1) > b'a' > >>> dco.flush() > b'bcdefghijklmnopqrstuvwxyz' > >>> dco.unconsumed_tail > b'NIMK\xcf\xc8\xcc\xca\xce\xc9\xcd\xcb/(,*.)-+\xaf\xa8\xac\x02\x00\x90\x86\x0b 0123456789' > >>> dco.unused_data > b'' I see another bug here - described in issue 16411. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 01:41:41 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 00:41:41 +0000 Subject: [issue15581] curses: segfault in addstr() In-Reply-To: <1344393356.61.0.716752115095.issue15581@psf.upfronthosting.co.za> Message-ID: <1352076101.16.0.83992795379.issue15581@psf.upfronthosting.co.za> STINNER Victor added the comment: > I can't offer a minimal program to reproduce this bug, but I did find a way to reproduce it in the python program "ranger" Sorry, but without a smaller example program, I cannot help you on this issue. Please try to write a smaller program to reproduce the crash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 01:47:25 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 00:47:25 +0000 Subject: [issue16412] test_shutil: 2 failures related to symlinks Message-ID: <1352076445.7.0.182324345971.issue16412@psf.upfronthosting.co.za> New submission from STINNER Victor: ====================================================================== FAIL: test_copymode_follow_symlinks (test.test_shutil.TestShutil) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\victor\default\lib\test\test_shutil.py", line 258, in test_copymode_f ollow_symlinks self.assertEqual(os.stat(src).st_mode, os.stat(dst).st_mode) AssertionError: 33206 != 33060 ====================================================================== FAIL: test_move_dangling_symlink (test.test_shutil.TestMove) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\victor\default\lib\test\test_shutil.py", line 60, in wrap return func(*args, **kwargs) File "C:\victor\default\lib\test\test_shutil.py", line 1435, in test_move_dang ling_symlink self.assertEqual(os.path.realpath(src), os.path.realpath(dst_link)) AssertionError: 'c:\\users\\haypo\\appdata\\local\\temp\\tmpmhpdb_\\baz' != 'c:\ \users\\haypo\\appdata\\local\\temp\\tmpnsjap0\\quux' - c:\users\haypo\appdata\local\temp\tmpmhpdb_\baz ? ^^ ^^^ ^^^ + c:\users\haypo\appdata\local\temp\tmpnsjap0\quux ? ^^^^ ^ ^^^^ ---------- components: Windows messages: 174856 nosy: haypo priority: normal severity: normal status: open title: test_shutil: 2 failures related to symlinks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 01:53:51 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 00:53:51 +0000 Subject: [issue16412] test_shutil: 2 failures related to symlinks In-Reply-To: <1352076445.7.0.182324345971.issue16412@psf.upfronthosting.co.za> Message-ID: <1352076831.38.0.817500728148.issue16412@psf.upfronthosting.co.za> STINNER Victor added the comment: I ran test_shutil on Windows 7 with NTFS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 01:54:08 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 00:54:08 +0000 Subject: [issue16412] test_shutil: 2 failures related to symlinks In-Reply-To: <1352076445.7.0.182324345971.issue16412@psf.upfronthosting.co.za> Message-ID: <1352076848.85.0.794526430504.issue16412@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +loewis, pitrou, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 02:06:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 05 Nov 2012 01:06:23 +0000 Subject: [issue15165] test_email: failure on Windows In-Reply-To: <1340567037.81.0.496566862614.issue15165@psf.upfronthosting.co.za> Message-ID: <3Xvwgy52DWzRCB@mail.python.org> Roundup Robot added the comment: New changeset 367e376e5ba2 by Victor Stinner in branch '3.3': Close #15165: Fix test_email on Windows 64 bits http://hg.python.org/cpython/rev/367e376e5ba2 New changeset 651e8613e579 by Victor Stinner in branch 'default': (Merge 3.3) Close #15165: Fix test_email on Windows 64 bits http://hg.python.org/cpython/rev/651e8613e579 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 02:12:48 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 01:12:48 +0000 Subject: [issue15165] test_email: failure on Windows In-Reply-To: <1340567037.81.0.496566862614.issue15165@psf.upfronthosting.co.za> Message-ID: <1352077968.32.0.19201710738.issue15165@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is not related to the email module, but it is a Windows limitation: datetime.datetime(1970, 1, 1).timestamp() raises a same OverflowError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 02:25:16 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Mon, 05 Nov 2012 01:25:16 +0000 Subject: [issue15955] gzip, bz2, lzma: add option to limit output size In-Reply-To: <1347884562.79.0.801674791772.issue15955@psf.upfronthosting.co.za> Message-ID: <1352078716.48.0.00642826117575.issue15955@psf.upfronthosting.co.za> Nadeem Vawda added the comment: I agree that being able to limit output size is useful and desirable, but I'm not keen on copying the max_length/unconsumed_tail approach used by zlib's decompressor class. It feels awkward to use, and it complicates the implementation of the existing decompress() method, which is already unwieldy enough. As an alternative, I propose a thin wrapper around the underlying C API: def decompress_into(self, src, dst, src_start=0, dst_start=0): ... This would store decompressed data in a caller-provided bytearray, and return a pair of integers indicating the end points of the consumed and produced data in the respective buffers. The implementation should be extremely simple - it does not need to do any memory allocation or reference management. I think it could also be useful for optimizing the implementation of BZ2File and LZMAFile. I plan to write a prototype and run some benchmarks some time in the next few weeks. (Aside: if implemented for zlib, this could also be a nicer (I think) solution for the problem raised in issue 5804.) ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 05:09:32 2012 From: report at bugs.python.org (Todd Rovito) Date: Mon, 05 Nov 2012 04:09:32 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1352088571.95.0.37799156305.issue16278@psf.upfronthosting.co.za> Todd Rovito added the comment: Attached is a patch for 16 test cases. All 16 test cases have been tested on Windows 7, Mac OS X, and Linux they seem to function well. Before this patch there was only a single test case for rename. For each test case I used "unittest.skipUnless" to make sure the platform was one of the three that I tested for Windows 7, Mac OS X, or Linux. These test cases demonstrate that the documentation is incorrect and perhaps a little fuzzy. I plan to submit updates to the documentation in the coming days. This patch is only for Python 3.4 but I will backport to 2.7 in a few days. I wrote the following code to find all the combinations based on parameters of the function: src = ['src_file','src_directory_empty', 'src_directory_not_empty', \ 'src_file_or_directory_not_exist'] dst = ['dst_file_exist','dst_not_exist','dst_directory_empty', \ 'dst_directory_not_empty'] print "Make sure you have functions in test_os for all of these" for index_src in range(0, len(src)): for index_dst in range(0, len(dst)): function_name = "test_rename_" + src[index_src] + "_" + \ dst[index_dst] print function_name ---------- versions: -Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27890/OSRename_test_os_3point4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 05:46:08 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 05 Nov 2012 04:46:08 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1352090768.05.0.758401095704.issue16278@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Attached is a patch for 16 test cases. The test cases look quite verbose (e.g. they're not DRY), but it's a good start. Thanks. For others' benefit, can you perhaps summarize your findings concisely in a table/chart of some form? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 06:02:48 2012 From: report at bugs.python.org (=?utf-8?b?54yrIOm7kg==?=) Date: Mon, 05 Nov 2012 05:02:48 +0000 Subject: [issue14965] super() and property inheritance behavior In-Reply-To: <1338433441.66.0.975494137492.issue14965@psf.upfronthosting.co.za> Message-ID: <1352091768.95.0.992054264894.issue14965@psf.upfronthosting.co.za> ? ? added the comment: I'm not a python dev, but would you say super(self.__class__, self.__class__).x.fset(self, value) is more readable than super().x = value ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 07:19:41 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 05 Nov 2012 06:19:41 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352096381.96.0.517455520611.issue16218@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I like the last patch from Victor. It works on Windows also. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 07:20:25 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 05 Nov 2012 06:20:25 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <3Xw3fJ3KYKzRHX@mail.python.org> Roundup Robot added the comment: New changeset 56df0d4f0011 by Andrew Svetlov in branch 'default': Issue #16218: Fix test for issue again http://hg.python.org/cpython/rev/56df0d4f0011 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 08:05:01 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 05 Nov 2012 07:05:01 +0000 Subject: [issue16108] Include maintainer information in register/upload In-Reply-To: <1349154240.01.0.151032575778.issue16108@psf.upfronthosting.co.za> Message-ID: <1352099101.27.0.499701412537.issue16108@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Whether or not we start sending both pieces of data, can PyPI perhaps be updated to display "Contact" instead of "Author" when Metadata-Version 1.1 is used? I filed an issue on PyPI's issue tracker for this suggestion here: https://sourceforge.net/tracker/?func=detail&atid=513503&aid=3583924&group_id=66150 ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 08:06:35 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Nov 2012 07:06:35 +0000 Subject: [issue16412] test_shutil: 2 failures related to symlinks In-Reply-To: <1352076445.7.0.182324345971.issue16412@psf.upfronthosting.co.za> Message-ID: <1352099195.76.0.699971794906.issue16412@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Duplicate of #13837. ---------- resolution: -> duplicate status: open -> closed superseder: -> test_shutil fails with symlinks enabled under Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 08:06:53 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Nov 2012 07:06:53 +0000 Subject: [issue13837] test_shutil fails with symlinks enabled under Windows In-Reply-To: <1327255807.39.0.63998442373.issue13837@psf.upfronthosting.co.za> Message-ID: <1352099213.75.0.43339438747.issue13837@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 08:13:48 2012 From: report at bugs.python.org (akira) Date: Mon, 05 Nov 2012 07:13:48 +0000 Subject: [issue16409] urlretrieve regression: first call returns block size as 0 In-Reply-To: <1352068025.04.0.157597994471.issue16409@psf.upfronthosting.co.za> Message-ID: <1352099628.41.0.84766291199.issue16409@psf.upfronthosting.co.za> akira added the comment: Summary: It is a new behavior. There is no need to change either code or docs. Though docs could be clarified to be more explicit. The behavior has been introduced only in 3.3 in revision 53715804dc71 [1] from issue 10050 [2] It knownly breaks backward-compatibility. The docstring says: > The reporthook argument should be a callable that accepts a block > number, a read size, and the total file size of the URL target. The change was rejected in issue 849407 [3] Though it is not mentioned in Misc/NEWS and Doc/library/urllib.request.rst doesn't mention the change from a static block size to a read size explicitly: > The third argument, if present, is a hook function that will be called > once on establishment of the network connection and once after each > block read thereafter. The hook will be passed three arguments; a > count of blocks transferred so far, a block size in bytes, and the > total size of the file. *after each block read* and *block size in bytes* do not suggest that the block size must be constant. This part in the docs could be more clear. There is related issue 1490929 [4] [1]: http://hg.python.org/cpython/rev/53715804dc71 [2]: http://bugs.python.org/issue10050 [3]: http://bugs.python.org/issue849407 [4]: http://bugs.python.org/issue1490929 ---------- nosy: +akira type: -> behavior versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 08:15:55 2012 From: report at bugs.python.org (akira) Date: Mon, 05 Nov 2012 07:15:55 +0000 Subject: [issue10050] urllib.request still has old 2.x urllib primitives In-Reply-To: <1286536471.26.0.454336144311.issue10050@psf.upfronthosting.co.za> Message-ID: <1352099755.77.0.882338247538.issue10050@psf.upfronthosting.co.za> akira added the comment: Related issue 16409 ---------- nosy: +akira _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 08:17:25 2012 From: report at bugs.python.org (akira) Date: Mon, 05 Nov 2012 07:17:25 +0000 Subject: [issue1490929] urllib.retrieve's reporthook called with non-helpful value Message-ID: <1352099845.83.0.024562033609.issue1490929@psf.upfronthosting.co.za> akira added the comment: Related issue 16409 ---------- nosy: +akira _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 08:22:26 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Nov 2012 07:22:26 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352100146.79.0.00258148072729.issue16218@psf.upfronthosting.co.za> Antoine Pitrou added the comment: How does the test which has been committed even test the Python launcher? It only calls assert_python_ok(), which should use the regular Python interpreter. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 08:34:56 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 05 Nov 2012 07:34:56 +0000 Subject: [issue15641] Clean up importlib for Python 3.4 In-Reply-To: <1344888035.57.0.935580041455.issue15641@psf.upfronthosting.co.za> Message-ID: <3Xw5JH4XnbzRPk@mail.python.org> Roundup Robot added the comment: New changeset 48228fb874c1 by Andrew Svetlov in branch 'default': Issue #15641: Clean up deprecated classes from importlib http://hg.python.org/cpython/rev/48228fb874c1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 08:35:37 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 05 Nov 2012 07:35:37 +0000 Subject: [issue15641] Clean up importlib for Python 3.4 In-Reply-To: <1344888035.57.0.935580041455.issue15641@psf.upfronthosting.co.za> Message-ID: <1352100937.21.0.812457729953.issue15641@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks, Taras. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 08:46:26 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 05 Nov 2012 07:46:26 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352101586.78.0.579431279254.issue16218@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Well. Fix (and test) is related to bug in python itself (./Python/pythonrun.c) pylauncher should be tested also, you are right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 08:55:19 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 05 Nov 2012 07:55:19 +0000 Subject: [issue16409] urlretrieve regression: first call returns block size as 0 In-Reply-To: <1352068025.04.0.157597994471.issue16409@psf.upfronthosting.co.za> Message-ID: <1352102119.8.0.725240348394.issue16409@psf.upfronthosting.co.za> anatoly techtonik added the comment: I strongly disagree with your summary. It's a new behavior for the old renamed module that clearly breaks existing code ported with 2to3. The 95% of callable usage is to get the estimated download progress (to draw progress bar or time calculations). This requires calculating value of total blocks like: total_blocks = math.ceil(float(total_size) / block_size) when block_size allowed to be 0, it immediately spawns ZeroDivisionErrors. This change broke http://pypi.python.org/pypi/wget If you make block size in callback parameters varying, the parameter with number of blocks transferred loses any sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 08:55:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 07:55:53 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352102153.88.0.354738098924.issue16218@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Such test is not enough. 1. It skipped on locales which does not support "?" (cp1006, cp1250, cp1251, cp737, cp852, cp855, cp866, cp874, cp949, euc_kr, gb2312, gbk, hz, iso2022_kr, iso8859_10, iso8859_11, iso8859_16, iso8859_2, iso8859_4, iso8859_5, iso8859_6, johab, koi8_r, koi8_u, mac_arabic, mac_farsi, ptcp154, tis_620). But the bug is actual on such locales. 2. It tests nothing on utf-8 locale (test passed even when bug is not fixed). We should test every filename which can be used in file system, even if it can not be decoded using current locale or UTF-8 encoding. On Unix filenames are bytes sequences and we should use non_ascii_bytes.decode(sys.getfilesystemencoding(), 'surrogateescape') as script name. On Windows it possible will be chr(k) where k is minimal code > 127 such that chr(k).encode('mbcs') is not fails (I am not sure). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 09:07:24 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 08:07:24 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352102844.76.0.584053114776.issue16218@psf.upfronthosting.co.za> STINNER Victor added the comment: > It tests nothing on utf-8 locale (test passed even when bug is not fixed). The issue is about Windows and UTF-8 is never used as filesystem encoding on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 09:16:55 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 08:16:55 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352103415.93.0.590371452697.issue16218@psf.upfronthosting.co.za> STINNER Victor added the comment: The test is still failing on Mac OS X: ====================================================================== FAIL: test_non_ascii (test.test_cmd_line_script.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/test_cmd_line_script.py", line 380, in test_non_ascii rc, stdout, stderr = assert_python_ok(script_name) File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/script_helper.py", line 54, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/script_helper.py", line 46, in _assert_python "stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore'))) AssertionError: Process return code is 2, stderr follows: /Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/python.exe: can't open file './@test_63568_tmp.py': [Errno 2] No such file or directory http://buildbot.python.org/all/builders/AMD64%20Mountain%20Lion%20%5BSB%5D%203.x/builds/410/steps/test/logs/stdio -- If I remember correctly, the command line is always decoded from UTF-8/surrogateescape on Mac OS X. That's why we have the function _Py_DecodeUTF8_surrogateescape() (for bootstrap reasons). Such example should not work if the locale encoding is not UTF-8 on Mac OS X: --- arg = _Py_DecodeUTF8_surrogateescape(...); filename = _Py_wchar2char(arg); fp = fopen(filename, "r"); --- run_file() uses a different strategy: unicode = PyUnicode_FromWideChar(filename, wcslen(filename)); if (unicode != NULL) { bytes = PyUnicode_EncodeFSDefault(unicode); Py_DECREF(unicode); } if (bytes != NULL) filename_str = PyBytes_AsString(bytes); else { PyErr_Clear(); filename_str = ""; } run_file() looks to be right. Py_Main() should use similar code. We should probably not encode and then decode the filename in each function, but this is another problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 09:40:14 2012 From: report at bugs.python.org (Tim Golden) Date: Mon, 05 Nov 2012 08:40:14 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1352104814.92.0.90389285173.issue9584@psf.upfronthosting.co.za> Tim Golden added the comment: I've got a patch for this which applies cleanly to the 3.4 tip. I still need to sort out the Windows issues (which I don't think will be difficult; it looks like a test issue, not a code issue) ---------- assignee: -> tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 09:48:23 2012 From: report at bugs.python.org (Mathieu Bridon) Date: Mon, 05 Nov 2012 08:48:23 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1352105303.13.0.645412338112.issue9584@psf.upfronthosting.co.za> Mathieu Bridon added the comment: I have to apologize for not following up on this patch. At first I had no time to go on pushing for it, and then (after a change of job), I completely forgot about it. :( I guess rebasing the patch on the latest tip is not that useful if you already have done it Tim, and I don't have access to a Windows box to figure out the issue in the tests. At this point is there anything else I can do to help getting it integrated? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 09:50:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 08:50:38 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1352102844.76.0.584053114776.issue16218@psf.upfronthosting.co.za> Message-ID: <201211051050.23323.storchaka@gmail.com> Serhiy Storchaka added the comment: > The issue is about Windows and UTF-8 is never used as filesystem encoding > on Windows. The issue exists on Linux as I reported in msg173373. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 10:06:21 2012 From: report at bugs.python.org (Tim Golden) Date: Mon, 05 Nov 2012 09:06:21 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1352105303.13.0.645412338112.issue9584@psf.upfronthosting.co.za> Message-ID: <50978189.6070304@timgolden.me.uk> Tim Golden added the comment: I'm planning to refactor the tests and the code very slightly. When I've got a reworked patch I'll ping it back to you to ensure it matches your intent. IIUC you're implementing comma-separated lists {abc,def} and nested braces {a{b,c}d,efg} but not ranges {a..z}. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 10:11:55 2012 From: report at bugs.python.org (Mathieu Bridon) Date: Mon, 05 Nov 2012 09:11:55 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1352106715.12.0.257388422466.issue9584@psf.upfronthosting.co.za> Mathieu Bridon added the comment: > " IIUC you're implementing comma-separated lists {abc,def} and nested braces {a{b,c}d,efg} but not ranges {a..z}." Exactly. Although that's just because at the time I sent the patch, I didn't know about ranges in shells. So I just implemented the part of curly brace expansion that I knew of and felt would be useful. If ranges are an expected feature from shells, then it would probably be a worthwhile addition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 10:22:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 09:22:00 +0000 Subject: [issue16281] TODO in tailmatch(): it does not support backward in all cases In-Reply-To: <1352073069.42.0.996016548186.issue16281@psf.upfronthosting.co.za> Message-ID: <201211051121.46585.storchaka@gmail.com> Serhiy Storchaka added the comment: > Oh, PyUnicode_Tailmatch() documentation doesn't mention that the function > can fail. But it does. .. c:function:: int PyUnicode_Tailmatch(PyObject *str, PyObject *substr, \ Py_ssize_t start, Py_ssize_t end, int direction) Return 1 if *substr* matches ``str[start:end]`` at the given tail end (*direction* == -1 means to do a prefix match, *direction* == 1 a suffix match), 0 otherwise. Return ``-1`` if an error occurred. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 10:32:04 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 05 Nov 2012 09:32:04 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1352107924.54.0.847453174526.issue16353@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Christian, Is there ``os.confstr`` supported by MaxOS X? Is there using of environ['PATH'] makes sense as good callback if former is not present? About COMSPEC. From my point of view it's useful if we need default path. Or if we have Win9x, where shell is command.com (not supported by 3.4) I guess to hardcode ``cmd.exe`` for Windows for the same reason as we hardcode ``sh`` for Unix systems. I agree to moving code to ``os`` if we no need to use ``shutil.which``. The function name is still the question: getdefaultshell, getshell, get_shell etc. Adding shutil.getdefaultshell function is interesting suggestion. It function intended to return user shell (from SHELL env var or COMSPEC for Windows) and not used in subprocess if shell=True (but can be passed as executable param if need). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 11:25:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 05 Nov 2012 10:25:49 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1352111149.63.0.684988660687.issue16353@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Any interest in doing like os.get_terminal_size/shutil.get_terminal_size If functions with two different behaviors are needed, I think the two functions should probably have different names (e.g. get_shell() and get_user_shell()). Otherwise, it may create confusion as to which to call (or which is being called when reading code). Moreover, it doesn't seem like the following guidance in the docs for which get_terminal_size() to use would hold in parallel for the shell variants: "shutil.get_terminal_size() is the high-level function which should normally be used, os.get_terminal_size is the low-level implementation." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 11:32:22 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 05 Nov 2012 10:32:22 +0000 Subject: [issue10050] urllib.request still has old 2.x urllib primitives In-Reply-To: <1286536471.26.0.454336144311.issue10050@psf.upfronthosting.co.za> Message-ID: <1352111542.04.0.253329375727.issue10050@psf.upfronthosting.co.za> anatoly techtonik added the comment: Please note that changes to urlretrieve to return block size 0 in callback breaks existing PyPI apps, such as http://pypi.python.org/pypi/wget It would be nice if you revert this part from http://hg.python.org/cpython/rev/53715804dc71 Also if you change semantics of "block size" (which is assumed to be fixed) to "data read size" then the "count of blocks transferred" losses any sense. Changed callback semantics without renaming function or introducing a different type of callback doesn't add clarity to the code that should be maintained for both Python 2 and Python 3 version. Please add issue #16409 as affected by this bug. ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 11:32:36 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 05 Nov 2012 10:32:36 +0000 Subject: [issue10050] urllib.request still has old 2.x urllib primitives In-Reply-To: <1286536471.26.0.454336144311.issue10050@psf.upfronthosting.co.za> Message-ID: <1352111556.53.0.820304448846.issue10050@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 11:58:36 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Nov 2012 10:58:36 +0000 Subject: [issue2636] Adding a new regex module (compatible with re) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1352113116.66.0.518372783354.issue2636@psf.upfronthosting.co.za> Nick Coghlan added the comment: I've been working through the "known crashers" list in the stdlib. The recursive import one was fixed with the migration to importlib in 3.3, the compiler one will be fixed in 3.3.1 (with an enforced nesting limit). One of those remaining is actually a pathological failure in the re module rather than a true crasher (i.e. it doesn't segfault, and in 2.7 and 3.3 you can interrupt it with Ctrl-C): http://hg.python.org/cpython/file/default/Lib/test/crashers/infinite_loop_re.py I mention it here as another problem that adopting the regex module could resolve (as regex promptly returns None for this case). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 12:14:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 11:14:01 +0000 Subject: [issue16411] zlib.Decompress.decompress() retains pointer to input buffer without acquiring reference to it In-Reply-To: <1352075364.32.0.439696678294.issue16411@psf.upfronthosting.co.za> Message-ID: <1352114041.73.0.00685636171272.issue16411@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The decompressor does not hold a reference to the data object, but it holds a reference to the data. It's the unconsumed_tail attribute. The patch is simple. ---------- keywords: +patch Added file: http://bugs.python.org/file27891/issue16411.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 12:14:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 11:14:45 +0000 Subject: [issue16411] zlib.Decompress.decompress() retains pointer to input buffer without acquiring reference to it In-Reply-To: <1352075364.32.0.439696678294.issue16411@psf.upfronthosting.co.za> Message-ID: <1352114085.17.0.16437510892.issue16411@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 12:24:28 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 05 Nov 2012 11:24:28 +0000 Subject: [issue16413] Non cross-platform behavior of os.path.split Message-ID: <1352114668.34.0.500502059895.issue16413@psf.upfronthosting.co.za> New submission from anatoly techtonik: os.path.split('c:foo') gives ('c:', 'foo') on Windows and ('', 'c:foo') on Linux, which is not documented. IIUC, the behavior change in os module is not possible, so a documentation note will be appreciated. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 174890 nosy: docs at python, techtonik priority: normal severity: normal status: open title: Non cross-platform behavior of os.path.split versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 12:29:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 11:29:36 +0000 Subject: [issue16413] Non cross-platform behavior of os.path.split In-Reply-To: <1352114668.34.0.500502059895.issue16413@psf.upfronthosting.co.za> Message-ID: <1352114976.92.0.229687086841.issue16413@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: .. note:: Since different operating systems have different path name conventions, there are several versions of this module in the standard library. The :mod:`os.path` module is always the path module suitable for the operating system Python is running on, and therefore usable for local paths. However, you can also import and use the individual modules if you want to manipulate a path that is *always* in one of the different formats. They all have the same interface: * :mod:`posixpath` for UNIX-style paths * :mod:`ntpath` for Windows paths * :mod:`macpath` for old-style MacOS paths ---------- nosy: +serhiy.storchaka resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 12:33:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 05 Nov 2012 11:33:35 +0000 Subject: [issue6717] Some problem with recursion handling In-Reply-To: <1250518561.04.0.421053701967.issue6717@psf.upfronthosting.co.za> Message-ID: <3XwBbf2vNBzRG2@mail.python.org> Roundup Robot added the comment: New changeset 0dfa3b09a6fe by Nick Coghlan in branch '3.2': Record a known crasher from #6717 http://hg.python.org/cpython/rev/0dfa3b09a6fe New changeset 509f7a53f8cc by Nick Coghlan in branch '3.3': Merge #6717 crasher from 3.2 http://hg.python.org/cpython/rev/509f7a53f8cc New changeset 47943fe516ec by Nick Coghlan in branch 'default': Merge #6717 crasher from 3.3 http://hg.python.org/cpython/rev/47943fe516ec ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 12:36:08 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 11:36:08 +0000 Subject: [issue16281] TODO in tailmatch(): it does not support backward in all cases In-Reply-To: <201211051121.46585.storchaka@gmail.com> Message-ID: STINNER Victor added the comment: >> Oh, PyUnicode_Tailmatch() documentation doesn't mention that the function >> can fail. > > But it does. > > .. c:function:: int PyUnicode_Tailmatch(PyObject *str, PyObject *substr, \ > Py_ssize_t start, Py_ssize_t end, int direction) > > Return 1 if *substr* matches ``str[start:end]`` at the given tail end > (*direction* == -1 means to do a prefix match, *direction* == 1 a suffix match), > 0 otherwise. Return ``-1`` if an error occurred. Oh, I read the "documentation" in unicodeobject.h: /* Return 1 if substr matches str[start:end] at the given tail end, 0 otherwise. */ The problem is that tailmatch() returns 0 if PyUnicode_READY() failed. It is a bug, even if it cannot occur because PyUnicode_Tailmatch() checks that the both strings are ready. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 12:47:36 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Nov 2012 11:47:36 +0000 Subject: [issue9405] Test fix for past crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage In-Reply-To: <1280352635.35.0.910645426575.issue9405@psf.upfronthosting.co.za> Message-ID: <1352116056.57.0.923064807135.issue9405@psf.upfronthosting.co.za> Nick Coghlan added the comment: Changing the type, since the crash bug has been fixed for a long time. ---------- nosy: +ncoghlan stage: -> test needed title: crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage -> Test fix for past crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage type: crash -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 12:48:00 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Nov 2012 11:48:00 +0000 Subject: [issue3367] Uninitialized value read in parsetok.c In-Reply-To: <1216153264.95.0.467111480464.issue3367@psf.upfronthosting.co.za> Message-ID: <1352116080.76.0.893027244135.issue3367@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 12:55:09 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Nov 2012 11:55:09 +0000 Subject: [issue16413] Non cross-platform behavior of os.path.split In-Reply-To: <1352114668.34.0.500502059895.issue16413@psf.upfronthosting.co.za> Message-ID: <1352116509.07.0.464929875827.issue16413@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 12:59:52 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 05 Nov 2012 11:59:52 +0000 Subject: [issue16413] Non cross-platform behavior of os.path.split In-Reply-To: <1352114668.34.0.500502059895.issue16413@psf.upfronthosting.co.za> Message-ID: <1352116792.51.0.405471499148.issue16413@psf.upfronthosting.co.za> anatoly techtonik added the comment: Historically os.path.split() on Windows is able to grok UNIX paths easily. Don't you think that Python language reference for the os.path should include less vague definition of Windows, UNIX-style and old-style MacOS paths it works with? ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 13:01:21 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 05 Nov 2012 12:01:21 +0000 Subject: [issue16413] Non cross-platform behavior of os.path.split In-Reply-To: <1352114668.34.0.500502059895.issue16413@psf.upfronthosting.co.za> Message-ID: <1352116881.94.0.392468481556.issue16413@psf.upfronthosting.co.za> anatoly techtonik added the comment: User story: as a Python programmer working with different systems, I'd like to know how os.path module threats paths on these systems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 13:12:14 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 12:12:14 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters Message-ID: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached patch adds support.NONASCII to have a "portable" non-ASCII character that can be used to test non-ASCII strings. The patch uses it in some existing functions. I wrote the patch on the default branch, we may start to use it since Python 3.2. ---------- components: Tests files: support_non_ascii.patch keywords: patch messages: 174897 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: Add support.NONASCII to test non-ASCII characters versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27892/support_non_ascii.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 13:12:47 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Nov 2012 12:12:47 +0000 Subject: [issue15001] segmentation fault with del sys.module['__main__'] In-Reply-To: <1338839365.76.0.631007627601.issue15001@psf.upfronthosting.co.za> Message-ID: <1352117567.03.0.99086344806.issue15001@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 13:12:49 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 12:12:49 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352117569.16.0.582572096874.issue16218@psf.upfronthosting.co.za> STINNER Victor added the comment: "It skipped on locales which does not support "?" (cp1006, cp1250, cp1251, cp737, cp852, cp855, cp866, cp874, cp949, euc_kr, gb2312, gbk, hz, iso2022_kr, iso8859_10, iso8859_11, iso8859_16, iso8859_2, iso8859_4, iso8859_5, iso8859_6, johab, koi8_r, koi8_u, mac_arabic, mac_farsi, ptcp154, tis_620). But the bug is actual on such locales." This issue is not specific to this test: I create the issue #16414 to improve the situation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 13:14:42 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 12:14:42 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352117682.16.0.799590672885.issue16218@psf.upfronthosting.co.za> STINNER Victor added the comment: >>> It tests nothing on utf-8 locale (test passed even when bug is not fixed). >> The issue is about Windows and UTF-8 is never used as filesystem encoding on Windows. > The issue exists on Linux as I reported in msg173373. I don't understand your problem. Non-ASCII filenames were already supported with UTF-8 locale encoding. The new test checks that there is no regression with UTF-8 locale encoding. The test pass without the fix because it was not supported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 13:26:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 12:26:41 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <1352118401.03.0.49927660307.issue16414@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think you should ensure that os.fsdecode(os.fsencode(character)) == character. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 13:34:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 12:34:25 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1352117682.16.0.799590672885.issue16218@psf.upfronthosting.co.za> Message-ID: <201211051434.08230.storchaka@gmail.com> Serhiy Storchaka added the comment: > Non-ASCII filenames were already supported with UTF-8 locale encoding. Test the example in msg173373. It fails without fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 13:37:30 2012 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 05 Nov 2012 12:37:30 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1352119050.46.0.0101675749246.issue8913@psf.upfronthosting.co.za> Eric V. Smith added the comment: To Heikki Partanen excellent point in the review about date __format__ strings allowing you to combine date formatting with other types of formatting: This is a great point. It's the lack of this that (for example) requires the logging module to have a separate datefmt parameter. With %-formatting, there's no easy way to say: '{timestamp:%Y%m%d-%H%M%S} {hostname:^40} {count:02d}'.format(timestamp=ts, hostname=host, count=count) That is, with %-formatting you can't have a single string that specifies both a date/time format and other formatting as well as other formatting specifiers. I don't think the example in the patch is great, but I do think that it's a good point that needs to be emphasized. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 13:52:49 2012 From: report at bugs.python.org (Kristof Csillag) Date: Mon, 05 Nov 2012 12:52:49 +0000 Subject: [issue5364] documentation in epub format In-Reply-To: <1235557178.12.0.454366670328.issue5364@psf.upfronthosting.co.za> Message-ID: <1352119969.47.0.681330947621.issue5364@psf.upfronthosting.co.za> Kristof Csillag added the comment: I have prepared a patch to build the 2.7 docs in EPUB format, too. (Since this was already done on Python 3; this is only a very simple backport of a few lines in a Makefile, a readme and a HTML download page.) ---------- keywords: +patch nosy: +csillag Added file: http://bugs.python.org/file27893/docs_in_epub_for_2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 13:58:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 12:58:22 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <1352120302.4.0.717861742873.issue16414@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If NONASCII is None I suggest the followed fallback code for i in range(0x80, 0xFFFF): character = chr(i) if character.isprintable(): try: if os.fsdecode(os.fsencode(character)) == character: NONASCII = character break except UnicodeError: pass ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 14:08:13 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 05 Nov 2012 13:08:13 +0000 Subject: [issue14266] pyunit script as shorthand for python -m unittest In-Reply-To: <1331586037.12.0.876793471383.issue14266@psf.upfronthosting.co.za> Message-ID: <1352120893.42.0.237830517922.issue14266@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Is it should be separate binary? Or problem can be solved by regular python script with executable bit? What's about Windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 14:11:29 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 05 Nov 2012 13:11:29 +0000 Subject: [issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2? In-Reply-To: <1351359067.41.0.359232821509.issue16339@psf.upfronthosting.co.za> Message-ID: <1352121089.2.0.427121128162.issue16339@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thread on #python-dev: http://mail.python.org/pipermail/python-dev/2012-November/122543.html If this is documented, direct tests for this form of exec should also be added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 14:11:56 2012 From: report at bugs.python.org (Michael Foord) Date: Mon, 05 Nov 2012 13:11:56 +0000 Subject: [issue14266] pyunit script as shorthand for python -m unittest In-Reply-To: <1331586037.12.0.876793471383.issue14266@psf.upfronthosting.co.za> Message-ID: <1352121116.68.0.0408778186895.issue14266@psf.upfronthosting.co.za> Michael Foord added the comment: A python script should be fine - this is what unittest2 does and I haven't had any requests from Windows users for a binary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 14:24:40 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 05 Nov 2012 13:24:40 +0000 Subject: [issue8243] curses writing to window's bottom right position raises: `_curses.error: addstr() returned ERR' Message-ID: <1352121880.55.0.191535515397.issue8243@psf.upfronthosting.co.za> New submission from Ramchandra Apte: AutoBump?. ---------- nosy: +ramchandra.apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 14:24:49 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 05 Nov 2012 13:24:49 +0000 Subject: [issue8243] curses writing to window's bottom right position raises: `_curses.error: addstr() returned ERR' In-Reply-To: <1352121880.55.0.191535515397.issue8243@psf.upfronthosting.co.za> Message-ID: <1352121889.07.0.539588097654.issue8243@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 14:28:59 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 05 Nov 2012 13:28:59 +0000 Subject: [issue4887] environment inspection and manipulation API is buggy, inconsistent with "Python philosophy" for wrapping native APIs In-Reply-To: <1231452487.08.0.408278867366.issue4887@psf.upfronthosting.co.za> Message-ID: <1352122139.27.0.844024317165.issue4887@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 14:30:41 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 05 Nov 2012 13:30:41 +0000 Subject: [issue7292] Multiprocessing Joinable race condition? In-Reply-To: <1257748286.94.0.346139031927.issue7292@psf.upfronthosting.co.za> Message-ID: <1352122241.72.0.0512916633611.issue7292@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Buu..mp ---------- nosy: +ramchandra.apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 14:58:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 13:58:47 +0000 Subject: [issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data In-Reply-To: <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za> Message-ID: <1352123927.0.0.474792282563.issue16350@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: These were not idle questions. I wrote the patch, and I had to know what behavior is correct. Here's the patch. It fixes potential memory bug (unconsumed_tail sets to NULL in case of out of memory), resets the unconsumed_tail to b'' after EOF, updates unconsumed_tail and unused_data in flush(). I a little changed test for the previous case (here was O(N^2) for large data). I checked it on non-fixed Python, bug was catched. ---------- stage: committed/rejected -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 15:10:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 14:10:04 +0000 Subject: [issue8243] curses writing to window's bottom right position raises: `_curses.error: addstr() returned ERR' In-Reply-To: <1352121880.55.0.191535515397.issue8243@psf.upfronthosting.co.za> Message-ID: <1352124604.83.0.448490007591.issue8243@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Extension Modules -Library (Lib) versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 15:37:02 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 05 Nov 2012 14:37:02 +0000 Subject: [issue14965] super() and property inheritance behavior In-Reply-To: <1338433441.66.0.975494137492.issue14965@psf.upfronthosting.co.za> Message-ID: <1352126222.16.0.572189937151.issue14965@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I would say @x.deleter def x(self): del super().x confuses me a bit. But I'm only -0, let's see other developers for their opinions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 15:50:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 14:50:34 +0000 Subject: [issue15955] gzip, bz2, lzma: add option to limit output size In-Reply-To: <1347884562.79.0.801674791772.issue15955@psf.upfronthosting.co.za> Message-ID: <1352127034.83.0.563896258075.issue15955@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: unconsumed_tail should be private hidden attribute, which automatically prepends any consumed data. This should not be very complicated. But benchmarks needed to show what kind of approach is more efficient. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 15:57:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 14:57:39 +0000 Subject: [issue16408] zipfile.testzip() opens file but does not close it. In-Reply-To: <1352060579.29.0.995643495141.issue16408@psf.upfronthosting.co.za> Message-ID: <1352127459.43.0.272453588732.issue16408@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Quite the contrary. The ZipExtFile closes the file descriptor if the ZipFile is constructed on a filename. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 16:01:36 2012 From: report at bugs.python.org (akira) Date: Mon, 05 Nov 2012 15:01:36 +0000 Subject: [issue16409] urlretrieve regression: first call returns block size as 0 In-Reply-To: <1352068025.04.0.157597994471.issue16409@psf.upfronthosting.co.za> Message-ID: <1352127696.25.0.765592353517.issue16409@psf.upfronthosting.co.za> akira added the comment: The summary assumes that issue 10050 is valid i.e., urlretrieve is reimplemented using new urlopen and 2.x FancyURLopener is deprecated. It might not be so [1]. In this case the summary is incorrect. Old implementation is available as: opener = FancyURLopener() urlretrieve = opener.retrieve btw, the new implementation doesn't prevent you to estimate the progress: def make_reporthook(): read = 0 # number of bytes read so far def reporthook(blocknum, blocksize, totalsize): nonlocal read read += blocksize if totalsize > 0: percent = read * 1e2 / totalsize print("%5.1f%% %*d / %d" % ( percent, len(str(totalsize)), read, totalsize)) else: print("read %d" % (read,)) return reporthook [1]: http://mail.python.org/pipermail/python-dev/2011-March/109450.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 16:26:24 2012 From: report at bugs.python.org (Alessandro Pilotti) Date: Mon, 05 Nov 2012 15:26:24 +0000 Subject: [issue16415] eventlet.monkey_patch() breaks subprocess.Popen on Windows Message-ID: <1352129184.29.0.628026501829.issue16415@psf.upfronthosting.co.za> New submission from Alessandro Pilotti: eventlet.monkey_patch() breaks subprocess.Popen on Windows with error: NotImplementedError: set_nonblocking() on a file object with no setblocking() method (Windows pipes don't support non-blocking I/O) Here's the full stack trace: http://paste.openstack.org/show/24032/ Workaround: eventlet.monkey_patch(os=False) ---------- components: IO, Interpreter Core, Library (Lib) messages: 174915 nosy: alexpilotti priority: normal severity: normal status: open title: eventlet.monkey_patch() breaks subprocess.Popen on Windows type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 16:27:39 2012 From: report at bugs.python.org (Tim Golden) Date: Mon, 05 Nov 2012 15:27:39 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1352129259.61.0.578722685454.issue9584@psf.upfronthosting.co.za> Tim Golden added the comment: Attached is a refactored version of Mathieu's patch which, when applied to tip, passes all tests. ---------- Added file: http://bugs.python.org/file27894/0003-reworked-issue9584.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 16:58:13 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Nov 2012 15:58:13 +0000 Subject: [issue16415] eventlet.monkey_patch() breaks subprocess.Popen on Windows In-Reply-To: <1352129184.29.0.628026501829.issue16415@psf.upfronthosting.co.za> Message-ID: <1352131093.63.0.491642933013.issue16415@psf.upfronthosting.co.za> R. David Murray added the comment: eventlet is not a part of the Python standard library. Please report this bug to the project's bug tracker. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 17:51:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 05 Nov 2012 16:51:55 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1352134315.1.0.429554565639.issue16389@psf.upfronthosting.co.za> Ezio Melotti added the comment: Attached a proof of concept that removes the caching for re.compile, as suggested in msg174599. ---------- Added file: http://bugs.python.org/file27895/issue16389.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 17:58:05 2012 From: report at bugs.python.org (Tim Golden) Date: Mon, 05 Nov 2012 16:58:05 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1352134685.2.0.850350219971.issue9584@psf.upfronthosting.co.za> Tim Golden added the comment: Something went wrong with that patch; it doesn't include all the changes to test_glob. I'll upload a newer patch later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 18:07:11 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 05 Nov 2012 17:07:11 +0000 Subject: [issue16385] evaluating literal dict with repeated keys gives no warnings/errors In-Reply-To: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> Message-ID: <1352135231.65.0.0444215029199.issue16385@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, I agree with this rejection. ---------- nosy: +rhettinger stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 18:12:47 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 05 Nov 2012 17:12:47 +0000 Subject: [issue16404] Uses of PyLong_FromLong that don't check for errors In-Reply-To: <1352041027.23.0.922968343734.issue16404@psf.upfronthosting.co.za> Message-ID: <1352135567.05.0.406325356346.issue16404@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 18:22:18 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 05 Nov 2012 17:22:18 +0000 Subject: [issue16408] zipfile.testzip() opens file but does not close it. In-Reply-To: <1352060579.29.0.995643495141.issue16408@psf.upfronthosting.co.za> Message-ID: <1352136138.48.0.326215076904.issue16408@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I think this is a duplicate of issue #16183. Are you sure python 3 is affected?. ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 18:23:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 05 Nov 2012 17:23:31 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <1352136211.78.0.672990331972.issue16414@psf.upfronthosting.co.za> Chris Jerdonek added the comment: +# NONASCII: non-ASCII character encodable by os.fsencode(), +# or None if there is no such character. +NONASCII = None Can you use a name that reflects that this is a specific type of non-ASCII character having a special property (e.g. FS_NONASCII)? I think "ASCII" should be reserved for a generic non-ASCII character. Moreover, there may be other types of non-ASCII we can add in the future. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 18:36:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 17:36:52 +0000 Subject: [issue16408] zipfile.testzip() opens file but does not close it. In-Reply-To: <1352060579.29.0.995643495141.issue16408@psf.upfronthosting.co.za> Message-ID: <1352137012.46.0.245401453868.issue16408@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No, this is not a duplicate. ZipExtFile.close() closes a file handle, but ZipExtFile.close() is not used here. I?see also some possible FD leaks in ZipFile.open(). It will be good to fix all them in this issue. If no one will make a patch for this easy issue, I'll do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 18:37:06 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 05 Nov 2012 17:37:06 +0000 Subject: [issue7292] Multiprocessing Joinable race condition? In-Reply-To: <1257748286.94.0.346139031927.issue7292@psf.upfronthosting.co.za> Message-ID: <1352137026.66.0.0361121317919.issue7292@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 18:45:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 17:45:17 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1352137517.0.0.240634932795.issue16389@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ezio, I agree with you, but I think this should be a separate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 18:50:55 2012 From: report at bugs.python.org (Ambroz Bizjak) Date: Mon, 05 Nov 2012 17:50:55 +0000 Subject: [issue3754] cross-compilation support for python build In-Reply-To: <1220305759.82.0.468834426074.issue3754@psf.upfronthosting.co.za> Message-ID: <1352137855.52.0.965063740879.issue3754@psf.upfronthosting.co.za> Ambroz Bizjak added the comment: I've applied all patches from py3k-20121004-CROSS.tgz to Python 3.3.0 except 2, 4, and 9 (which didn't apply), but it's not working. After it builds the built in modules, it tries to run the parser generator which was cross-compiled. make Parser/pgen make[1]: Entering directory `/root/Python-3.3.0' armv5tel-softfloat-linux-gnueabi-gcc -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -o Python/dynamic_annotations.o Python/dynamic_annotations.c armv5tel-softfloat-linux-gnueabi-gcc -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -o Python/mysnprintf.o Python/mysnprintf.c armv5tel-softfloat-linux-gnueabi-gcc -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -o Python/pyctype.o Python/pyctype.c armv5tel-softfloat-linux-gnueabi-gcc -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -o Parser/tokenizer_pgen.o Parser/tokenizer_pgen.c armv5tel-softfloat-linux-gnueabi-gcc -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -o Parser/printgrammar.o Parser/printgrammar.c armv5tel-softfloat-linux-gnueabi-gcc -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -o Parser/parsetok_pgen.o Parser/parsetok_pgen.c armv5tel-softfloat-linux-gnueabi-gcc -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -o Parser/pgenmain.o Parser/pgenmain.c armv5tel-softfloat-linux-gnueabi-gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Objects/obmalloc.o Python/dynamic_annotations.o Python/mysnprintf.o Python/pyctype.o Parser/tokenizer_pgen.o Parser/printgrammar.o Parser/parsetok_pgen.o Parser/pgenmain.o -lpthread -ldl -lpthread -lutil -o Parser/pgen make[1]: Leaving directory `/root/Python-3.3.0' Parser/pgen ./Grammar/Grammar ./Include/graminit.h ./Python/graminit.c Parser/pgen: Parser/pgen: cannot execute binary file make: *** [Include/graminit.h] Error 126 ---------- nosy: +ambrop7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 18:54:25 2012 From: report at bugs.python.org (Ambroz Bizjak) Date: Mon, 05 Nov 2012 17:54:25 +0000 Subject: [issue3754] cross-compilation support for python build In-Reply-To: <1220305759.82.0.468834426074.issue3754@psf.upfronthosting.co.za> Message-ID: <1352138065.22.0.191060519485.issue3754@psf.upfronthosting.co.za> Ambroz Bizjak added the comment: Forgot to mention: I did run autoreconf after applying the patches. I'm attaching the full output. ---------- Added file: http://bugs.python.org/file27896/log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 19:30:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 05 Nov 2012 18:30:05 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1352140205.63.0.169596192108.issue16389@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think the lru_cache should be kept if possible (i.e. I'm -0.5 on your patch). If this result in a slowdown (as the mako_v2 benchmark indicates), then there are two options: 1) optimize lru_cache; 2) avoid using it for regular expressions compiled with re.compile; Both the changes should improve the performances. This issue is about the re module, so I think it's ok to cover any changes to the re module here, and improvements to lru_cache (e.g. a faster make_key) should be moved to a new issue. If this is not enough to restore the performances we might decide to go back to a custom cache instead of using lru_cache. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 19:45:09 2012 From: report at bugs.python.org (Ambroz Bizjak) Date: Mon, 05 Nov 2012 18:45:09 +0000 Subject: [issue3754] cross-compilation support for python build In-Reply-To: <1220305759.82.0.468834426074.issue3754@psf.upfronthosting.co.za> Message-ID: <1352141109.94.0.226336998332.issue3754@psf.upfronthosting.co.za> Ambroz Bizjak added the comment: A minor issue: if only --host= is specified on command line but not --build=, then cross_compiling variable is only defined after AC_PROG_CC is called. However, configure.ac uses it before that (e.g. the part at the top which looks for a python interpreter). Well, more precisely, something in autoconf sets it to cross_compiling=maybe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 19:48:18 2012 From: report at bugs.python.org (Taras Lyapun) Date: Mon, 05 Nov 2012 18:48:18 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1352141298.68.0.100997341389.issue16353@psf.upfronthosting.co.za> Taras Lyapun added the comment: Updated patch. Moved function to os and used Christian Heimes implementation. Updated doc, and test. Also renamed function to get_shell. Test passes on mac os and windows. ---------- Added file: http://bugs.python.org/file27897/issue16353.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 20:16:37 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 05 Nov 2012 19:16:37 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1352142997.24.0.670521460539.issue16353@psf.upfronthosting.co.za> Christian Heimes added the comment: I've tested confstr("CS_PATH") on Linux, Mac OS X, Solaris, HP-UX and BSD. It works and the path to `sh` is always included. Taras: You don't have to perform the platform inside the get_shell() function. I suggest that you define the function depending on the value of `name`. if name == "posix": def get_shell(): ... elif name in {"nt", "ce"}: def get_shell(): ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 20:19:47 2012 From: report at bugs.python.org (Georg Brandl) Date: Mon, 05 Nov 2012 19:19:47 +0000 Subject: [issue16413] Non cross-platform behavior of os.path.split In-Reply-To: <1352114668.34.0.500502059895.issue16413@psf.upfronthosting.co.za> Message-ID: <1352143187.67.0.470010651007.issue16413@psf.upfronthosting.co.za> Georg Brandl added the comment: Please submit a patch. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 20:30:03 2012 From: report at bugs.python.org (Taras Lyapun) Date: Mon, 05 Nov 2012 19:30:03 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1352143803.65.0.351366991193.issue16353@psf.upfronthosting.co.za> Taras Lyapun added the comment: Updated patch in regards to Christian Heimes remark. ---------- Added file: http://bugs.python.org/file27898/issue16353.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 20:31:33 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 05 Nov 2012 19:31:33 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1352143893.38.0.498844270005.issue16353@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Is someone able to test the patch on Android (the impetus for this issue)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 20:40:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 19:40:08 +0000 Subject: [issue8745] zipimport is a bit slow In-Reply-To: <1274162892.24.0.612432614461.issue8745@psf.upfronthosting.co.za> Message-ID: <1352144408.65.0.0899363032367.issue8745@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suggest to use fseek(fp, relative_offset, SEEK_CUR). It doesn't force a system call (at least on Linux) and may be a little faster than fread() or multiple getc(). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 20:51:44 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 05 Nov 2012 19:51:44 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1352145104.72.0.26151530912.issue16353@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Some minor comments. +.. function :: get_shell() + + Return the path to default shell. Three leading spaces needed. Also, "Return the path to the default shell." + For unix system returns path to ``sh``, for windows returns path to ``cmd.exe``. "On Unix systems returns the path to ``sh``, and on Windows returns the path to ``cmd.exe``." I would also document and test FileNotFound (e.g. by temporarily changing os.confstr). + """Return the path to default shell for Unix.""" the default shell + """Return the path to default shell for Windows.""" the default shell +class TestGetShell(unittest.TestCase): + def test_get_shell(self): + shell = os.get_shell() + param = "/c" if sys.platform == 'win32' else "-c" + s = subprocess.Popen([shell, param, "echo test"], + stdout=subprocess.PIPE) Alignment should be: + s = subprocess.Popen([shell, param, "echo test"], + stdout=subprocess.PIPE) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 20:51:52 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 05 Nov 2012 19:51:52 +0000 Subject: [issue16408] zipfile.testzip() opens file but does not close it. In-Reply-To: <1352060579.29.0.995643495141.issue16408@psf.upfronthosting.co.za> Message-ID: <1352145112.44.0.210340824678.issue16408@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Serhiy Storchaka, go for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 20:52:18 2012 From: report at bugs.python.org (Taras Lyapun) Date: Mon, 05 Nov 2012 19:52:18 +0000 Subject: [issue16391] terminator argument for logging.FileHandlers In-Reply-To: <1351896425.99.0.911168182655.issue16391@psf.upfronthosting.co.za> Message-ID: <1352145138.74.0.00715083116629.issue16391@psf.upfronthosting.co.za> Taras Lyapun added the comment: Hello! I don't understand issue - FileHandler is a subclass of StreamHandler, so you can use "terminator" for FileHandler instances in the same way as for StreamHandler instances. ---------- nosy: +lyapun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 21:30:52 2012 From: report at bugs.python.org (Tim Golden) Date: Mon, 05 Nov 2012 20:30:52 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1352147452.29.0.240837522245.issue9584@psf.upfronthosting.co.za> Tim Golden added the comment: Scratch that last comment: the patch does apply. I've tested it against Windows & Ubuntu. If no one comes in with any objections I'll commit it within the next day. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 21:33:07 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Nov 2012 20:33:07 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1352147587.85.0.0201605782026.issue16392@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Maybe we should add a warning in some documentation somewhere about > this and then close the issue? I don't really know where to add it, in the C API docs perhaps, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 21:44:37 2012 From: report at bugs.python.org (Mark Gius) Date: Mon, 05 Nov 2012 20:44:37 +0000 Subject: [issue16327] subprocess.Popen leaks file descriptors on os.fork() failure In-Reply-To: <1351204263.29.0.689540716038.issue16327@psf.upfronthosting.co.za> Message-ID: <1352148277.37.0.980171149554.issue16327@psf.upfronthosting.co.za> Mark Gius added the comment: My contributor form has been accepted. Anything else I should be doing to work towards getting a fix applied? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 21:45:58 2012 From: report at bugs.python.org (Rafik Draoui) Date: Mon, 05 Nov 2012 20:45:58 +0000 Subject: [issue10395] new os.path function to extract common prefix based on path components In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1352148358.84.0.529707452952.issue10395@psf.upfronthosting.co.za> Rafik Draoui added the comment: Here is a new patch addressing some of storchaka review comments, and implementing a version in ntpath. For the Windows version, I did as proposed in msg174819, but as I am not familiar with the semantics and subtleties of paths in Windows maybe this version of ntpath.commonpath is too simplistic and would return wrong results in some cases. I would like someone more knowledgeable in Windows to take care of it, or maybe just provide a test suite with lots of different corner cases that I could use to provide a better implementation. ---------- Added file: http://bugs.python.org/file27899/patch10395-2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 22:26:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 21:26:33 +0000 Subject: [issue16408] FD leaks in zipfile In-Reply-To: <1352060579.29.0.995643495141.issue16408@psf.upfronthosting.co.za> Message-ID: <1352150793.71.0.362289598124.issue16408@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch. In additional to leaks in testzip and ZipFile.open() I fixed possible leaks in other places. ---------- keywords: +patch stage: needs patch -> patch review title: zipfile.testzip() opens file but does not close it. -> FD leaks in zipfile Added file: http://bugs.python.org/file27900/zipfile_fd_leaks.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 22:27:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 21:27:15 +0000 Subject: [issue16408] FD leaks in zipfile In-Reply-To: <1352060579.29.0.995643495141.issue16408@psf.upfronthosting.co.za> Message-ID: <1352150835.95.0.372131159391.issue16408@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file27901/zipfile_fd_leaks-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 22:28:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Nov 2012 21:28:02 +0000 Subject: [issue16408] FD leaks in zipfile In-Reply-To: <1352060579.29.0.995643495141.issue16408@psf.upfronthosting.co.za> Message-ID: <1352150882.43.0.972534876018.issue16408@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file27902/zipfile_fd_leaks-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 23:18:23 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 22:18:23 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames Message-ID: <1352153903.84.0.995057035576.issue16416@psf.upfronthosting.co.za> New submission from STINNER Victor: Since the changeset 45079ad1e260 (issue #4388), command line arguments are decoded from UTF-8 instead of the locale encoding. Functions of Python/fileutils.c are still using the locale encoding. It does not work: see issue #16218. On Mac OS X, in the command line "python script.py", the filename "script.py" is decoded from UTF-8 (by _Py_DecodeUTF8_surrogateescape) but then it is passed to _Py_fopen() which encodes the filename to the locale encoding (ex: ISO-8859-1 if $LANG, $LC_CTYPE and $LC_ALL environment variables are not set). The result is mojibake and Python fails to open the script. Attached patch modifies function of Python/fileutils.c to use UTF-8 to encode and decode filenames, instead of the locale encoding on Mac OS X. I don't know yet if Module/getpath.c should also decode paths from UTF-8 instead of the locale encoding on Mac OS X. We may expose _Py_decode_filename(). ---------- assignee: ronaldoussoren components: Macintosh files: macosx.patch keywords: patch messages: 174943 nosy: haypo, ronaldoussoren priority: normal severity: normal status: open title: Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames versions: Python 3.4 Added file: http://bugs.python.org/file27903/macosx.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 23:20:11 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 22:20:11 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352154011.13.0.978736780944.issue16218@psf.upfronthosting.co.za> STINNER Victor added the comment: I created the issue #16416 to fix the Mac OS X case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 23:20:18 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 22:20:18 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames In-Reply-To: <1352153903.84.0.995057035576.issue16416@psf.upfronthosting.co.za> Message-ID: <1352154018.87.0.769879313383.issue16416@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 5 23:57:08 2012 From: report at bugs.python.org (Rosa Maria) Date: Mon, 05 Nov 2012 22:57:08 +0000 Subject: [issue16417] Integer converted in tuple without request Message-ID: <1352156228.06.0.802520364311.issue16417@psf.upfronthosting.co.za> New submission from Rosa Maria: in instruction: b = int(input('Dame valor (mayor) de b = ')) later is an instruction: while b > 0: and the result is: Traceback (most recent call last): File "H:\Soft_nuevo\Reptil\GCD_MCD_Euclides_Extendido-0.py", line 39, in while b > 0: TypeError: unorderable types: tuple() > int() ---------- components: IDLE files: GCD_MCD_Euclides_Extendido-0.py messages: 174945 nosy: Gravitania priority: normal severity: normal status: open title: Integer converted in tuple without request type: crash versions: Python 3.3 Added file: http://bugs.python.org/file27904/GCD_MCD_Euclides_Extendido-0.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 00:10:47 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 23:10:47 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <1352157047.11.0.327905566463.issue16414@psf.upfronthosting.co.za> STINNER Victor added the comment: > I think you should ensure that os.fsdecode(os.fsencode(character)) == character. Chosen characters respect this property, but it doesn't hurt to add such check. > Can you use a name that reflects that this is a specific type > of non-ASCII character having a special property (e.g. FS_NONASCII)? Done. ---------- Added file: http://bugs.python.org/file27905/support_non_ascii-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 00:11:51 2012 From: report at bugs.python.org (Juraj Variny) Date: Mon, 05 Nov 2012 23:11:51 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message Message-ID: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> New submission from Juraj Variny: Example: parser.add_argument("-p","--port", help="Listening port", type=int, choices=range(1, 65535),default=8007,required = False) generates this usage text: usage: agent.py [-h] [-p {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30, <...snip...> ,65522,65523,65524,65525,65526,65527,65528,65529,65530,65531,65532,65533,65534}] optional arguments: -h, --help show this help message and exit -p {1,2,3,4,5,6,7,8,9,10,11,12,13,14, <...snip...> ,65525,65526,65527,65528,65529,65530,65531,65532,65533,65534} Listening port ---------- components: Library (Lib) messages: 174947 nosy: Juraj.Variny priority: normal severity: normal status: open title: argparse with many choices can generate absurdly long usage message type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 00:12:29 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 23:12:29 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <1352157149.42.0.662922063873.issue16414@psf.upfronthosting.co.za> STINNER Victor added the comment: > If NONASCII is None I suggest the followed fallback code I prefer to not "brute force" Unicode because it would slow down any test, even tests not using FS_NONASCII. I wrote attached brute.py script to compute an exhaustive list of non-ASCII characters encodable to "any" locale encoding. My locale encoding list is not complete, but it should be enough for our purpose. The list can be completed later. ---------- Added file: http://bugs.python.org/file27906/brute.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 00:12:37 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 23:12:37 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <1352157157.31.0.460316495272.issue16414@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file27892/support_non_ascii.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 00:17:33 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Nov 2012 23:17:33 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <1352157453.32.0.491302831817.issue16414@psf.upfronthosting.co.za> STINNER Victor added the comment: I tested support_non_ascii-2.patch on Windows with cp932 ANSI code page (FS encoding), and on Linux with ASCII, ISO-8859-1, ISO-8859-15 and UTF-8 locale encodings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 00:17:35 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Nov 2012 23:17:35 +0000 Subject: [issue16417] Integer converted in tuple without request In-Reply-To: <1352156228.06.0.802520364311.issue16417@psf.upfronthosting.co.za> Message-ID: <1352157455.95.0.351902818873.issue16417@psf.upfronthosting.co.za> R. David Murray added the comment: You did request a tuple: r = a - q * b, That is equivalent to r = (a - q * b,) which is a single element tuple. I had to put in some print statements in your loop to find that, it wasn't obvious. This is perhaps a disadvantage of Python's tuple notation, but the benefits of the notation outweigh this small disadvantage, I think. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 01:09:37 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 06 Nov 2012 00:09:37 +0000 Subject: [issue6280] calendar.timegm() belongs in time module, next to time.gmtime() In-Reply-To: <1244911683.12.0.112588761912.issue6280@psf.upfronthosting.co.za> Message-ID: <1352160577.74.0.0453840851159.issue6280@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 03:07:30 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 06 Nov 2012 02:07:30 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352167650.16.0.560069575535.issue16418@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think choices is a good choice there (pardon the pun). You really want a custom type. I'm inclined to think that that applies to any 'choices' value that is 'too large' for the help display. Part of the point of choices is that you *want* the help display to list all the choices. I'm inclined to close this as invalid. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 04:39:12 2012 From: report at bugs.python.org (DDarko) Date: Tue, 06 Nov 2012 03:39:12 +0000 Subject: [issue16419] email.message._headers is a list Message-ID: <1352173152.15.0.701713687458.issue16419@psf.upfronthosting.co.za> New submission from DDarko: in Python 3.3 lib.email.message File "email/message.py", line 151, in as_string g.flatten(self, unixfrom=unixfrom) File "email/generator.py", line 112, in flatten self._write(msg) File "email/generator.py", line 171, in _write self._write_headers(msg) File "email/generator.py", line 197, in _write_headers for h, v in msg.raw_items(): File "email/message.py", line 441, in raw_items return iter(self._headers.copy()) AttributeError: 'list' object has no attribute 'copy' http://hg.python.org/cpython/file/ec00f8570c55/Lib/email/message.py in line 443 is: return iter(self._headers.copy()) I think that it should be: return iter(self._headers[:]) ---------- components: Library (Lib) messages: 174952 nosy: DDarko priority: normal severity: normal status: open title: email.message._headers is a list type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 05:13:02 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 06 Nov 2012 04:13:02 +0000 Subject: [issue16419] email.message._headers is a list In-Reply-To: <1352173152.15.0.701713687458.issue16419@psf.upfronthosting.co.za> Message-ID: <1352175182.86.0.607405688829.issue16419@psf.upfronthosting.co.za> Ezio Melotti added the comment: Lists have a new copy method starting from Python 3.3: Python 3.3.0+ (3.3:549f7b5baa83+, Nov 4 2012, 23:18:06) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> list.copy ---------- nosy: +ezio.melotti, r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 06:42:56 2012 From: report at bugs.python.org (Nikolay Bryskin) Date: Tue, 06 Nov 2012 05:42:56 +0000 Subject: [issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers In-Reply-To: <1351896425.99.0.911168182655.issue16391@psf.upfronthosting.co.za> Message-ID: <1352180576.22.0.609031917642.issue16391@psf.upfronthosting.co.za> Nikolay Bryskin added the comment: Hello, Taras. I've renamed the issue - StreamHandler should also have a "terminator" __init__ keyword argument. This argument is mostly needed for automatic logging configuration using logging.config.dictConfig or logging.config.fileConfig. ---------- title: terminator argument for logging.FileHandlers -> add "terminator" ctor argument to logging.StreamHandlers derived handlers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 07:29:20 2012 From: report at bugs.python.org (Lukas Lueg) Date: Tue, 06 Nov 2012 06:29:20 +0000 Subject: [issue16385] evaluating literal dict with repeated keys gives no warnings/errors In-Reply-To: <1351859267.72.0.446639729186.issue16385@psf.upfronthosting.co.za> Message-ID: <1352183360.37.0.985267904199.issue16385@psf.upfronthosting.co.za> Lukas Lueg added the comment: PyLint or PyChecker can only do this if the keys are all simple objects like ints or strings. Consider a class with a custom __hash__ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 07:38:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 06 Nov 2012 06:38:36 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352183916.94.0.777742556043.issue16418@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I agree with David. Another sign that using "choices" isn't the right approach is that it requires constructing a list of 66,000 elements. There are better ways of checking if a provided argument is an integer between 1 and 65,535. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 07:50:59 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 06 Nov 2012 06:50:59 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352184659.71.0.105236432779.issue16418@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The argparse documentation says in one part, "The choices keyword argument may be more convenient for type checkers that simply check against a range of values." Thus, I wouldn't object to language clarifying that choices is meant for lists of choices that should be displayed in the command-line help (e.g. "smaller" lists and human-readable). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 08:45:19 2012 From: report at bugs.python.org (Sean Ochoa) Date: Tue, 06 Nov 2012 07:45:19 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1352187919.01.0.400216995089.issue13349@psf.upfronthosting.co.za> Sean Ochoa added the comment: Tests updated for coverage and to use assertRaisesRegex. ---------- Added file: http://bugs.python.org/file27907/issue13349.patch.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 10:48:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Nov 2012 09:48:23 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <1352195303.79.0.335186387289.issue16414@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I tested brute.py for all supported in Python encodings: No character for encoding cp1006:surrogateescape :-( No character for encoding cp720:surrogateescape :-( No character for encoding cp864:surrogateescape :-( No character for encoding iso8859_3:surrogateescape :-( No character for encoding iso8859_6:surrogateescape :-( No character for encoding mac_arabic:surrogateescape :-( No character for encoding mac_farsi:surrogateescape :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 11:05:04 2012 From: report at bugs.python.org (Peter) Date: Tue, 06 Nov 2012 10:05:04 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1352196304.26.0.237907976345.issue6715@psf.upfronthosting.co.za> Peter added the comment: Apologies for noise, but since a backport was discussed, I'm mentioning this here. I've started implementing a backport, currently working and tested on Mac OS X and Linux, back to Python 3.0 - supporting Python 2 would be nice but probably significantly more work (assistance welcome - please get in touch on github): https://github.com/peterjc/backports.lzma Assuming Nadeem has no objections, I intend to publish this on PyPI (I have tried to email directly but perhaps I'm using an old email address or he has been busy, another reason for commenting here). Thanks! ---------- nosy: +maubp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 11:20:30 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 06 Nov 2012 10:20:30 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <1352197230.8.0.910178926483.issue16414@psf.upfronthosting.co.za> STINNER Victor added the comment: > I tested brute.py for all supported in Python encodings: Oh thanks, interesting result. I completed the encoding list and the character list: see brute2.py. I added "joker" characters: U+00A0 and U+20AC which match requierements for most locale encodings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 14:35:58 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 06 Nov 2012 13:35:58 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1352208958.38.0.458731843672.issue16353@psf.upfronthosting.co.za> Christian Heimes added the comment: Meh, Python 2.6 from SL4A (scripting languages for Android) doesn't have os.confstr(). I just tried it in a Android 2.3.3 emulator. Python 2.6 on Linux has the function. I propose we fall back to PATH env and use /bin as last resort. try: cspath = confstr("CS_PATH") except (ValueError, NameError): # installation doesn't have confstr() or doesn't know about CS_PATH # fall back to PATH environ and use /bin as last resort cspath = environ.get("PATH", "/bin") for path in cspath.split(pathsep): ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 14:56:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 06 Nov 2012 13:56:02 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <3XwsjY05b1zLs9@mail.python.org> Roundup Robot added the comment: New changeset dafca4714298 by Tim Golden in branch 'default': issue9584: Add {} list expansion to glob. Original patch by Mathieu Bridon http://hg.python.org/cpython/rev/dafca4714298 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 15:10:27 2012 From: report at bugs.python.org (Armin Rigo) Date: Tue, 06 Nov 2012 14:10:27 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352211027.96.0.74785132029.issue14621@psf.upfronthosting.co.za> Armin Rigo added the comment: Benjamin: oups, sorry. I don't remember setting the "easy" keyword, my mistake. Fwiw I'm +1 on Marc-Andre's solution. Make it a tunable setting, e.g. with sys.setcollisionlimit(). Defaults to sys.maxint on existing Pythons and some smaller value (70?) on new Pythons. It has the same benefits as the recursion limit: it's theoretically bad, but most of the time very useful. It would also crash on bad usages of custom __hash__() methods: e.g. if you put a lot of keys in a dict, all with a custom __hash__() that returns 42. I imagine that it can be considered a good thing to raise in this case rather than silently degrade performance forever. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 15:16:41 2012 From: report at bugs.python.org (Daniele Varrazzo) Date: Tue, 06 Nov 2012 14:16:41 +0000 Subject: [issue16420] PEP 249 (DB-API 2.0) converted to reStructuredText Message-ID: <1352211401.03.0.321684940203.issue16420@psf.upfronthosting.co.za> New submission from Daniele Varrazzo: I've converted the DBAPI to reST, mostly to allow linking from external documentation. It would be great to replace the current text only version with it. File attached. ---------- assignee: docs at python components: Documentation files: pep-0249.txt messages: 174965 nosy: docs at python, lemburg, piro priority: normal severity: normal status: open title: PEP 249 (DB-API 2.0) converted to reStructuredText type: enhancement Added file: http://bugs.python.org/file27908/pep-0249.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 15:20:45 2012 From: report at bugs.python.org (Brett Cannon) Date: Tue, 06 Nov 2012 14:20:45 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1352211645.32.0.812956938762.issue16392@psf.upfronthosting.co.za> Brett Cannon added the comment: I was thinking somewhere in http://docs.python.org/3/c-api/import.html since this only comes up when you try to execute an import during extension module initialization that involves a circular import. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 15:42:53 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Tue, 06 Nov 2012 14:42:53 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object Message-ID: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> New submission from V?clav ?milauer: This issue was split off issue16194 (I am not copying the whole discussion here). It was suggested a new issue is opened for Python3, where a proper fix can be done. Python internally caches dynamically loaded modules, but the cache is based on the filename only. If one file contains several modules, only the first of them is imported and initialized properly. This interface was previously exposed via imp.load_dynamic, the same codepath is used by importlib.machinery.ExtensionFileLoader now. A solution is to cache by the (filename, modulename) tuple, which avoids any ambiguity. I am attaching a simple patch for that, agains current hg tip (80272:ec00f8570c55), and tested with the scripot attached to issue16194. I have not modified the test suite, I am not sure whether testing compiled modules is actually supported (did not see any compiled files in there), I will be glad for help. ---------- components: Extension Modules files: many-modules-in-one-so_1.diff keywords: patch messages: 174967 nosy: Arfrever, amaury.forgeotdarc, brett.cannon, docs at python, eudoxos, ncoghlan, r.david.murray priority: normal severity: normal status: open title: importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file27909/many-modules-in-one-so_1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 15:53:45 2012 From: report at bugs.python.org (Rosa Maria) Date: Tue, 06 Nov 2012 14:53:45 +0000 Subject: [issue16417] Integer converted in tuple without request In-Reply-To: <1352157455.95.0.351902818873.issue16417@psf.upfronthosting.co.za> Message-ID: <1352213621.91582.YahooMailNeo@web110604.mail.gq1.yahoo.com> Rosa Maria added the comment: Thanks Thanks Thanks Thanks Thanks Thanks Thanks you very much, You are going to go to heaven with your shoes included. Best regards and have a nice year end. Rosa Mar?a ? "Cu?date de la Ciencia que no Llora, de la Filosof?a que no R?e y de la Grandeza que no se inclina ante los ni?os" "Madre es el nombre de dios en los labios y en los corazones de todos los ni?os" >________________________________ > De: R. David Murray >Para: rosemeer at yahoo.com.mx >Enviado: Lunes, 5 de noviembre, 2012 17:17:35 >Asunto: [issue16417] Integer converted in tuple without request > > >R. David Murray added the comment: > >You did request a tuple: > >? r = a - q * b, > >That is equivalent to > >? r = (a - q * b,) > >which is a single element tuple. > >I had to put in some print statements in your loop to find that, it wasn't obvious.? This is perhaps a disadvantage of Python's tuple notation, but the benefits of the notation outweigh this small disadvantage, I think. > >---------- >nosy: +r.david.murray >resolution:? -> invalid >stage:? -> committed/rejected >status: open -> closed >type: crash -> behavior > >_______________________________________ >Python tracker > >_______________________________________ > > > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 15:54:36 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 06 Nov 2012 14:54:36 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352213676.72.0.232876824898.issue16421@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Storing several modules in single so/pyd file is crazy idea from my perspective. The test is definitely required. BTW, Why version is set to 3.5? Should component be set to "Interpreter code"? ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 15:59:06 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 06 Nov 2012 14:59:06 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352213946.23.0.309007058098.issue16421@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It's not that crazy, if you consider that all builtin modules are stored in python33.dll. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 15:59:58 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Tue, 06 Nov 2012 14:59:58 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352213998.55.0.261765664416.issue16421@psf.upfronthosting.co.za> V?clav ?milauer added the comment: Storing several modules in one .so file offloads some issues which have to be dealt with manually (like one module needing symbols from other module, or even cross-dependencies) to the linker. In any case, unless forbidden and signalled, it should be supported. I set version to 3.4 and component to "Interpreter core", as you suggested, it is probably more appropriate. How do I write test which requires a custom module to be compiled? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:04:42 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 06 Nov 2012 15:04:42 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352214282.85.0.468049886758.issue14621@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's the message that helped convince us to go against collision counting originally: http://mail.python.org/pipermail/python-dev/2012-January/115726.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:06:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Nov 2012 15:06:18 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1352214378.87.0.42140436558.issue9584@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >>> glob.glob('*.ac') ['configure.ac'] >>> glob.glob('*.sub') ['config.sub'] >>> glob.glob('*.{sub,ac}') ['config.sub'] And since these changes are backward incompatible (and moreover, now it is impossible to glob for paths that contain braces), I would prefer a keyword to switch this option (off by default) or a separate function. See "man glob" [1] for flag GLOB_BRACE. [1] http://linux.die.net/man/3/glob ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:08:11 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Tue, 06 Nov 2012 15:08:11 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352214491.98.0.729825688805.issue16421@psf.upfronthosting.co.za> Changes by V?clav ?milauer : ---------- components: +Interpreter Core -Extension Modules versions: +Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:09:30 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 06 Nov 2012 15:09:30 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352214570.6.0.548749368558.issue16421@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Amaury, I'm ok with pushing several modules into python33.dll or embedding it directly into executable. For standard so/dll files you have to use different file names for modules to make regular import statement work. It can be done via symlink/hardlink, but looks a bit hairy. V?clav, python already have _testbuffer and _testcapi modules used for testing only. I think you can add yet another one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:10:40 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 06 Nov 2012 15:10:40 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352214640.56.0.713426393004.issue16421@psf.upfronthosting.co.za> R. David Murray added the comment: There is an example in the test suite somewhere. Probably in the distutils tests. Search for xxmodule...but you'll need to create your own source. I'd see if you can write it out from the test rather than checking in another data file, but a data file is an option if needed. ---------- components: +Extension Modules -Interpreter Core type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:12:03 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Tue, 06 Nov 2012 15:12:03 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352214723.65.0.606102016752.issue16421@psf.upfronthosting.co.za> V?clav ?milauer added the comment: @Andrew: I was using symlinks to achieve this, until I found recently that some exotic systems (read: windows) have still troubles there, like not letting non-admins create symlinks. ---------- type: enhancement -> behavior versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:12:52 2012 From: report at bugs.python.org (Mathieu Bridon) Date: Tue, 06 Nov 2012 15:12:52 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1352214772.79.0.304279972757.issue9584@psf.upfronthosting.co.za> Mathieu Bridon added the comment: >>> glob.glob('*.{sub,ac}') ['config.sub'] I'm surprised this broke, this is one of the behaviour I thought I had implemented in my original patch. :-/ > (and moreover, now it is impossible to glob for paths that contain braces) I am absolutely sure this was working in my original submission, I had even added unit tests for it: + # test some edge cases where braces must not be expanded + eq(self.glob('c{}d'), [self.norm('c{}d')]) + eq(self.glob('c{d{e,f}g'), map(self.norm, ['c{deg', 'c{dfg'])) + eq(self.glob('c{d,e}{f}g'), map(self.norm, ['cd{f}g', 'ce{f}g'])) + eq(self.glob('c{d,e}f}g'), map(self.norm, ['cdf}g', 'cef}g'])) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:13:44 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Tue, 06 Nov 2012 15:13:44 +0000 Subject: [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1352214824.7.0.264827257372.issue16194@psf.upfronthosting.co.za> V?clav ?milauer added the comment: issue16421 was opened for py3k. Just for the sport of writing, I fixed that in python 2.7 (tip) as well, though other seemed to defend the view it was not a bug, hence not fixable in 2.7. ---------- keywords: +patch versions: -Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27910/py2_many-modules-in-one-so_1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:14:46 2012 From: report at bugs.python.org (Tim Golden) Date: Tue, 06 Nov 2012 15:14:46 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1352214772.79.0.304279972757.issue9584@psf.upfronthosting.co.za> Message-ID: <50992963.1010309@timgolden.me.uk> Tim Golden added the comment: Must have been something I did. I'll revert the commit and re-test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:16:54 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 06 Nov 2012 15:16:54 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352215014.03.0.211605970658.issue16421@psf.upfronthosting.co.za> R. David Murray added the comment: Sorry, didn't mean to change the component back. ---------- components: +Interpreter Core -Extension Modules type: behavior -> enhancement versions: +Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:28:10 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 06 Nov 2012 15:28:10 +0000 Subject: [issue16381] Introduce option to force the interpreter to exit upon MemoryErrors In-Reply-To: <1351775704.44.0.517582874178.issue16381@psf.upfronthosting.co.za> Message-ID: <1352215690.33.0.891212880561.issue16381@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:29:41 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 06 Nov 2012 15:29:41 +0000 Subject: [issue16420] PEP 249 (DB-API 2.0) converted to reStructuredText In-Reply-To: <1352211401.03.0.321684940203.issue16420@psf.upfronthosting.co.za> Message-ID: <1352215781.79.0.378358364708.issue16420@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Original file has been changed just now. Also it would be nice to get diff, not just new file (to check correctness of transition). ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:33:56 2012 From: report at bugs.python.org (Daniele Varrazzo) Date: Tue, 06 Nov 2012 15:33:56 +0000 Subject: [issue16420] PEP 249 (DB-API 2.0) converted to reStructuredText In-Reply-To: <1352211401.03.0.321684940203.issue16420@psf.upfronthosting.co.za> Message-ID: <1352216036.43.0.595689672459.issue16420@psf.upfronthosting.co.za> Daniele Varrazzo added the comment: Andrew, I've probably changed every single line (as almost all the original was indented), so diff wouldn't show anything useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:38:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 06 Nov 2012 15:38:22 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <3Xwvzd3s0YzMQL@mail.python.org> Roundup Robot added the comment: New changeset ec897bb38708 by Tim Golden in branch 'default': Reversed changes from issue9584 http://hg.python.org/cpython/rev/ec897bb38708 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:43:33 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 06 Nov 2012 15:43:33 +0000 Subject: [issue16420] PEP 249 (DB-API 2.0) converted to reStructuredText In-Reply-To: <1352216036.43.0.595689672459.issue16420@psf.upfronthosting.co.za> Message-ID: <50993020.8070704@egenix.com> Marc-Andre Lemburg added the comment: On 06.11.2012 16:33, Daniele Varrazzo wrote: > > Daniele Varrazzo added the comment: > > Andrew, I've probably changed every single line (as almost all the original was indented), so diff wouldn't show anything useful. I'll go through the text and double check for typos. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 06 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:44:42 2012 From: report at bugs.python.org (John M Camara) Date: Tue, 06 Nov 2012 15:44:42 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352216682.15.0.181714726931.issue14621@psf.upfronthosting.co.za> John M Camara added the comment: How about using a secure hash algorithm that's implemented in HW when available. It doesn't eliminate the issue on systems that lack this support but at least it limits the scope of the problem. Of course some testing would need to be done to make sure the hardware hashing doesn't have a significant impact on performance. ---------- nosy: +camara _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:44:59 2012 From: report at bugs.python.org (Alex Gaynor) Date: Tue, 06 Nov 2012 15:44:59 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352216699.51.0.72165117758.issue14621@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:54:04 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 06 Nov 2012 15:54:04 +0000 Subject: [issue2275] urllib/httplib header capitalization In-Reply-To: <1205270540.47.0.336665756101.issue2275@psf.upfronthosting.co.za> Message-ID: <1352217244.89.0.519606282791.issue2275@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:54:13 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Tue, 06 Nov 2012 15:54:13 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352217253.72.0.843396152373.issue16421@psf.upfronthosting.co.za> V?clav ?milauer added the comment: I added the test, with a module Modules/_testimportmultiple.c. The test uses the (undocumented) imp module, but all othet tests in Lib/test/test_imp.py do the same, so I assume it is OK? ---------- Added file: http://bugs.python.org/file27911/many-modules-in-one-so_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:54:14 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 06 Nov 2012 15:54:14 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352217254.03.0.205730212988.issue14621@psf.upfronthosting.co.za> Christian Heimes added the comment: Our hash randomization will always leak some information about the randomization keys. The only way to properly secure our secrets is a cryptographic secure algorithms, for example a crypto hashing function in combination with a message authentication code like HMAC. I don't have to explain how that is going to hurt performance ... We can try to make it harder to guess the secret parts with a slightly modified algorithm like e.g. V8's hash but that's never going to be 100% secure. But might be secure enough to make an attack too hard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 16:54:31 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 06 Nov 2012 15:54:31 +0000 Subject: [issue16388] Urllib screws up capitalization in "User-Agent" HTTP Header In-Reply-To: <1351875253.7.0.390086386154.issue16388@psf.upfronthosting.co.za> Message-ID: <1352217271.04.0.0202823527236.issue16388@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 17:00:02 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 06 Nov 2012 16:00:02 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1352217602.37.0.610632300135.issue16389@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 17:08:03 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 06 Nov 2012 16:08:03 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352218083.47.0.0151481153495.issue14621@psf.upfronthosting.co.za> Christian Heimes added the comment: I deem hash randomization and collision counting as a poor man's workaround for the actual issue. Perhaps we shouldn't try too hard to fix an unsuitable data type. Hash maps have a known worst case complexity of O(n). A O(log n) algorithm should be used to parses and malicious key/value pairs. How about Python grows a additional btree implementation in its collections module? I know that it's not going to fix existing code. However in the long run it's the best safeguard against hash collision attacks. I'm thinking about a simple, self balancing btree like red-black-tree. A quick search on Wikipedia also revealed Scapegoat and Splay tree with interesting properties. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 17:29:19 2012 From: report at bugs.python.org (Giovanni Bajo) Date: Tue, 06 Nov 2012 16:29:19 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352219359.47.0.0541828795731.issue14621@psf.upfronthosting.co.za> Giovanni Bajo added the comment: Christian, there are good semi-crypto hash functions that don't leak as bad as Python's own modified FNV hash, without going all the way to HMAC. SipHash has very good collision resistance and doesn't leak anything: https://www.131002.net/siphash/ (notice: they distribute a python program to recover python's seed) It's obviously slower than Python's FNV, but it's hard to beat a sum+multiplication per character. ---------- nosy: +Giovanni.Bajo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 17:37:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Nov 2012 16:37:01 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1352219821.86.0.0556256160597.issue9584@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I am absolutely sure this was working in my original submission, I had even added unit tests for it: It can't be working in any implementation. >>> os.makedirs('a{b,c}d/e') >>> os.listdir('a{b,c}d') ['e'] >>> glob.glob('a{b,c}d/*') [] Was ['a{b,c}d/e'] in 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 17:39:44 2012 From: report at bugs.python.org (Brett Cannon) Date: Tue, 06 Nov 2012 16:39:44 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352219984.21.0.795981565087.issue16421@psf.upfronthosting.co.za> Brett Cannon added the comment: It's fine to cheat in tests, although test_imp predates importlib which is why it uses an undocumented API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 17:46:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Nov 2012 16:46:02 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1352140205.63.0.169596192108.issue16389@psf.upfronthosting.co.za> Message-ID: <201211061845.45038.storchaka@gmail.com> Serhiy Storchaka added the comment: > I think the lru_cache should be kept if possible (i.e. I'm -0.5 on your patch). This patch is only to show the upper level to which should be sought. I tried to optimize lru_cache(), but got only 15%. I'm afraid that serious optimization is impossible without rewriting lru_cache() on C. > 2) avoid using it for regular expressions compiled with re.compile; I do not see how it can significantly affect performance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 17:49:04 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 06 Nov 2012 16:49:04 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352220544.6.0.340886699762.issue14621@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks! SipHash looks interesting. It's using a XOR + ROT approach with a seed. And it's written by DJB which is usually a good sign. He writes secure code with good quality. Just his coding style tends to be ... unique. :) I'm going to try the algorithm. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 17:51:08 2012 From: report at bugs.python.org (Tim Golden) Date: Tue, 06 Nov 2012 16:51:08 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1352219821.86.0.0556256160597.issue9584@psf.upfronthosting.co.za> Message-ID: <50993FF8.8040002@timgolden.me.uk> Tim Golden added the comment: Well even in the original [working] version, the scope of this change was limited to glob.glob. os.listdir doesn't currently support any form of expansion (at least not on Windows) and nor does os.makedirs. I don't see any problem in restricting this change -- and any future extensions -- to glob.glob whose purpose is precisely to return one or more files matching a, possibly wildcard, pattern. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 18:00:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Nov 2012 17:00:06 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <50993FF8.8040002@timgolden.me.uk> Message-ID: <201211061859.37903.storchaka@gmail.com> Serhiy Storchaka added the comment: I'm talking about glob.glob(), not about os.listdir(). Bakward incompatible features should be off by default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 18:08:14 2012 From: report at bugs.python.org (Tim Golden) Date: Tue, 06 Nov 2012 17:08:14 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <201211061859.37903.storchaka@gmail.com> Message-ID: <509943FB.5020000@timgolden.me.uk> Tim Golden added the comment: Sorry, I misunderstood the point you were making with the os.listdir/makedirs examples. Fair point about backwards compatibility. This may make this change untenable as no-one will want a series of use_feature_xxx flags, one for each change we introduce to glob.glob. Unless we throw in every known expansion / matching right now and have a single use-extended-features flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 18:10:45 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 06 Nov 2012 17:10:45 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352221845.63.0.359157467628.issue14621@psf.upfronthosting.co.za> Christian Heimes added the comment: I modified crypto_auth() a bit: Py_uhash_t crypto_auth(const unsigned char *in, unsigned long long inlen) ... u64 k0 = _Py_HashSecret.prefix; u64 k1 = _Py_HashSecret.suffix; ... return (Py_uhash_t)b; and replaced the loop in _Py_HashBytes() with a call to crypto_auth(). For large strings SipHash is as faster as our current algorithm on my 64bit box. That was to be expected as SipHash works on blocks of 8 bytes while the default algorithm can't be optimized with SIMD instructions. Current hashing algorithm: $ ./python -m timeit -s "x = b'a' * int(1E7)" "hash(x)" 1000000 loops, best of 3: 0.39 usec per loop SipHash: $ ./python -m timeit -s "x = b'a' * int(1E7)" "hash(x)" 1000000 loops, best of 3: 0.381 usec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 19:26:07 2012 From: report at bugs.python.org (Giovanni Bajo) Date: Tue, 06 Nov 2012 18:26:07 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352226367.43.0.24725689397.issue14621@psf.upfronthosting.co.za> Giovanni Bajo added the comment: For short strings, you might want to have a look at the way you fetch the final partial word from memory. If the string is >= 8 bytes, you can fetch the last partial word as an unaligned memory fetch followed by a shift, instead of using a switch like in the reference code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 20:11:36 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 06 Nov 2012 19:11:36 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352229096.18.0.721698854378.issue14621@psf.upfronthosting.co.za> Christian Heimes added the comment: We can explore the various optimization options later. Also unaligned memory address is not allowed on some architectures like SPARC. If somebody likes to play with the algorithm: http://hg.python.org/sandbox/cheimes/shortlog/2cb7e97ca8d0 ---------- hgrepos: +159 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 20:22:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Nov 2012 19:22:35 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1352229755.81.0.969884140943.issue9584@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > This may make this change untenable as no-one will want a series of > use_feature_xxx flags, one for each change we introduce to glob.glob. > Unless we throw in every known expansion / matching right now and have a > single use-extended-features flag. This is another question. glob.glob(pattern, glob.GLOB_XXX | glob.GLOB_YYY) looks not much shorter than glob.glob(pattern, use_xxx=True, use_yyy=True). And not all features can be configured by only one bit. See os.access() and os.utime() as examples for many options. I hope that before 3.4 feature freeze we can change the interface, if needed. I also believe that this feature may not be regarded as mature without any sort of escaping (which also should be off by default for compatibility). And we need glob.escape() function for escaping arbitrary path. Since it is quite a complicated function, we need more examples in the documentation, which show different corner cases, nesting and interaction with wildcards. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 20:32:43 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 06 Nov 2012 19:32:43 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1352230363.13.0.495725371609.issue16353@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Confirm it for SL4A Python 3.2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 20:36:04 2012 From: report at bugs.python.org (Taras Lyapun) Date: Tue, 06 Nov 2012 19:36:04 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1352230564.19.0.916946348682.issue16353@psf.upfronthosting.co.za> Taras Lyapun added the comment: Andrew, do you mean that Christian Heimes last snippet working on Android? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 20:52:47 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 06 Nov 2012 19:52:47 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352231567.21.0.278278702685.issue16421@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Reviewed and commented the last patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 20:55:22 2012 From: report at bugs.python.org (Pino Toscano) Date: Tue, 06 Nov 2012 19:55:22 +0000 Subject: [issue13669] XATTR_SIZE_MAX and XATTR_LIST_MAX undefined on kfreebsd/debian with eglibc In-Reply-To: <1325078714.64.0.530368798013.issue13669@psf.upfronthosting.co.za> Message-ID: <1352231722.75.0.26398583104.issue13669@psf.upfronthosting.co.za> Pino Toscano added the comment: *_MAX constants are usually defined when the system declares that the maximum limit for that option exist and is already known at compile time. Python should simply not rely on XATTR_LIST_MAX and XATTR_SIZE_MAX being defined, but just grow the buffers as needed until *getxattr / *listxattr succeed or fail with errno != ERANGE; it seems the case already, although the two *_MAX are used as kind of "upper bound" limit. Instead of using short lists with sizes to try, what about starting from a size (e.g. 128 for getxattr and 256 for listxattr), and grow the buffer by adding the same value each iteration (or doubling the size)? ---------- nosy: +pino _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 21:00:46 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 06 Nov 2012 20:00:46 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1352232046.62.0.152794003366.issue16353@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I mean the last available SL4A doesn't have os.confstr Fallback should work, os.environ['PATH'] contains '/system/bin' where 'sh' is living. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 21:12:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Nov 2012 20:12:40 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352232760.93.0.716753365405.issue14621@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: $ ./python -m timeit -s "x = b'a' * int(1E7)" "hash(x)" Note that hash calculated only once. Add -n 1 option and use a larger data. > If somebody likes to play with the algorithm: $?./python -m timeit -n 1 -s "t = 'abcdefgh' * 10**8" "hash(t)" 1 loops, best of 3: 4.86 sec per loop Current hash algorithm runs 3.43 sec, V8's algorithm runs 2.44 sec. With simple optimization I got 3.62 sec, only 6% slower than the current. #define U8TO64_LE(p) ((u64)((u32 *)(p))[0] | ((u64)((u32 *)(p))[1] << 32)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 21:18:48 2012 From: report at bugs.python.org (Mahmood Hikmet) Date: Tue, 06 Nov 2012 20:18:48 +0000 Subject: [issue11631] Python 2.7.1 64bit, Win7 64bit problem to read and write with UDP. In-Reply-To: <1300786239.46.0.274643383137.issue11631@psf.upfronthosting.co.za> Message-ID: <1352233128.57.0.339423273706.issue11631@psf.upfronthosting.co.za> Mahmood Hikmet added the comment: I solved the problem - sorry it's taken me so long to reply. I know how frustrating it is when people don't respond with what they found out in the end. Turns out there's no bug as you said and it was based around something I did (as these things usually are). I was passing the packet as a string through redis before sending it which caused it to modify some bytes in there after they passed a certain value. I pickled the messages and it all worked in the end. Sorry about the trouble and thanks for the help! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 21:49:52 2012 From: report at bugs.python.org (Roumen Petrov) Date: Tue, 06 Nov 2012 20:49:52 +0000 Subject: [issue3754] cross-compilation support for python build In-Reply-To: <1352137855.52.0.965063740879.issue3754@psf.upfronthosting.co.za> Message-ID: <509977EC.6010507@roumenpetrov.info> Roumen Petrov added the comment: HI, Ambroz Ambroz Bizjak wrote: > I've applied all patches from py3k-20121004-CROSS.tgz to Python 3.3.0 except 2, 4, and 9 (which didn't apply), but it's not working. After it builds the built in modules, it tries to run the parser generator which was cross-compiled. 3.3.0 was split from head long time before release and I did not spend time to check what is actually entered. About patches : 2: restore graminit.* to source directory 4: restore AST to source directory After this touch files to avoid timestamp dependencies to launch extra build . You issue was reported and I guess is documented . It is related to checkout from repository and to general build process. I have a shell script to this but in brief script touch in source tree following files: - Include/graminit.h - Python/graminit.c - Include/Python-ast.h - Python/Python-ast.c - Python/importlib.h If you decide to build in source tree patch 2 and 4 could be skipped . Note that listed patches allow user to keep separate builds at same time for different platforms. As side effect part of patches could help to build with different configuration options. For one time cross-build users could use following scenario: 1) native configuration, build and installation 2) clean source tree 3) cross build&pack for one platform. Repeat 2 & 3 for each platform about 9: pass all top configure arguments to libffi configure to allow users to build it properly It is save to ignore this patch if libffi build is fine for you host platform. Otherwise .... just change setup to use only ... config_args = sysconfig.get_config_var("CONFIG_ARGS") ... and replace " ".join(config_args) with config_args in command. For instance I have build for a platform and with filtered "configure arguments" build fail. Instead to patch libffi code I prefer from main configure command line to control build of libffi. Roumen ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 21:53:48 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Nov 2012 20:53:48 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <1352235228.42.0.421870457092.issue12848@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What if just add " & 0xFFFFFFFF"? ---------- nosy: +serhiy.storchaka versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 21:59:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Nov 2012 20:59:44 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <1352235584.47.0.0716482594612.issue12848@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, for unpacking 32-bit unsigned big-endian bytes you can use len = int.from_bytes(self.read(4), 'big'). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 22:06:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Nov 2012 21:06:39 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <1352235999.3.0.628696939179.issue12848@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Or you can use len = struct.unpack('>I', self.read(4)). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 23:01:34 2012 From: report at bugs.python.org (Sandeep Mathew) Date: Tue, 06 Nov 2012 22:01:34 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1352239294.39.0.792110270656.issue16136@psf.upfronthosting.co.za> Sandeep Mathew added the comment: Hey, I was given access to HP's open source VMS cluster, Many thanks to HP. I should be able to continue python development for VMS. I shall ping you guys in case I get stuck. I should be good to go --Thomas ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 23:03:19 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 06 Nov 2012 22:03:19 +0000 Subject: [issue11631] Python 2.7.1 64bit, Win7 64bit problem to read and write with UDP. In-Reply-To: <1300786239.46.0.274643383137.issue11631@psf.upfronthosting.co.za> Message-ID: <1352239399.2.0.791868448095.issue11631@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for your response! I'm closing the ticket. ---------- nosy: +christian.heimes resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 23:18:27 2012 From: report at bugs.python.org (Rui Carmo) Date: Tue, 06 Nov 2012 22:18:27 +0000 Subject: [issue2275] urllib/httplib header capitalization In-Reply-To: <1352217244.94.0.00882919267189.issue2275@psf.upfronthosting.co.za> Message-ID: Rui Carmo added the comment: Should one look into the source and make effort to submit a patch, or is this being handled somehow? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 23:23:28 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 06 Nov 2012 22:23:28 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <3Xx4z2595PzMGY@mail.python.org> Roundup Robot added the comment: New changeset de8cf1ece068 by Victor Stinner in branch 'default': Issue #16414: Add support.FS_NONASCII and support.TESTFN_NONASCII http://hg.python.org/cpython/rev/de8cf1ece068 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 23:33:32 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 06 Nov 2012 22:33:32 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <3Xx5Bg3Xm3zMH5@mail.python.org> Roundup Robot added the comment: New changeset 0e9fbdda3c92 by Victor Stinner in branch 'default': Issue #16414: Fix support.TESTFN_UNDECODABLE and test_genericpath.test_nonascii_abspath() http://hg.python.org/cpython/rev/0e9fbdda3c92 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 23:34:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Nov 2012 22:34:10 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <1352241250.26.0.225086023603.issue16414@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Why were you add '- ' suffix to TESTFN_NONASCII? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 23:39:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Nov 2012 22:39:58 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <1352241598.6.0.826426400025.issue16414@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't see U+00A0 and U+20AC in the changeset. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 23:40:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 06 Nov 2012 22:40:15 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <3Xx5LG2pgKzMJ0@mail.python.org> Roundup Robot added the comment: New changeset 55710b8c6670 by Victor Stinner in branch 'default': Issue #16414: Fix typo in support.TESTFN_NONASCII (useless space) http://hg.python.org/cpython/rev/55710b8c6670 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 23:41:19 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 06 Nov 2012 22:41:19 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <1352241679.08.0.753604178886.issue16414@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file27912/brute2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 23:43:05 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 06 Nov 2012 22:43:05 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <3Xx5Ph5t3fzMG3@mail.python.org> Roundup Robot added the comment: New changeset 7f90305d9f23 by Victor Stinner in branch 'default': Issue #16414: Test more characters for support.FS_NONASCII http://hg.python.org/cpython/rev/7f90305d9f23 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 23:46:27 2012 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 06 Nov 2012 22:46:27 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <1352241987.66.0.462819575283.issue12848@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: pickle.py is the buggy one here. Its use of the marshal module is really a hack. Plus, it is slower than both struct and int.from_bytes. 14:40:57 [~/cpython]$ ./python -m timeit "int.from_bytes(b'\xff\xff\xff\xff', 'big')" 1000000 loops, best of 3: 0.209 usec per loop 14:38:03 [~/cpython]$ ./python -m timeit -s "import struct" "struct.unpack('>I', b'\xff\xff\xff\xff')" 10000000 loops, best of 3: 0.147 usec per loop 14:37:44 [~/cpython]$ ./python -m timeit -s "import marshal" "marshal.loads(b'i'+b'\xff\xff\xff\xff')" 1000000 loops, best of 3: 0.236 usec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 6 23:50:17 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 06 Nov 2012 22:50:17 +0000 Subject: [issue2275] urllib/httplib header capitalization In-Reply-To: <1205270540.47.0.336665756101.issue2275@psf.upfronthosting.co.za> Message-ID: <1352242217.03.0.0688265992144.issue2275@psf.upfronthosting.co.za> R. David Murray added the comment: It looks like there is a patch, so a patch review would be the next step (as indicated by the stage, not that we always remember to update that...) Reading the issue carefully and making sure that all the concerns are addressed is also required. A comitter will ultimately have to do that, but anyone can do such a review and point out any issues, and that will help get this resolved sooner. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:04:32 2012 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 06 Nov 2012 23:04:32 +0000 Subject: [issue16422] Decimal constants should be the same for py & c module versions Message-ID: <1352243072.7.0.172202427654.issue16422@psf.upfronthosting.co.za> New submission from Yury Selivanov: Right now decimal.py defines 'ROUND_DOWN' as 'ROUND_DOWN' (string), whereas C version define it as 1 (integer). While using constant values directly in your code is not a good idea, there is another case where it doesn't work: if you serialize decimal values along with their meta information, such as rounding settings. In this case, when you unserialize data that was serialized with python decimal, those meta-settings won't work for 'c' decimal. ---------- messages: 175024 nosy: skrah, yselivanov priority: normal severity: normal status: open title: Decimal constants should be the same for py & c module versions type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:10:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 06 Nov 2012 23:10:13 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <3Xx6110Rn4zMGP@mail.python.org> Roundup Robot added the comment: New changeset fce9e892c65d by Victor Stinner in branch 'default': Issue #16414: Fix test_os on Windows, don't test os.listdir() with undecodable http://hg.python.org/cpython/rev/fce9e892c65d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:10:29 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Nov 2012 23:10:29 +0000 Subject: [issue16422] Decimal constants should be the same for py & c module versions In-Reply-To: <1352243072.7.0.172202427654.issue16422@psf.upfronthosting.co.za> Message-ID: <1352243429.52.0.172683676399.issue16422@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:12:22 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 06 Nov 2012 23:12:22 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <1352243542.3.0.243830320621.issue16414@psf.upfronthosting.co.za> STINNER Victor added the comment: > Why were you add '- ' suffix to TESTFN_NONASCII? Oops, the space was a mistake. I add "-" just for the readability of the generated filename. > I don't see U+00A0 and U+20AC in the changeset. Oh, I forgot to update the patch with the latest results of "brute2.py". It is now fixed. Thanks for the review! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:18:57 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Nov 2012 23:18:57 +0000 Subject: [issue16422] Decimal constants should be the same for py & c module versions In-Reply-To: <1352243072.7.0.172202427654.issue16422@psf.upfronthosting.co.za> Message-ID: <1352243937.01.0.466706158584.issue16422@psf.upfronthosting.co.za> Mark Dickinson added the comment: I think it's already true that pickling a Decimal context on Python 3.2 and unpickling on Python 3.3 doesn't work. Stefan: do I recall that this is a known issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:29:10 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Tue, 06 Nov 2012 23:29:10 +0000 Subject: [issue15955] gzip, bz2, lzma: add option to limit output size In-Reply-To: <1347884562.79.0.801674791772.issue15955@psf.upfronthosting.co.za> Message-ID: <1352244550.39.0.00956561892193.issue15955@psf.upfronthosting.co.za> Nadeem Vawda added the comment: I suspect that it will be slower than the decompress_into() approach, but as you say, we need to do benchmarks to see for sure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:30:59 2012 From: report at bugs.python.org (Stefan Krah) Date: Tue, 06 Nov 2012 23:30:59 +0000 Subject: [issue16422] Decimal constants should be the same for py & c module versions In-Reply-To: <1352243937.01.0.466706158584.issue16422@psf.upfronthosting.co.za> Message-ID: <20121106233100.GA13136@sleipnir.bytereef.org> Stefan Krah added the comment: Pickling changed in 3.3 to make the C and Python versions compatible. So pickled contexts in 3.3 are actually interchangeable. Pickling a list of rounding modes is not compatible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:32:57 2012 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 06 Nov 2012 23:32:57 +0000 Subject: [issue16422] Decimal constants should be the same for py & c module versions In-Reply-To: <1352243072.7.0.172202427654.issue16422@psf.upfronthosting.co.za> Message-ID: <1352244777.53.0.940810762366.issue16422@psf.upfronthosting.co.za> Yury Selivanov added the comment: Well, I don't care about py 3.2 & 3.3 pickle compatibility in this particular issue. This one is about compatibility of py & c decimal modules in 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:34:12 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Tue, 06 Nov 2012 23:34:12 +0000 Subject: [issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data In-Reply-To: <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za> Message-ID: <1352244852.4.0.0777037962578.issue16350@psf.upfronthosting.co.za> Nadeem Vawda added the comment: > These were not idle questions. I wrote the patch, and I had to know > what behavior is correct. Ah, sorry. I assumed you were going to submit a separate patch to fix the unconsumed_tail issues. > Here's the patch. It fixes potential memory bug (unconsumed_tail sets > to NULL in case of out of memory), resets the unconsumed_tail to b'' > after EOF, updates unconsumed_tail and unused_data in flush(). Did you perhaps forget to attach the patch? The only ones I see are those that you uploaded last week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:35:28 2012 From: report at bugs.python.org (Stefan Krah) Date: Tue, 06 Nov 2012 23:35:28 +0000 Subject: [issue16422] Decimal constants should be the same for py & c module versions In-Reply-To: <1352244777.53.0.940810762366.issue16422@psf.upfronthosting.co.za> Message-ID: <20121106233529.GA13349@sleipnir.bytereef.org> Stefan Krah added the comment: So what data structure are you trying to serialize interchangeably? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:40:40 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 06 Nov 2012 23:40:40 +0000 Subject: [issue16414] Add support.NONASCII to test non-ASCII characters In-Reply-To: <1352117534.37.0.611340206867.issue16414@psf.upfronthosting.co.za> Message-ID: <1352245240.87.0.71843636946.issue16414@psf.upfronthosting.co.za> STINNER Victor added the comment: Handling non-ASCII paths is always a pain. I don't plan to backport support.FS_NONASCII to Python 3.3 right now, but I may backport it later. ---------- resolution: -> fixed status: open -> closed versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:41:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 06 Nov 2012 23:41:02 +0000 Subject: [issue16311] Use _PyUnicodeWriter API in text decoders In-Reply-To: <1351103901.39.0.0945105753188.issue16311@psf.upfronthosting.co.za> Message-ID: <3Xx6hY4NfQzMP7@mail.python.org> Roundup Robot added the comment: New changeset 7ed9993d53b4 by Victor Stinner in branch 'default': Close #16311: Use the _PyUnicodeWriter API in text decoders http://hg.python.org/cpython/rev/7ed9993d53b4 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:41:14 2012 From: report at bugs.python.org (Stefan Krah) Date: Tue, 06 Nov 2012 23:41:14 +0000 Subject: [issue16422] Decimal constants should be the same for py & c module versions In-Reply-To: <20121106233529.GA13349@sleipnir.bytereef.org> Message-ID: <20121106234115.GB13349@sleipnir.bytereef.org> Stefan Krah added the comment: I see that you mentioned the use case in your first mail. Yes, that isn't possible right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:43:06 2012 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 06 Nov 2012 23:43:06 +0000 Subject: [issue16422] Decimal constants should be the same for py & c module versions In-Reply-To: <1352243072.7.0.172202427654.issue16422@psf.upfronthosting.co.za> Message-ID: <1352245386.12.0.118579647765.issue16422@psf.upfronthosting.co.za> Yury Selivanov added the comment: Right ;) Is there any chance we can fix that in next 3.3 point release or 3.4? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 00:59:32 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 06 Nov 2012 23:59:32 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1352246372.42.0.980468326585.issue16389@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Maybe lru_cache() should have a key argument so you can specify a specialized key function. So you might have def _compile_key(args, kwds, typed): return args @functools.lru_cache(maxsize=500, key=_compile_key) def _compile(pattern, flags): ... ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 01:52:08 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 07 Nov 2012 00:52:08 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352249528.03.0.231664250522.issue14621@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks to Snakebit I was able to tests the code on a 32bit BSD installation with GCC 4.2. The ASCII unicode and bytes performance is about 8% slower, UCS2 unicode is about 37% slower. There might be room for improvements, though. % ./python -m timeit -r20 -n1000000 -s "h = hash; x = 'a' * 10**7" -- "h(x)" Current: 1000000 loops, best of 20: 0.109 usec per loop SipHash: 1000000 loops, best of 20: 0.118 usec per loop % ./python -m timeit -r20 -n1000000 -s "h = hash; x = '?' * 10**7" -- "h(x)" Current: 1000000 loops, best of 20: 0.119 usec per loop SipHash: 1000000 loops, best of 20: 0.163 usec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 02:20:23 2012 From: report at bugs.python.org (Eran Rundstein) Date: Wed, 07 Nov 2012 01:20:23 +0000 Subject: [issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever In-Reply-To: <1350905552.38.0.183421910215.issue16298@psf.upfronthosting.co.za> Message-ID: <1352251223.34.0.301602389447.issue16298@psf.upfronthosting.co.za> Eran Rundstein added the comment: Hello I have attached a patch that includes a (slightly broken) fix and a test case. Note that there is currently an unresolved issue: If the user reads the exact amount of bytes the server sent, read() on the socket will never have a chance to return '' and inform the user about the connection termination. This will also happen if the user reads more data than the server is sending. In that case, again, read() will not get called again so we will never know the socket is gone. One possible way to address this is perform the actual read() calls in a loop, attempting to read the exact amount the user specified. If we do this and the user attempts to read more bytes than the server sent, we will properly detect it. If, however, the user reads the exact length, then we still have a problem. I am not sure what would be the correct way of solving this. ---------- keywords: +patch Added file: http://bugs.python.org/file27913/httplib-no-content-length-close-sock-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 02:27:11 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 07 Nov 2012 01:27:11 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352251631.69.0.537119244158.issue14621@psf.upfronthosting.co.za> Christian Heimes added the comment: Serhiy's trick #define U8TO64_LE(p) ((u64)((u32 *)(p))[0] | ((u64)((u32 *)(p))[1] << 32)) gives a nice speedup. Now UCS2 is down to 0.133 usec (12% slower than the current algorithm) and ASCII down to 0.105 usec (3% faster). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 04:28:02 2012 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Wed, 07 Nov 2012 03:28:02 +0000 Subject: [issue16423] urllib data URL recipe Message-ID: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> New submission from Mathias Panzenb?ck: I think it would be really helpful if urllib would support data URLs. However, I was told on the python-ideas mailing list that it would probably only added as recipe in the documentation. The attached patch adds such an recipe to the urllib.request documentation. I've never written a doc patch (or any patch) for python before, so I don't know if I added it at the right place in the right format. ---------- assignee: docs at python components: Documentation files: doc-urllib.request-data-url-recipe.patch hgrepos: 160 keywords: patch messages: 175041 nosy: docs at python, panzi priority: normal severity: normal status: open title: urllib data URL recipe versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file27914/doc-urllib.request-data-url-recipe.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 05:07:26 2012 From: report at bugs.python.org (Peter Eisentraut) Date: Wed, 07 Nov 2012 04:07:26 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1352261246.32.0.281053080434.issue444582@psf.upfronthosting.co.za> Changes by Peter Eisentraut : ---------- nosy: +petere _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 05:50:19 2012 From: report at bugs.python.org (Peter Eisentraut) Date: Wed, 07 Nov 2012 04:50:19 +0000 Subject: [issue11122] bdist_rpm should use rpmbuild, not rpm In-Reply-To: <1296854362.61.0.538085175842.issue11122@psf.upfronthosting.co.za> Message-ID: <1352263819.11.0.028083262016.issue11122@psf.upfronthosting.co.za> Peter Eisentraut added the comment: I ran into a similar instance of this problem today and would like to add my support for just getting rid of the "rpm" calls and just call "rpmbuild" in all cases. The last release where "rpm" was used for building was more than 10 years ago. ---------- nosy: +petere _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 06:08:37 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 07 Nov 2012 05:08:37 +0000 Subject: [issue16423] urllib data URL recipe In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <1352264917.73.0.721227754094.issue16423@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: docs at python -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 06:17:26 2012 From: report at bugs.python.org (Todd Rovito) Date: Wed, 07 Nov 2012 05:17:26 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1352265446.54.0.22977772835.issue16278@psf.upfronthosting.co.za> Todd Rovito added the comment: Chris, That is an excellent suggestion. I modified my OSRenameCombinations.py program and attached. This program prints a table with the src parameters as columns and the dst as rows. Hopefully it will show up ok in the bug tracker. For Unix src_file src_directory_empty src_directory_not_empty src_file_or_directory_not_exist dst_file_exist rename overwrite raises OSError raises OSError raises OSError dst_not_exist rename rename rename raises OSError dst_directory_empty raises OSError rename overwrite rename overwrite raises OSError dst_directory_not_empty raises OSError raises OSError raises OSError raises OSError For Windows src_file src_directory_empty src_directory_not_empty src_file_or_directory_not_exist dst_file_exist raises OSError raises OSError raises OSError raises OSError dst_not_exist rename rename rename raises OSError dst_directory_empty raises OSError raises FileExistsError raises FileExistsError raises OSError dst_directory_not_empty raises OSError raises OSError raises OSError raises OSError ---------- Added file: http://bugs.python.org/file27915/OSRenameCombinations.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 07:15:33 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 07 Nov 2012 06:15:33 +0000 Subject: [issue16424] regression: os.path.split('//hostname/foo/bar.txt') Message-ID: <1352268933.45.0.882120414377.issue16424@psf.upfronthosting.co.za> New submission from anatoly techtonik: Windows. Python 3: >>> import os.path as osp >>> osp.split('//hostname/foo/') ('//hostname/foo/', '') Python 2: >>> osp.split('//hostname/foo/') ('//hostname/foo', '') But Python 3 again: >>> osp.split('//hostname/foo/bar/') ('//hostname/foo/bar', '') ---------- components: Library (Lib) messages: 175044 nosy: techtonik priority: normal severity: normal status: open title: regression: os.path.split('//hostname/foo/bar.txt') versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 07:23:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 06:23:30 +0000 Subject: [issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data In-Reply-To: <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za> Message-ID: <1352269410.1.0.231707681943.issue16350@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry. Here is a patch. ---------- Added file: http://bugs.python.org/file27916/zlib_unused_data_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 07:30:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 06:30:25 +0000 Subject: [issue16424] regression: os.path.split('//hostname/foo/bar.txt') In-Reply-To: <1352268933.45.0.882120414377.issue16424@psf.upfronthosting.co.za> Message-ID: <1352269825.23.0.412065451833.issue16424@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: '//hostname/foo/' is an UNC path. Now splitunc() deprecated and splitdrive() works with an UNC paths. >>> ntpath.splitdrive('//hostname/foo/') ('//hostname/foo', '/') ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 07:49:21 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 06:49:21 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352270961.38.0.843695955202.issue14621@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: % ./python -m timeit -r20 -n1000000 -s "h = hash; x = 'a' * 10**7" -- "h(x)" Here is only one hash calculation and 999999 cached calls. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 08:40:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 07:40:30 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352274030.09.0.552811539255.issue14621@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I tested different kind of strings. $ ./python -m timeit -n 1 -s "t = b'a' * 10**8" "hash(t)" $ ./python -m timeit -n 1 -s "t = 'a' * 10**8" "hash(t)" $ ./python -m timeit -n 1 -s "t = '\u0100' * 10**8" "hash(t)" $ ./python -m timeit -n 1 -s "t = '\U00010000' * 10**8" "hash(t)" current SipHash bytes 181 msec 453 msec 2.5x UCS1 429 msec 453 msec 1.06x UCS2 179 msec 897 msec 5x UCS4 183 msec 1.79 sec 9.8x ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 09:14:32 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 07 Nov 2012 08:14:32 +0000 Subject: [issue15001] segmentation fault with del sys.module['__main__'] In-Reply-To: <1338839365.76.0.631007627601.issue15001@psf.upfronthosting.co.za> Message-ID: <3XxL504btpzP0t@mail.python.org> Roundup Robot added the comment: New changeset b256d054f229 by Hynek Schlawack in branch '3.2': Issue #15001: fix segfault on "del sys.module['__main__']" http://hg.python.org/cpython/rev/b256d054f229 New changeset 215297665098 by Hynek Schlawack in branch '3.3': Issue #15001: fix segfault on "del sys.module['__main__']" http://hg.python.org/cpython/rev/215297665098 New changeset 859ef54bdce2 by Hynek Schlawack in branch 'default': Issue #15001: fix segfault on "del sys.module['__main__']" http://hg.python.org/cpython/rev/859ef54bdce2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 09:32:00 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 07 Nov 2012 08:32:00 +0000 Subject: [issue15001] segmentation fault with del sys.modules['__main__'] In-Reply-To: <1338839365.76.0.631007627601.issue15001@psf.upfronthosting.co.za> Message-ID: <1352277120.01.0.200782261112.issue15001@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- title: segmentation fault with del sys.module['__main__'] -> segmentation fault with del sys.modules['__main__'] _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 09:34:26 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 08:34:26 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352277266.41.0.660849293567.issue14621@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Here's a demo patch (against Python 2.7) which counts hash value collisions and slot collisions. I had posted that in the original ticket where we discussed the hash problem (http://bugs.python.org/issue14621). This avoids issues like attack 1 mentioned in http://mail.python.org/pipermail/python-dev/2012-January/115726.html Attack 2 in that email can easily be worked around by reducing the collision limit to a smaller number. Even better: An application could even dynamically adjust the maximum collision counts by catching the exception and setting a new upper limit depending on its knowledge of the field of application - warning the sysadmin of a potential problem and allowing her to take action. That way the application could start with a low safe maximum collision number of say 100 and then raise the limit in a controlled way. BTW: When trying out new hash functions, you need to look not only at the performance of the hash function, but also (and more importantly) at the effect on dictionaries. Just as reminder: The integer key problem is still open. Using the demo script http://bugs.python.org/file24300/integercollision.py, it's easy to keep Python going for minutes without any major effort. I don't understand why we are only trying to fix the string problem and completely ignore other key types. Strings are easy to send to a web server, yes, but there are other applications out there which take input data from other sources/formats as well (e.g. csv files). And it's not unusual to convert input strings to integers to use them as dictionary keys, say item IDs or counts. So while the string keys may not cause a problem, the integer keys still might. ---------- keywords: +patch Added file: http://bugs.python.org/file27917/hash-attack-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 09:35:12 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 07 Nov 2012 08:35:12 +0000 Subject: [issue16413] Non cross-platform behavior of os.path.split In-Reply-To: <1352114668.34.0.500502059895.issue16413@psf.upfronthosting.co.za> Message-ID: <1352277312.83.0.331311231853.issue16413@psf.upfronthosting.co.za> anatoly techtonik added the comment: I don't know about the differences. An expert is required. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 09:41:38 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 08:41:38 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1352277266.41.0.660849293567.issue14621@psf.upfronthosting.co.za> Message-ID: <509A1EBD.8070502@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 09:34, Marc-Andre Lemburg wrote: > > Here's a demo patch (against Python 2.7) which counts hash value collisions and slot collisions. I had posted that in the original ticket where we discussed the hash problem (http://bugs.python.org/issue14621). Sorry, wrong URL. The correct one is http://bugs.python.org/issue13703 -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 07 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 09:44:41 2012 From: report at bugs.python.org (Giovanni Bajo) Date: Wed, 07 Nov 2012 08:44:41 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352277881.07.0.639370104349.issue14621@psf.upfronthosting.co.za> Giovanni Bajo added the comment: Until it's broken with a yet-unknown attack, SipHash is a pseudo-random function and as such it does uniformly distribute values across the output space, and never leak any information on the key (the randomized seed). Being designed by cryptographers, it is likely that it doesn't turn out to be a "fail" like the solution that was just released (no offense intended, but it's been a large-scale PR failure). As long as we don't introduce bias while reducing SipHash's output to fit the hash table size (so for instance, usage of modulus is not appropriate), then the hash function should behave very well. Any data type can be supplied to SipHash, including numbers; you just need to take their (platform-dependent) memory representation and feed it to SipHash. Obviously it will be much much slower than the current function which used to be hash(x) = x (before randomization), but that's the price to pay to avoid security issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 09:46:59 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 08:46:59 +0000 Subject: [issue16420] PEP 249 (DB-API 2.0) converted to reStructuredText In-Reply-To: <1352211401.03.0.321684940203.issue16420@psf.upfronthosting.co.za> Message-ID: <1352278019.33.0.285191054202.issue16420@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: For some reason, the roundup bot didn't pick up the check in, so here's the reference by hand: http://hg.python.org/peps/rev/95a73d5a3af7 changeset: 4578:95a73d5a3af7 user: Marc-Andre Lemburg date: Wed Nov 07 09:42:07 2012 +0100 summary: Issue #16420: Convert PEP 249 (DB-API 2.0) to ReST format to allow linking to the various parts. The conversion was done mostly by Daniele Varrazzo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 09:47:13 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 08:47:13 +0000 Subject: [issue16420] PEP 249 (DB-API 2.0) converted to reStructuredText In-Reply-To: <1352211401.03.0.321684940203.issue16420@psf.upfronthosting.co.za> Message-ID: <1352278033.4.0.608030378736.issue16420@psf.upfronthosting.co.za> Changes by Marc-Andre Lemburg : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 09:48:28 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 07 Nov 2012 08:48:28 +0000 Subject: [issue15001] segmentation fault with del sys.modules['__main__'] In-Reply-To: <1338839365.76.0.631007627601.issue15001@psf.upfronthosting.co.za> Message-ID: <3XxLrC4HD9zPTs@mail.python.org> Roundup Robot added the comment: New changeset 4ebe1ede981e by Hynek Schlawack in branch '2.7': Issue #15001: fix segfault on "del sys.modules['__main__']" http://hg.python.org/cpython/rev/4ebe1ede981e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 09:52:46 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Wed, 07 Nov 2012 08:52:46 +0000 Subject: [issue15001] segmentation fault with del sys.modules['__main__'] In-Reply-To: <1338839365.76.0.631007627601.issue15001@psf.upfronthosting.co.za> Message-ID: <1352278366.47.0.523854991637.issue15001@psf.upfronthosting.co.za> Hynek Schlawack added the comment: This should be fixed now, thanks to all who helped! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 10:05:50 2012 From: report at bugs.python.org (Martin Kugler) Date: Wed, 07 Nov 2012 09:05:50 +0000 Subject: [issue16425] minidom replaceChild(new_child, old_child) removes new_child even if in another document Message-ID: <1352279150.2.0.240477416324.issue16425@psf.upfronthosting.co.za> New submission from Martin Kugler: Calling doc.replaceChild(new_child, old_child) with new_child and old_child being similar nodes in two different documents results in new_child to be removed from its document instead of old_child being removed from doc. Example: new_child = get_element_x(doc_a) old_child = get_element_x(doc_b) parent = get_element_y(doc_b) parent.replaceChild(new_child, old_child) => new_child will be removed from doc_a. Instead old_child should be removed from doc_b. ---------- components: XML messages: 175057 nosy: Martin.Kugler priority: normal severity: normal status: open title: minidom replaceChild(new_child, old_child) removes new_child even if in another document type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 10:36:11 2012 From: report at bugs.python.org (Stefan Krah) Date: Wed, 07 Nov 2012 09:36:11 +0000 Subject: [issue16422] Decimal constants should be the same for py & c module versions In-Reply-To: <1352243072.7.0.172202427654.issue16422@psf.upfronthosting.co.za> Message-ID: <1352280971.72.0.0694367226643.issue16422@psf.upfronthosting.co.za> Stefan Krah added the comment: It would be possible to translate strings to integers; the infrastructure is already there for pickling. The decision not to do that was actually deliberate: Up to now no one has requested string constants for rounding modes and I *suspect* that there's a performance penalty even though I didn't measure it. See Modules/_decimal/_decimal.c:1211 for the code that would need to be called each time something like this occurs: context.rounding = ROUND_UP ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 10:45:18 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Wed, 07 Nov 2012 09:45:18 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352281518.14.0.307458879907.issue16421@psf.upfronthosting.co.za> V?clav ?milauer added the comment: Attaching patch based on Andrew's review, agains latest hg (80291:859ef54bdce). For the MSVC files, I copied what was there for _testcapimodule in PC/VS9.0 and PCbuild, and created two new UUIDs: one for _testimportmultiple itself (36D0C52C-DF4E-45D0-8BC7-E294C3ABC781; used in .sln, .vcproj and .vcxproj files), and one for _testimportmultiple.vcxproj.filters (1ec38ad9-1abf-4b80-8628-ac43ccba324b; used only once). Please check that I did that correctly. (I am wondering how can one maintain such a build system.) I also added myself to Misc/ACKS (and sent contributor agreement by mail), added the entry to Misc/NEWS. ---------- components: +Extension Modules -Interpreter Core type: enhancement -> behavior versions: +Python 3.5 -Python 3.4 Added file: http://bugs.python.org/file27918/many-modules-in-one-so_3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 10:53:56 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 07 Nov 2012 09:53:56 +0000 Subject: [issue16424] regression: os.path.split('//hostname/foo/bar.txt') In-Reply-To: <1352268933.45.0.882120414377.issue16424@psf.upfronthosting.co.za> Message-ID: <1352282036.34.0.824637415901.issue16424@psf.upfronthosting.co.za> anatoly techtonik added the comment: Does that mean that Py3's split() uses splitunc() instead of splitdrive()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 10:59:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 09:59:52 +0000 Subject: [issue16424] regression: os.path.split('//hostname/foo/bar.txt') In-Reply-To: <1352268933.45.0.882120414377.issue16424@psf.upfronthosting.co.za> Message-ID: <1352282392.53.0.49614861489.issue16424@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No. splitunc() is deprecated. http://docs.python.org/3/library/os.path.html#os.path.splitdrive http://docs.python.org/3/library/os.path.html#os.path.splitunc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:32:39 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 07 Nov 2012 10:32:39 +0000 Subject: [issue16424] regression: os.path.split('//hostname/foo/bar.txt') In-Reply-To: <1352268933.45.0.882120414377.issue16424@psf.upfronthosting.co.za> Message-ID: <1352284359.0.0.857023307223.issue16424@psf.upfronthosting.co.za> anatoly techtonik added the comment: Ok, so how to fix the regression? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:33:38 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:33:38 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) Message-ID: <1352284418.2.0.897499151783.issue16426@psf.upfronthosting.co.za> New submission from Marc-Andre Lemburg: As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating this ticket to test the roundup email interface. ---------- assignee: lemburg components: None messages: 175063 nosy: lemburg priority: normal severity: normal status: open title: RoundUp signature removal test (please ignore) type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:34:16 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:34:16 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <1352284418.2.0.897499151783.issue16426@psf.upfronthosting.co.za> Message-ID: <509A3923.2070909@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 11:33, Marc-Andre Lemburg wrote: > > New submission from Marc-Andre Lemburg: > > As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating this ticket to test the roundup email interface. Email reply 1. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 07 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:34:41 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:34:41 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <509A3923.2070909@egenix.com> Message-ID: <509A393D.3030306@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 11:34, M.-A. Lemburg wrote: > On 07.11.2012 11:33, Marc-Andre Lemburg wrote: >> >> New submission from Marc-Andre Lemburg: >> >> As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating this ticket to test the roundup email interface. > > Email reply 1. Email reply 2. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 07 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:35:23 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:35:23 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <509A393D.3030306@egenix.com> Message-ID: <509A3966.5010204@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 11:34, Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > On 07.11.2012 11:34, M.-A. Lemburg wrote: >> On 07.11.2012 11:33, Marc-Andre Lemburg wrote: >>> >>> New submission from Marc-Andre Lemburg: >>> >>> As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating this ticket to test the roundup email interface. >> >> Email reply 1. > > Email reply 2. Email reply 3. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 07 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:35:52 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:35:52 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <509A3966.5010204@egenix.com> Message-ID: <509A3984.2080400@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 11:35, M.-A. Lemburg wrote: > On 07.11.2012 11:34, Marc-Andre Lemburg wrote: >> >> Marc-Andre Lemburg added the comment: >> >> On 07.11.2012 11:34, M.-A. Lemburg wrote: >>> On 07.11.2012 11:33, Marc-Andre Lemburg wrote: >>>> >>>> New submission from Marc-Andre Lemburg: >>>> >>>> As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating this ticket to test the roundup email interface. >>> >>> Email reply 1. >> >> Email reply 2. > > Email reply 3. Email reply 4. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 07 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:36:30 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:36:30 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <509A3984.2080400@egenix.com> Message-ID: <509A39A9.6030002@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 11:35, Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > On 07.11.2012 11:35, M.-A. Lemburg wrote: >> On 07.11.2012 11:34, Marc-Andre Lemburg wrote: >>> >>> Marc-Andre Lemburg added the comment: >>> >>> On 07.11.2012 11:34, M.-A. Lemburg wrote: >>>> On 07.11.2012 11:33, Marc-Andre Lemburg wrote: >>>>> >>>>> New submission from Marc-Andre Lemburg: >>>>> >>>>> As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating this ticket to test the roundup email interface. >>>> >>>> Email reply 1. >>> >>> Email reply 2. >> >> Email reply 3. > > Email reply 4. Email reply 5 with short sig. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:37:50 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:37:50 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <509A39A9.6030002@egenix.com> Message-ID: <509A39F9.3000807@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 11:36, Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > On 07.11.2012 11:35, Marc-Andre Lemburg wrote: >> >> Marc-Andre Lemburg added the comment: >> >> On 07.11.2012 11:35, M.-A. Lemburg wrote: >>> On 07.11.2012 11:34, Marc-Andre Lemburg wrote: >>>> >>>> Marc-Andre Lemburg added the comment: >>>> >>>> On 07.11.2012 11:34, M.-A. Lemburg wrote: >>>>> On 07.11.2012 11:33, Marc-Andre Lemburg wrote: >>>>>> >>>>>> New submission from Marc-Andre Lemburg: >>>>>> >>>>>> As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating this ticket to test the roundup email interface. >>>>> >>>>> Email reply 1. >>>> >>>> Email reply 2. >>> >>> Email reply 3. >> >> Email reply 4. > > Email reply 5 with short sig. Email reply 6 with 3 line sig. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:38:40 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:38:40 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <509A39F9.3000807@egenix.com> Message-ID: <509A3A2B.80108@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 11:37, M.-A. Lemburg wrote: > On 07.11.2012 11:36, Marc-Andre Lemburg wrote: >> >> Marc-Andre Lemburg added the comment: >> >> On 07.11.2012 11:35, Marc-Andre Lemburg wrote: >>> >>> Marc-Andre Lemburg added the comment: >>> >>> On 07.11.2012 11:35, M.-A. Lemburg wrote: >>>> On 07.11.2012 11:34, Marc-Andre Lemburg wrote: >>>>> >>>>> Marc-Andre Lemburg added the comment: >>>>> >>>>> On 07.11.2012 11:34, M.-A. Lemburg wrote: >>>>>> On 07.11.2012 11:33, Marc-Andre Lemburg wrote: >>>>>>> >>>>>>> New submission from Marc-Andre Lemburg: >>>>>>> >>>>>>> As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating this ticket to test the roundup email interface. >>>>>> >>>>>> Email reply 1. >>>>> >>>>> Email reply 2. >>>> >>>> Email reply 3. >>> >>> Email reply 4. >> >> Email reply 5 with short sig. > > Email reply 6 with 3 line sig. Email reply 7 with 5 line sig. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:39:50 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:39:50 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <509A3A2B.80108@egenix.com> Message-ID: <509A3A71.1080901@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 11:38, M.-A. Lemburg wrote: > On 07.11.2012 11:37, M.-A. Lemburg wrote: >> On 07.11.2012 11:36, Marc-Andre Lemburg wrote: >>> >>> Marc-Andre Lemburg added the comment: >>> >>> On 07.11.2012 11:35, Marc-Andre Lemburg wrote: >>>> >>>> Marc-Andre Lemburg added the comment: >>>> >>>> On 07.11.2012 11:35, M.-A. Lemburg wrote: >>>>> On 07.11.2012 11:34, Marc-Andre Lemburg wrote: >>>>>> >>>>>> Marc-Andre Lemburg added the comment: >>>>>> >>>>>> On 07.11.2012 11:34, M.-A. Lemburg wrote: >>>>>>> On 07.11.2012 11:33, Marc-Andre Lemburg wrote: >>>>>>>> >>>>>>>> New submission from Marc-Andre Lemburg: >>>>>>>> >>>>>>>> As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating this ticket to test the roundup email interface. >>>>>>> >>>>>>> Email reply 1. >>>>>> >>>>>> Email reply 2. >>>>> >>>>> Email reply 3. >>>> >>>> Email reply 4. >>> >>> Email reply 5 with short sig (1 line). >> >> Email reply 6 with 3 line sig. > > Email reply 7 with 5 line sig. Email reply 8 with 7 line sig. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:41:25 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:41:25 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <509A3A71.1080901@egenix.com> Message-ID: <509A3AD0.7030309@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 11:39, Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > On 07.11.2012 11:38, M.-A. Lemburg wrote: >> On 07.11.2012 11:37, M.-A. Lemburg wrote: >>> On 07.11.2012 11:36, Marc-Andre Lemburg wrote: >>>> >>>> Marc-Andre Lemburg added the comment: >>>> >>>> On 07.11.2012 11:35, Marc-Andre Lemburg wrote: >>>>> >>>>> Marc-Andre Lemburg added the comment: >>>>> >>>>> On 07.11.2012 11:35, M.-A. Lemburg wrote: >>>>>> On 07.11.2012 11:34, Marc-Andre Lemburg wrote: >>>>>>> >>>>>>> Marc-Andre Lemburg added the comment: >>>>>>> >>>>>>> On 07.11.2012 11:34, M.-A. Lemburg wrote: >>>>>>>> On 07.11.2012 11:33, Marc-Andre Lemburg wrote: >>>>>>>>> >>>>>>>>> New submission from Marc-Andre Lemburg: >>>>>>>>> >>>>>>>>> As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating this ticket to test the roundup email interface. >>>>>>>> >>>>>>>> Email reply 1. >>>>>>> >>>>>>> Email reply 2. >>>>>> >>>>>> Email reply 3. >>>>> >>>>> Email reply 4. >>>> >>>> Email reply 5 with short sig (1 line). >>> >>> Email reply 6 with 3 line sig. >> >> Email reply 7 with 5 line sig. > > Email reply 8 with 7 line sig. Email reply 8 with 9 line sig. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:42:31 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:42:31 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <509A3AD0.7030309@egenix.com> Message-ID: <509A3B12.4090603@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 11:41, Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > On 07.11.2012 11:39, Marc-Andre Lemburg wrote: >> >> Marc-Andre Lemburg added the comment: >> >> On 07.11.2012 11:38, M.-A. Lemburg wrote: >>> On 07.11.2012 11:37, M.-A. Lemburg wrote: >>>> On 07.11.2012 11:36, Marc-Andre Lemburg wrote: >>>>> >>>>> Marc-Andre Lemburg added the comment: >>>>> >>>>> On 07.11.2012 11:35, Marc-Andre Lemburg wrote: >>>>>> >>>>>> Marc-Andre Lemburg added the comment: >>>>>> >>>>>> On 07.11.2012 11:35, M.-A. Lemburg wrote: >>>>>>> On 07.11.2012 11:34, Marc-Andre Lemburg wrote: >>>>>>>> >>>>>>>> Marc-Andre Lemburg added the comment: >>>>>>>> >>>>>>>> On 07.11.2012 11:34, M.-A. Lemburg wrote: >>>>>>>>> On 07.11.2012 11:33, Marc-Andre Lemburg wrote: >>>>>>>>>> >>>>>>>>>> New submission from Marc-Andre Lemburg: >>>>>>>>>> >>>>>>>>>> As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating this ticket to test the roundup email interface. >>>>>>>>> >>>>>>>>> Email reply 1. >>>>>>>> >>>>>>>> Email reply 2. >>>>>>> >>>>>>> Email reply 3. >>>>>> >>>>>> Email reply 4. >>>>> >>>>> Email reply 5 with short sig (1 line). >>>> >>>> Email reply 6 with 3 line sig. >>> >>> Email reply 7 with 5 line sig. >> >> Email reply 8 with 7 line sig. > > Email reply 9 with 9 line sig. Email reply 10 with 11 line sig. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 07 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:43:41 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:43:41 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <509A3B12.4090603@egenix.com> Message-ID: <509A3B58.90206@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 11:42, Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > On 07.11.2012 11:41, Marc-Andre Lemburg wrote: >> >> Marc-Andre Lemburg added the comment: >> >> On 07.11.2012 11:39, Marc-Andre Lemburg wrote: >>> >>> Marc-Andre Lemburg added the comment: >>> >>> On 07.11.2012 11:38, M.-A. Lemburg wrote: >>>> On 07.11.2012 11:37, M.-A. Lemburg wrote: >>>>> On 07.11.2012 11:36, Marc-Andre Lemburg wrote: >>>>>> >>>>>> Marc-Andre Lemburg added the comment: >>>>>> >>>>>> On 07.11.2012 11:35, Marc-Andre Lemburg wrote: >>>>>>> >>>>>>> Marc-Andre Lemburg added the comment: >>>>>>> >>>>>>> On 07.11.2012 11:35, M.-A. Lemburg wrote: >>>>>>>> On 07.11.2012 11:34, Marc-Andre Lemburg wrote: >>>>>>>>> >>>>>>>>> Marc-Andre Lemburg added the comment: >>>>>>>>> >>>>>>>>> On 07.11.2012 11:34, M.-A. Lemburg wrote: >>>>>>>>>> On 07.11.2012 11:33, Marc-Andre Lemburg wrote: >>>>>>>>>>> >>>>>>>>>>> New submission from Marc-Andre Lemburg: >>>>>>>>>>> >>>>>>>>>>> As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating this ticket to test the roundup email interface. >>>>>>>>>> >>>>>>>>>> Email reply 1. >>>>>>>>> >>>>>>>>> Email reply 2. >>>>>>>> >>>>>>>> Email reply 3. >>>>>>> >>>>>>> Email reply 4. >>>>>> >>>>>> Email reply 5 with short sig (1 line). >>>>> >>>>> Email reply 6 with 3 line sig. >>>> >>>> Email reply 7 with 5 line sig. >>> >>> Email reply 8 with 7 line sig. >> >> Email reply 9 with 9 line sig. > > Email reply 10 with 11 line sig. Email reply 11 with 10 line sig. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 07 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:45:19 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:45:19 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <509A3B58.90206@egenix.com> Message-ID: <509A3BBA.8010009@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 11:43, Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > On 07.11.2012 11:42, Marc-Andre Lemburg wrote: >> >> Marc-Andre Lemburg added the comment: >> >> On 07.11.2012 11:41, Marc-Andre Lemburg wrote: >>> >>> Marc-Andre Lemburg added the comment: >>> >>> On 07.11.2012 11:39, Marc-Andre Lemburg wrote: >>>> >>>> Marc-Andre Lemburg added the comment: >>>> >>>> On 07.11.2012 11:38, M.-A. Lemburg wrote: >>>>> On 07.11.2012 11:37, M.-A. Lemburg wrote: >>>>>> On 07.11.2012 11:36, Marc-Andre Lemburg wrote: >>>>>>> >>>>>>> Marc-Andre Lemburg added the comment: >>>>>>> >>>>>>> On 07.11.2012 11:35, Marc-Andre Lemburg wrote: >>>>>>>> >>>>>>>> Marc-Andre Lemburg added the comment: >>>>>>>> >>>>>>>> On 07.11.2012 11:35, M.-A. Lemburg wrote: >>>>>>>>> On 07.11.2012 11:34, Marc-Andre Lemburg wrote: >>>>>>>>>> >>>>>>>>>> Marc-Andre Lemburg added the comment: >>>>>>>>>> >>>>>>>>>> On 07.11.2012 11:34, M.-A. Lemburg wrote: >>>>>>>>>>> On 07.11.2012 11:33, Marc-Andre Lemburg wrote: >>>>>>>>>>>> >>>>>>>>>>>> New submission from Marc-Andre Lemburg: >>>>>>>>>>>> >>>>>>>>>>>> As discussed on http://psf.upfronthosting.co.za/roundup/meta/issue491, I'm creating this ticket to test the roundup email interface. >>>>>>>>>>> >>>>>>>>>>> Email reply 1. >>>>>>>>>> >>>>>>>>>> Email reply 2. >>>>>>>>> >>>>>>>>> Email reply 3. >>>>>>>> >>>>>>>> Email reply 4. >>>>>>> >>>>>>> Email reply 5 with short sig (1 line). >>>>>> >>>>>> Email reply 6 with 3 line sig. >>>>> >>>>> Email reply 7 with 5 line sig. >>>> >>>> Email reply 8 with 7 line sig. >>> >>> Email reply 9 with 9 line sig. >> >> Email reply 10 with 11 line sig. > > Email reply 11 with 10 line sig. Email reply 12 with 9 line (excluding empty lines) sig. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 07 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:46:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 10:46:09 +0000 Subject: [issue16424] regression: os.path.split('//hostname/foo/bar.txt') In-Reply-To: <1352268933.45.0.882120414377.issue16424@psf.upfronthosting.co.za> Message-ID: <1352285169.2.0.24678892452.issue16424@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is not a regression. This is a feature, not a bug. ---------- resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:46:58 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:46:58 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <509A3BBA.8010009@egenix.com> Message-ID: <509A3C1D.7000501@egenix.com> Marc-Andre Lemburg added the comment: Conclusion: RoundUp appears to only remove sigs in case they have less than 10 lines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:48:25 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:48:25 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <509A3C1D.7000501@egenix.com> Message-ID: <509A3C74.3030205@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 11:46, M.-A. Lemburg wrote: > Conclusion: > > RoundUp appears to only remove sigs in case they have less than > 10 lines. The final empty 10th line (newline after the 9th line) does not seem to count. -- 1 Marc-Andre Lemburg 2 eGenix.com 3 4 Professional Python Services directly from the Source (#1, Nov 07 2012) 5 >>> Python Projects, Consulting and Support ... http://www.egenix.com/ 6 >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ 7 >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ 8 ________________________________________________________________________ 9 10 ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:48:28 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 07 Nov 2012 10:48:28 +0000 Subject: [issue16409] urlretrieve regression: first call returns block size as 0 In-Reply-To: <1352068025.04.0.157597994471.issue16409@psf.upfronthosting.co.za> Message-ID: <1352285308.56.0.553273859912.issue16409@psf.upfronthosting.co.za> anatoly techtonik added the comment: I see nothing wrong with reimplementation with different underlying lib as long as behavior stays the same and lib2to3 converts code correctly. The API that block size if constant and non-zero is broken with Python 3.3. I thought that API breaks are only allowed for major Python versions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 11:48:46 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 10:48:46 +0000 Subject: [issue16426] RoundUp signature removal test (please ignore) In-Reply-To: <1352284418.2.0.897499151783.issue16426@psf.upfronthosting.co.za> Message-ID: <1352285326.5.0.260931839544.issue16426@psf.upfronthosting.co.za> Changes by Marc-Andre Lemburg : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 12:06:00 2012 From: report at bugs.python.org (Armin Rigo) Date: Wed, 07 Nov 2012 11:06:00 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352286360.06.0.465737958377.issue14621@psf.upfronthosting.co.za> Armin Rigo added the comment: Marc-Andr?: estimating the risks of giving up on a valid query for a truly random hash, at an overestimated one billion queries per second, in a 2/3 full dictionary: * for 1000: 4E159 years between mistakes * for 100: 12.9 years between mistakes * for 150: 8E9 years between mistakes * for 200: 5E18 years between mistakes So while it seems that 100 might be a bit too small, using 150 to 200 is perfectly safe (and that's "perfect" in the sense that a computer will encounter random hardware errors at a higher rate than that). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 12:19:16 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 11:19:16 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1352286360.06.0.465737958377.issue14621@psf.upfronthosting.co.za> Message-ID: <509A43AF.5090906@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 12:06, Armin Rigo wrote: > > Armin Rigo added the comment: > > Marc-Andr?: estimating the risks of giving up on a valid query for a truly random hash, at an overestimated one billion queries per second, in a 2/3 full dictionary: > > * for 1000: 4E159 years between mistakes > > * for 100: 12.9 years between mistakes > > * for 150: 8E9 years between mistakes > > * for 200: 5E18 years between mistakes > > So while it seems that 100 might be a bit too small, using 150 to 200 is perfectly safe (and that's "perfect" in the sense that a computer will encounter random hardware errors at a higher rate than that). I used the 1000 limit only as example. In tests Victor and I ran (see the original ticket from a few months ago), 200 turned out to be a reasonable number for the default maximum hash collision value. I'm not sure about the slot collision limit. We'd have to run more tests on those. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 12:26:19 2012 From: report at bugs.python.org (Giovanni Bajo) Date: Wed, 07 Nov 2012 11:26:19 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1352274030.09.0.552811539255.issue14621@psf.upfronthosting.co.za> Message-ID: Giovanni Bajo added the comment: Il giorno 07/nov/2012, alle ore 08:40, Serhiy Storchaka ha scritto: > Serhiy Storchaka added the comment: > > I tested different kind of strings. > > $ ./python -m timeit -n 1 -s "t = b'a' * 10**8" "hash(t)" > $ ./python -m timeit -n 1 -s "t = 'a' * 10**8" "hash(t)" > $ ./python -m timeit -n 1 -s "t = '\u0100' * 10**8" "hash(t)" > $ ./python -m timeit -n 1 -s "t = '\U00010000' * 10**8" "hash(t)" > > current SipHash > > bytes 181 msec 453 msec 2.5x > UCS1 429 msec 453 msec 1.06x > UCS2 179 msec 897 msec 5x > UCS4 183 msec 1.79 sec 9.8x Hi Serhiy, can you please attach the generated assembly code for the siphash function with your compiler and your optimization flags (that is, the one that produces the above results)? Thanks! -- Giovanni Bajo ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 12:51:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 11:51:34 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352289094.57.0.853323867687.issue14621@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > can you please attach the generated assembly code for the siphash function with your compiler and your optimization flags (that is, the one that produces the above results)? GCC?(Ubuntu 4.4.3-4ubuntu5.1) options: -pthread -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE 32-bit Linux on AMD Athlon(tm) 64 X2 Dual Core Processor 4600+. ---------- Added file: http://bugs.python.org/file27919/_Py_Hash_Sip24.S _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 12:51:57 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 07 Nov 2012 11:51:57 +0000 Subject: [issue16409] urlretrieve regression: first call returns block size as 0 In-Reply-To: <1352068025.04.0.157597994471.issue16409@psf.upfronthosting.co.za> Message-ID: <1352289117.06.0.464411813398.issue16409@psf.upfronthosting.co.za> anatoly techtonik added the comment: I agree that new implementation doesn't prevent me from estimating the progress, but it does make the callback code worse, not better. Either by closure or by global variable, but it makes callback stateful. To fix this issue either blocks_number parameter should be removed, or previous behavior restored. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 12:53:11 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 07 Nov 2012 11:53:11 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352289191.91.0.972472753019.issue14621@psf.upfronthosting.co.za> Christian Heimes added the comment: Serhiy, the performance of hash() for long strings isn't very relevant for the general performance of a Python program. Short strings dominate. I've modified the timeit to create a new string object every time. for I in 5 10 15 20 30 40 50 60; do echo -ne "$I\t"; ./python -m timeit -n100000 -r30 -s "h = hash; x = '?' * $I" -- "h(x + 'a')" | awk '{print $6}' ; done ASCII: # SIP FNV 5 0.112 0.0979 10 0.115 0.103 15 0.12 0.107 20 0.124 0.112 30 0.126 0.127 40 0.136 0.142 50 0.142 0.147 60 0.146 0.159 UCS-2: # SIP FNV 5 0.114 0.0977 10 0.117 0.0988 15 0.12 0.11 20 0.126 0.109 30 0.13 0.122 40 0.14 0.132 50 0.144 0.147 60 0.152 0.157 For short strings the additional round and setup costs make hash() about 10% slower. For long strings SIP is faster as it processes 8 bytes at once instead of 1 to 4 bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 12:55:11 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Nov 2012 11:55:11 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352289311.38.0.410284809127.issue14621@psf.upfronthosting.co.za> Mark Dickinson added the comment: [MAL] > I don't understand why we are only trying to fix the string problem > and completely ignore other key types. [Armin] > estimating the risks of giving up on a valid query for a truly random > hash, at an overestimated one billion queries per second ... That's fine in principle, but if this gets extended to integers, note that our current integer hash is about as far from 'truly random' as you can get: Python 3.4.0a0 (default:f02555353544, Nov 4 2012, 11:50:12) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> [hash(i) for i in range(20)] [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] Moreover, it's going to be *very* hard to change the int hash while preserving the `x == y implies hash(x) == hash(y)` invariant across all the numeric types (int, float, complex, Decimal, Fraction, 3rd-party types that need to remain compatible). ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 12:57:03 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 07 Nov 2012 11:57:03 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352289423.08.0.0859003267152.issue16421@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Looks better, will check on Windows a bit later. BTW, ACKS and NEWS are usually edited by committer, but leave that as is for now. ---------- versions: +Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 12:58:43 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 07 Nov 2012 11:58:43 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames In-Reply-To: <1352153903.84.0.995057035576.issue16416@psf.upfronthosting.co.za> Message-ID: <1352289523.83.0.262066990449.issue16416@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 12:59:56 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 11:59:56 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1352289311.38.0.410284809127.issue14621@psf.upfronthosting.co.za> Message-ID: <509A4D37.2050308@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 12:55, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > [MAL] >> I don't understand why we are only trying to fix the string problem >> and completely ignore other key types. > > [Armin] >> estimating the risks of giving up on a valid query for a truly random >> hash, at an overestimated one billion queries per second ... > > That's fine in principle, but if this gets extended to integers, note that our current integer hash is about as far from 'truly random' as you can get: > > Python 3.4.0a0 (default:f02555353544, Nov 4 2012, 11:50:12) > [GCC 4.2.1 (Apple Inc. build 5664)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> [hash(i) for i in range(20)] > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] > > Moreover, it's going to be *very* hard to change the int hash while preserving the `x == y implies hash(x) == hash(y)` invariant across all the numeric types (int, float, complex, Decimal, Fraction, 3rd-party types that need to remain compatible). Exactly. And that's why trying to find secure hash functions isn't going to solve the problem. Together with randomization they may make things better for strings, but they are no solution for numeric types, and they also don't allow detecting possible attacks on your systems. But yeah, I'm repeating myself :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 13:06:04 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Nov 2012 12:06:04 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352289964.29.0.0598620628758.issue14621@psf.upfronthosting.co.za> Mark Dickinson added the comment: And I'm probably repeating myself too, but: the predictability of (and difficulty of changing of) hashing for numeric types is why I'm strongly opposed to hash collision / slot collision limits: they'd end up disallowing reasonably natural looking Python numeric sets (e.g. {2**k for k in range(n)} for smallish n). I don't think core Python should be solving this issue at all---I think that's a job for the web frameworks. Christian's idea of providing more suitable types in the std. lib. sounds like the right direction to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 13:12:05 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Wed, 07 Nov 2012 12:12:05 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352290325.18.0.429442221663.issue16421@psf.upfronthosting.co.za> V?clav ?milauer added the comment: Good, will let editors do that next time. I was following http://docs.python.org/devguide/patch.html#preparation which says "Sixth, if you are not already in the Misc/ACKS file then add your name." For NEWS, I was reading http://docs.python.org/devguide/committing.html#news-entries, but it is true it talks about commits, not about patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 13:19:34 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Nov 2012 12:19:34 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1352289964.29.0.0598620628758.issue14621@psf.upfronthosting.co.za> Message-ID: <509A51D0.9030409@egenix.com> Marc-Andre Lemburg added the comment: On 07.11.2012 13:06, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > And I'm probably repeating myself too, but: the predictability of (and difficulty of changing of) hashing for numeric types is why I'm strongly opposed to hash collision / slot collision limits: they'd end up disallowing reasonably natural looking Python numeric sets (e.g. {2**k for k in range(n)} for smallish n). I don't think core Python should be solving this issue at all---I think that's a job for the web frameworks. Christian's idea of providing more suitable types in the std. lib. sounds like the right direction to me. I definitely agree on that last sentence. Having more suitable data types in Python (like e.g. tries, b-trees or red-black-trees) would certainly be a better solution than trying to build everything into dictionaries. Nice comparison: http://en.wikipedia.org/wiki/Trie ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 13:32:07 2012 From: report at bugs.python.org (Matthias Klose) Date: Wed, 07 Nov 2012 12:32:07 +0000 Subject: [issue16235] Add python-config.sh for use during cross compilation. In-Reply-To: <1350251714.79.0.226527559426.issue16235@psf.upfronthosting.co.za> Message-ID: <1352291527.48.0.697002877678.issue16235@psf.upfronthosting.co.za> Matthias Klose added the comment: see issue #1161914 for the original script. > 2) Since we are Pythoneers, why write this script as a > shell-script instead of a Python script? (sh may not even be > available on Windows). python-config is usally not used by python module builds, but third party build systems. When cross-building these packages you usually are unable to run the python interpreter for the target. Georg, Martin, do you have any opinion if we should replace the python code with shell code (if it works on all targets), or if it should be added as a separate script? Ray, some issues: - is `local' available in all shells? just avoid it. - is there a need for the built vs. installed prefix? this is logic not found in the python implementation. what is this supposed to do? - LDLIBRARY and LDSHARED are expressed in terms of Makefile macros, leading to syntax errors. - --includes doesn't include the plat specific include dir - abi flags are missing from the include and lib dirs. Please recheck, and compare the output of the python implementation with the one of the shell implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 13:32:47 2012 From: report at bugs.python.org (Matthias Klose) Date: Wed, 07 Nov 2012 12:32:47 +0000 Subject: [issue16235] Add python-config.sh for use during cross compilation. In-Reply-To: <1350251714.79.0.226527559426.issue16235@psf.upfronthosting.co.za> Message-ID: <1352291567.41.0.270318187309.issue16235@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- nosy: +georg.brandl, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 13:38:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 12:38:49 +0000 Subject: [issue16427] Faster hash implementation Message-ID: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: In the discussion of issue14621 it was noted that much more complex hash algorithms can overtake the current one due to the fact that they process more data at a time. Here is a patch that implements this idea for the current algorithm. Also code duplication removed. Microbenchmarks: $ ./python -m timeit -n 1 -s "t = b'a' * 10**8" "hash(t)" $ ./python -m timeit -n 1 -s "t = 'a' * 10**8" "hash(t)" $ ./python -m timeit -n 1 -s "t = '\u0100' * 10**8" "hash(t)" $ ./python -m timeit -n 1 -s "t = '\U00010000' * 10**8" "hash(t)" Results on 32-bit Linux on AMD Athlon 64 X2 4600+: original patched speedup bytes 181 msec 45.7 msec 4x UCS1 429 msec 45.7 msec 9.4x UCS2 179 msec 92 msec 1.9x UCS4 183 msec 183 msec 1x If the idea is acceptable, I will create benchmarks for short strings. ---------- components: Interpreter Core files: fast_hash.patch keywords: patch messages: 175093 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Faster hash implementation type: performance versions: Python 3.4 Added file: http://bugs.python.org/file27920/fast_hash.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 13:40:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 12:40:26 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352292026.61.0.312637501491.issue14621@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue16427. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 13:45:53 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 07 Nov 2012 12:45:53 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1352292353.25.0.0086868049646.issue16427@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 13:52:10 2012 From: report at bugs.python.org (Ray Donnelly) Date: Wed, 07 Nov 2012 12:52:10 +0000 Subject: [issue16235] Add python-config.sh for use during cross compilation. In-Reply-To: <1350251714.79.0.226527559426.issue16235@psf.upfronthosting.co.za> Message-ID: <1352292730.89.0.922014124254.issue16235@psf.upfronthosting.co.za> Ray Donnelly added the comment: > is there a need for the built vs. installed prefix? > this is logic not found in the python implementation. > what is this supposed to do? You are right, it is not found in the original python implementation, but I feel that it's useful. Without it, you couldn't give someone a -devel style precompiled Python archive that they can extract where-ever they want and embed in other software without requiring them to install it to the same prefix used during the build process. > is `local' available in all shells? just avoid it. I can't be sure about all shells, but local is *very* well supported (bash, dash, csh); I'm happy to remove it though as it's not necessary. > LDLIBRARY and LDSHARED are expressed in terms of Makefile > macros, leading to syntax errors. This shouldn't be the case, see: # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} + sed -e "s,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g" < Misc/python-config.sh >python-config.sh > - --includes doesn't include the plat specific include dir You are right, I will correct this oversight. > - abi flags are missing from the include and lib dirs. ABIFLAGS propagates through other variables, namely LDLIBRARY and LDVERSION, but again, there are some issues for me to fix with this. I will write a new part on my build script that compares the output from the shell script with that from the python script and post a new patch when they agree 100% on all my test platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 13:54:59 2012 From: report at bugs.python.org (Armin Rigo) Date: Wed, 07 Nov 2012 12:54:59 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352292899.75.0.539878888741.issue14621@psf.upfronthosting.co.za> Armin Rigo added the comment: I won't try to influence the outcome of this discussion, but I'd like to correct myself: in the measures I posted, "true randomness" is not needed at all. The exact criterion might be hard to pin down, but as a first approximation, we get the same answers as long as most keys have different hashes, as all the bits of the hash are used by the dict lookup in only a few iterations. No two small ints have the same hash, by construction. You can build a sequence of (long) integers that have all exactly the same hash, but doing that is not as easy as "2**k". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 13:55:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 12:55:50 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1352289191.91.0.972472753019.issue14621@psf.upfronthosting.co.za> Message-ID: <201211071455.35522.storchaka@gmail.com> Serhiy Storchaka added the comment: > Serhiy, the performance of hash() for long strings isn't very relevant for the general performance of a Python program. It exposes the raw speed of hashing algorithm. It is good as a first estimate, because more real cases require more sophisticated measurements. > Short strings dominate. I've modified the timeit to create a new string object every time. timeit is absolutely not suitable for this. Need to write a C program that uses the Python C API. > for I in 5 10 15 20 30 40 50 60; do echo -ne "$I\t"; ./python -m timeit -n100000 -r30 -s "h = hash; x = '?' * $I" -- "h(x + 'a')" | awk '{print $6}' ; done Please, do not be fooled by the wrong measurements. You measure the height of the building together with the hill, on which it stands. Use "-n1" and you will see a completely different numbers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 14:02:05 2012 From: report at bugs.python.org (Armin Rigo) Date: Wed, 07 Nov 2012 13:02:05 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352293325.28.0.761541391846.issue14621@psf.upfronthosting.co.za> Armin Rigo added the comment: Wrong, sorry. On a 32-bit Python 2.7, "(2**32-1)*n" has the same hash -2, for any value of n. Of course if you build a dict containing thousands of such integers as keys, then right now you get unexpectedly bad performance. I wonder if I should open another bug report about that --- the hash of longs should be slightly more random-looking... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 14:03:05 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Nov 2012 13:03:05 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352293385.93.0.89690090046.issue14621@psf.upfronthosting.co.za> Mark Dickinson added the comment: [Armin] > You can build a sequence of (long) integers that have all exactly the > same hash, but doing that is not as easy as "2**k". Sure it is. The hash for integers is (by design) repeated modulo a number of the form 2**n - 1: we use 2**61 - 1 on 64-bit systems and 2**31 - 1 on 32-bit. So in {2**k for k in range(n)} you get at most 61 distinct hash values. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 14:16:40 2012 From: report at bugs.python.org (Giovanni Bajo) Date: Wed, 07 Nov 2012 13:16:40 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <509A4D37.2050308@egenix.com> Message-ID: Giovanni Bajo added the comment: Il giorno 07/nov/2012, alle ore 12:59, Marc-Andre Lemburg ha scritto: > > Marc-Andre Lemburg added the comment: > > On 07.11.2012 12:55, Mark Dickinson wrote: >> >> Mark Dickinson added the comment: >> >> [MAL] >>> I don't understand why we are only trying to fix the string problem >>> and completely ignore other key types. >> >> [Armin] >>> estimating the risks of giving up on a valid query for a truly random >>> hash, at an overestimated one billion queries per second ... >> >> That's fine in principle, but if this gets extended to integers, note that our current integer hash is about as far from 'truly random' as you can get: >> >> Python 3.4.0a0 (default:f02555353544, Nov 4 2012, 11:50:12) >> [GCC 4.2.1 (Apple Inc. build 5664)] on darwin >> Type "help", "copyright", "credits" or "license" for more information. >>>>> [hash(i) for i in range(20)] >> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] >> >> Moreover, it's going to be *very* hard to change the int hash while preserving the `x == y implies hash(x) == hash(y)` invariant across all the numeric types (int, float, complex, Decimal, Fraction, 3rd-party types that need to remain compatible). > > Exactly. And that's why trying to find secure hash functions isn't > going to solve the problem. Together with randomization they may > make things better for strings, but they are no solution for numeric > types, and they also don't allow detecting possible attacks on your > systems. > > But yeah, I'm repeating myself :-) > I don't see how it follows. Python has several hash functions in its core, one of which is the string hash function; it is currently severely broken from a security standpoint; it also happens to be probably the most common case for dictionaries in Python, and the ones that it is more easily exploited in web frameworks. If we can manage to fix the string hash function (eg: through SipHash) we will be one step further in mitigating the possible attacks. Solving collisions and mitigating attacks on numeric types is a totally different problem because it is a totally different function. I suggest we keep different discussions and different bugs for it. For instance, I'm only personally interested in mitigating attacks on the string hash function. -- Giovanni Bajo ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 14:20:16 2012 From: report at bugs.python.org (Matthias Klose) Date: Wed, 07 Nov 2012 13:20:16 +0000 Subject: [issue16235] Add python-config.sh for use during cross compilation. In-Reply-To: <1352292730.89.0.922014124254.issue16235@psf.upfronthosting.co.za> Message-ID: <509A600E.7040000@debian.org> Matthias Klose added the comment: Am 07.11.2012 13:52, schrieb Ray Donnelly: > > Ray Donnelly added the comment: > >> is there a need for the built vs. installed prefix? >> this is logic not found in the python implementation. >> what is this supposed to do? > > You are right, it is not found in the original python implementation, but I feel that it's useful. Without it, you couldn't give someone a -devel style precompiled Python archive that they can extract where-ever they want and embed in other software without requiring them to install it to the same prefix used during the build process. hmm, but python.pc, _sysconfigdata.py and Makefile still have this information. How would you test the output and compare it with the python implementation? >> is `local' available in all shells? just avoid it. > > I can't be sure about all shells, but local is *very* well supported (bash, dash, csh); I'm happy to remove it though as it's not necessary. > >> LDLIBRARY and LDSHARED are expressed in terms of Makefile >> macros, leading to syntax errors. > > This shouldn't be the case, see: > > # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} > + sed -e "s,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g" < Misc/python-config.sh >python-config.sh ahh, ok, only looked at the file in the build location. >> - --includes doesn't include the plat specific include dir > > You are right, I will correct this oversight. maybe should only be included, if it's different. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 14:28:43 2012 From: report at bugs.python.org (Arno Bakker) Date: Wed, 07 Nov 2012 13:28:43 +0000 Subject: [issue1776160] Buffer overflow when listing deeply nested directory Message-ID: <1352294923.94.0.261003373085.issue1776160@psf.upfronthosting.co.za> Arno Bakker added the comment: Can somebody please look at this bug? It still appears in SCons 2.2.0 on Windows 7 when it tries to do a os.listdir on C:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;\build\libevent-2.0.20-stable-debug\include;\build\libevent-2.0.20-stable-debug\WIN32-Code;\build\gtest-1.4.0\include; ---------- nosy: +arno at cs.vu.nl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 14:48:41 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 07 Nov 2012 13:48:41 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352296121.29.0.744546844852.issue16421@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yeah, ACKS is fine (we just don't mind doing it if the submitter leaves it out). Updating NEWS is less useful because it almost inevitably causes a conflict when the patch is applied. (We occasionally mutter about adopting a less conflict-prone approach to handling NEWS entries, but nobody has ever found it annoying enough to design a solution and officially propose switching to it) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 15:01:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 14:01:41 +0000 Subject: [issue1776160] Buffer overflow when listing deeply nested directory Message-ID: <1352296901.73.0.590291819026.issue1776160@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Can you please report what Python version you are using? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 15:03:28 2012 From: report at bugs.python.org (Arno Bakker) Date: Wed, 07 Nov 2012 14:03:28 +0000 Subject: [issue1776160] Buffer overflow when listing deeply nested directory Message-ID: <1352297008.78.0.0560710714303.issue1776160@psf.upfronthosting.co.za> Arno Bakker added the comment: This is on Python 2.7.3 on Win7 32-bit, sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 15:24:13 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 07 Nov 2012 14:24:13 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1352298253.11.0.109937213232.issue9226@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 15:46:49 2012 From: report at bugs.python.org (pythonick) Date: Wed, 07 Nov 2012 14:46:49 +0000 Subject: [issue16428] turtle with compound shape doesn't get clicks Message-ID: <1352299609.35.0.759398778926.issue16428@psf.upfronthosting.co.za> New submission from pythonick: In the standard turtle module, when a turtle has a custom shape of type "compound", it doesn't to respond to click events. No problem with polygon shapes. Observed on Windows XP, python 3.2.3, turtle version 1.1b, and on Linux, python 2.7. Test code: ################################################## import turtle square = ((0,0),(0,20),(20,20),(20,0)) turtle.addshape("sq1", square) # sq1 = polygon shape s = turtle.Shape("compound") s.addcomponent(square, "red") turtle.addshape("sq2", s) # sq2 = compound shape t1 = turtle.Turtle(shape="sq1") t2 = turtle.Turtle(shape="sq2") t2.fd(20) def click(x,y): print("click at",x,y) t1.onclick(click) t2.onclick(click) turtle.mainloop() ################################################## When you click on the black square (i.e. t1), the message "click at..." is printed. When you click on the red square (i.e. t2), nothing happens. ---------- components: Library (Lib) messages: 175106 nosy: pythonick priority: normal severity: normal status: open title: turtle with compound shape doesn't get clicks type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 15:59:26 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 07 Nov 2012 14:59:26 +0000 Subject: [issue16429] Emit SyntaxWarning for code that risks UnboundLocalError Message-ID: <1352300366.42.0.384864300614.issue16429@psf.upfronthosting.co.za> New submission from Nick Coghlan: The compiler is actually in a fairly good position to tell when code is at risk of triggering UnboundLocalError at runtime: specifically, in the section of the code that checks for duplicated parameter names [1] Now, we can't emit SyntaxError here for backwards compatibility reasons (if you have an early reference that is never executed, your code is dodgy but will still run OK). However, we should be able to emit a Syntax *Warning* when we detect an existing symbol at function scope having DEF_LOCAL applied for the first time *after* it has already been referenced in a way which doesn't create a local variable. Something like: SyntaxWarning: Local variable NAME bound after earlier reference (risks UnboundLocalError when function is called) [1] http://hg.python.org/cpython/file/default/Python/symtable.c#l1002 ---------- messages: 175107 nosy: ncoghlan priority: normal severity: normal status: open title: Emit SyntaxWarning for code that risks UnboundLocalError versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 16:16:04 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 07 Nov 2012 15:16:04 +0000 Subject: [issue11205] Evaluation order of dictionary display is different from reference manual. In-Reply-To: <1297589953.69.0.371220549392.issue11205@psf.upfronthosting.co.za> Message-ID: <1352301364.78.0.378037637777.issue11205@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan priority: high -> low versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 17:43:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 16:43:13 +0000 Subject: [issue1776160] Buffer overflow when listing deeply nested directory Message-ID: <1352306593.27.0.383783315841.issue1776160@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This issue is related to parsing of "et#" format which is used only in listdir() and _getfullpathname() under Windows. PyArg_ParseTuple() throws TypeError exception for multiple conversion errors (in this case it is an overflow of a static buffer). There are several ways to solve this issue: 1. Do nothing, close the issue as "wont fix". This is just the wrong exception in a very rare case only on 2.7 and only under Windows. The issue will go away with 2.7. 2. Use under Windows dynamic buffer as under other platforms. This will require not only dynamic memory allocation, but also reallocation for "\*.*" appending. 3. Do not use PyArg_ParseTuple(). Parse the singular argument manually. 4. If PyArg_ParseTuple() fails then check if the raised exception is TypeError and the error message matches "(buffer overflow)". In this case raise the right exception. 5. Rewrite PyArg_ParseTuple() so that it will raise an appropriate type of exception (this will have to do anyway, but maybe later, in other issue). In this case it will be OverflowError. Then we can catch this error and raise the right exception. Martin, what is your decision? ---------- versions: +Python 2.7 -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 18:00:35 2012 From: report at bugs.python.org (Sebastien Estienne) Date: Wed, 07 Nov 2012 17:00:35 +0000 Subject: [issue16430] re.match blocking and taking 100% CPU Message-ID: <1352307635.84.0.490931242239.issue16430@psf.upfronthosting.co.za> New submission from Sebastien Estienne: Hello re.match is blocked and takes 100% cpu forever re_bug.py is an example of the bug. thanx ---------- components: Regular Expressions files: re_bug.py messages: 175109 nosy: Sebastien.Estienne, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: re.match blocking and taking 100% CPU versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file27921/re_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 18:16:25 2012 From: report at bugs.python.org (Ray Donnelly) Date: Wed, 07 Nov 2012 17:16:25 +0000 Subject: [issue16235] Add python-config.sh for use during cross compilation. In-Reply-To: <1350251714.79.0.226527559426.issue16235@psf.upfronthosting.co.za> Message-ID: <1352308585.9.0.846017894635.issue16235@psf.upfronthosting.co.za> Ray Donnelly added the comment: > hmm, but python.pc, _sysconfigdata.py and Makefile still have this information. In my experience, as long as PYTHONHOME is set correctly before the Python .so, .dll or .dylib is loaded then everything works correctly. >From what I've seen, .pc files are also useless for the purposes of a relocatable -devel package as there's no capability for relative directories in pkg-config. > maybe should only be included, if it's different. Ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 18:34:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 17:34:32 +0000 Subject: [issue16430] re.match blocking and taking 100% CPU In-Reply-To: <1352307635.84.0.490931242239.issue16430@psf.upfronthosting.co.za> Message-ID: <1352309672.85.0.490889796947.issue16430@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is no a Python bug. You have wrong regexp. Remove "$" at the end or add ".*" before "$". And it would be better if instead of '(?P.*?)\s' and '"(?P.*?)"' you use '(?P\S+)\s' and '"(?P[^"]*)"'. ---------- nosy: +serhiy.storchaka resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 18:35:54 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Nov 2012 17:35:54 +0000 Subject: [issue16430] re.match blocking and taking 100% CPU In-Reply-To: <1352307635.84.0.490931242239.issue16430@psf.upfronthosting.co.za> Message-ID: <1352309754.33.0.175214712062.issue16430@psf.upfronthosting.co.za> Mark Dickinson added the comment: This is a known issue: there are a good few duplicates in the tracker. Issue #1662581 is one, for example. In this particular case, you can probably fix things by tightening up your regex. Part of the problem is that '.*' is going to match any sequence of characters, including spaces. Judicious use of '\S' to match non-whitespace characters might help. There's not much point to the '?' in '.*?', either. ---------- nosy: +mark.dickinson superseder: -> the re module can perform poorly: O(2**n) versus O(n**2) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 18:43:13 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Nov 2012 17:43:13 +0000 Subject: [issue13723] Regular expressions: (?:X|\s+)*$ takes a long time In-Reply-To: <1325886236.37.0.0463179039095.issue13723@psf.upfronthosting.co.za> Message-ID: <1352310193.95.0.0665600263693.issue13723@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- superseder: -> the re module can perform poorly: O(2**n) versus O(n**2) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 18:50:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 17:50:36 +0000 Subject: [issue4071] ntpath.abspath fails for long str paths In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1352310636.26.0.0680718620502.issue4071@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I doubt this issue exists on Python >= 3.2. See also issue1776160. ---------- nosy: +serhiy.storchaka versions: -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 18:50:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 17:50:46 +0000 Subject: [issue1776160] Buffer overflow when listing deeply nested directory Message-ID: <1352310646.63.0.019271270708.issue1776160@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue4071. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 18:51:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 07 Nov 2012 17:51:42 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1352310702.24.0.351887041151.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: test ---------- nosy: -chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 19:01:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 18:01:38 +0000 Subject: [issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data In-Reply-To: <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za> Message-ID: <1352311298.87.0.219222021472.issue16350@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Also note that your variant of check for overflow causes undefined behavior. Python is gradually getting rid of such code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 19:10:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 07 Nov 2012 18:10:05 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1352311805.57.0.0870847517263.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: another test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 19:15:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 18:15:28 +0000 Subject: [issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long) In-Reply-To: <1202068724.99.0.704404319493.issue2005@psf.upfronthosting.co.za> Message-ID: <1352312128.54.0.35664750592.issue2005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue4591, issue7365, issue15301, and issue15989. Kimmo Mustonen, if you are not working on the patch, I'll take the work. I don't want to interrupt your work, but if you are having trouble, maybe I can do it. In any case, I have already spent the time to study the issue and have ideas for a solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 19:31:20 2012 From: report at bugs.python.org (Kimmo Mustonen) Date: Wed, 07 Nov 2012 18:31:20 +0000 Subject: [issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long) In-Reply-To: <1202068724.99.0.704404319493.issue2005@psf.upfronthosting.co.za> Message-ID: <1352313080.93.0.670872486875.issue2005@psf.upfronthosting.co.za> Kimmo Mustonen added the comment: Feel free to finalize this. I don't have such a system to test it anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 20:07:51 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 07 Nov 2012 19:07:51 +0000 Subject: [issue16338] pysnmp/asyncore - timeout ineffective? In-Reply-To: <1351356300.75.0.420247508313.issue16338@psf.upfronthosting.co.za> Message-ID: <1352315271.18.0.0564589629209.issue16338@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 20:18:21 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 07 Nov 2012 19:18:21 +0000 Subject: [issue11205] Evaluation order of dictionary display is different from reference manual. In-Reply-To: <1297589953.69.0.371220549392.issue11205@psf.upfronthosting.co.za> Message-ID: <1352315901.15.0.600633993182.issue11205@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Today in pydev thread "chained assignment weirdity" Guido said http://permalink.gmane.org/gmane.comp.python.devel/135746 "I agree that we should be *very* conservative in changing the meaning of existing opcodes (adding new one is a different story)." ... "Hm. I really don't think that is a good development for Python to compromise in the area of expression evaluation order where side effects are involved." ... "I haven't looked at the proposed fixes, but I think correctness is more important than saving an extra bytecode (OTOH keeping the set of opcodes the same trumps both). I can't imagine that this extra opcode will be significant in many cases." To which Nick C. replied "Since you've indicated the implementation is in the wrong here and you also want to preserve opcode semantics, I think Skip's patch is correct, but also needs to be applied to dict comprehensions (now we have them). The extra bytecode is only ROT_TWO, which is one of the cheapest we have kicking around." To which Guido said "Ok, somebody go for it! (Also please refer to my pronouncement in the bug" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 20:26:17 2012 From: report at bugs.python.org (Elvis Pranskevichus) Date: Wed, 07 Nov 2012 19:26:17 +0000 Subject: [issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal Message-ID: <1352316377.68.0.68538809412.issue16431@psf.upfronthosting.co.za> New submission from Elvis Pranskevichus: Consider the following: import decimal class MyDecimal(decimal.Decimal): def __new__(cls, value): return super().__new__(cls, value) a = decimal.Decimal('1.0') b = MyDecimal(a) c = MyDecimal('1.0') print(type(a), type(b), isinstance(b, MyDecimal), type(c), isinstance(c, MyDecimal)) Running the above in 3.3 produces: False True Which shows that Decimal.__new__(cls, Decimal()) will always return its argument regardless of cls. ---------- messages: 175121 nosy: Elvis.Pranskevichus, skrah priority: normal severity: normal status: open title: CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 20:27:21 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Nov 2012 19:27:21 +0000 Subject: [issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal In-Reply-To: <1352316377.68.0.68538809412.issue16431@psf.upfronthosting.co.za> Message-ID: <1352316441.01.0.553909324933.issue16431@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 20:27:41 2012 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 07 Nov 2012 19:27:41 +0000 Subject: [issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal In-Reply-To: <1352316377.68.0.68538809412.issue16431@psf.upfronthosting.co.za> Message-ID: <1352316461.17.0.730554638985.issue16431@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 21:14:33 2012 From: report at bugs.python.org (Stefan Krah) Date: Wed, 07 Nov 2012 20:14:33 +0000 Subject: [issue16422] Decimal constants should be the same for py & c module versions In-Reply-To: <1352280971.72.0.0694367226643.issue16422@psf.upfronthosting.co.za> Message-ID: <20121107201434.GA24691@sleipnir.bytereef.org> Stefan Krah added the comment: Well, I suppose one could use a cascaded switch statement, starting with the 7th letter and then (in the case of HALF*) proceed with the 12th letter: "ROUND_CEILING" "ROUND_FLOOR" "ROUND_UP" "ROUND_DOWN" "ROUND_HALF_UP" "ROUND_HALF_DOWN" "ROUND_HALF_EVEN" "ROUND_05UP" That should be as fast as PyLong_AsLong(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 22:28:24 2012 From: report at bugs.python.org (Andrew Gorcester) Date: Wed, 07 Nov 2012 21:28:24 +0000 Subject: [issue16432] Template strings documentation in Python 3 refers to % substitution in present tense Message-ID: <1352323704.72.0.0858754286751.issue16432@psf.upfronthosting.co.za> New submission from Andrew Gorcester: Documentation here: http://docs.python.org/3/library/string.html#template-strings says "Instead of the normal %-based substitutions, Templates support $-based substitutions..." I believe it is confusing to refer to %-based substitutions in a way that implies they still exist in Python 3. It would be better to fix this to either refer to {} substitution or to remove the reference comparing it to normal string substitution altogether. ---------- assignee: docs at python components: Documentation messages: 175123 nosy: andrewsg, docs at python priority: normal severity: normal status: open title: Template strings documentation in Python 3 refers to % substitution in present tense versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 22:29:12 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 07 Nov 2012 21:29:12 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352323752.39.0.9770161135.issue16421@psf.upfronthosting.co.za> Andrew Svetlov added the comment: V?clav, your patch passed on Windows. Will commit it after double check. Thanks. ---------- assignee: -> asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 22:59:35 2012 From: report at bugs.python.org (Georg Brandl) Date: Wed, 07 Nov 2012 21:59:35 +0000 Subject: [issue16432] Template strings documentation in Python 3 refers to % substitution in present tense In-Reply-To: <1352323704.72.0.0858754286751.issue16432@psf.upfronthosting.co.za> Message-ID: <1352325575.41.0.00869400892347.issue16432@psf.upfronthosting.co.za> Georg Brandl added the comment: Who said % substitution doesn't exist anymore in Python 3? That said, it's certainly not wrong to replace this with {} substitution. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 23:08:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Nov 2012 22:08:17 +0000 Subject: [issue16432] Template strings documentation in Python 3 refers to % substitution in present tense In-Reply-To: <1352323704.72.0.0858754286751.issue16432@psf.upfronthosting.co.za> Message-ID: <1352326097.66.0.402663251481.issue16432@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is not a bug. %-based substitutions exist in Python 3. http://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 23:13:10 2012 From: report at bugs.python.org (Dima Tisnek) Date: Wed, 07 Nov 2012 22:13:10 +0000 Subject: [issue5950] Make zipimport work with zipfile containing comments In-Reply-To: <1241628586.95.0.0801479384158.issue5950@psf.upfronthosting.co.za> Message-ID: <1352326390.19.0.965943822258.issue5950@psf.upfronthosting.co.za> Dima Tisnek added the comment: also applies to 2.7 series over a year passed since last comment, any progress on this? I just ran into this issue myself. zipfile module handles commented zip's fine, but zipimport doesn't. I didn't expect a gotcha like this from Python! ---------- nosy: +Dima.Tisnek versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 23:21:17 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 07 Nov 2012 22:21:17 +0000 Subject: [issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal In-Reply-To: <1352316377.68.0.68538809412.issue16431@psf.upfronthosting.co.za> Message-ID: <3Xxht41mfszMXZ@mail.python.org> Roundup Robot added the comment: New changeset 1b6c972457e6 by Stefan Krah in branch '3.3': Issue #16431: Use the type information when constructing a Decimal subtype http://hg.python.org/cpython/rev/1b6c972457e6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 23:53:54 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 07 Nov 2012 22:53:54 +0000 Subject: [issue16311] Use _PyUnicodeWriter API in text decoders In-Reply-To: <3Xx6hY4NfQzMP7@mail.python.org> Message-ID: STINNER Victor added the comment: Oh, I forgot my benchmark results. decodebench.py result results on Linux 32 bits: (Linux-3.2.0-32-generic-pae-i686-with-debian-wheezy-sid) $ ./python bench-diff.py original writer ascii 'A'*10000 4109 (-3%) 3974 latin1 'A'*10000 3851 (-5%) 3644 latin1 '\x80'*10000 14832 (-3%) 14430 utf-8 'A'*10000 3747 (-4%) 3608 utf-8 '\x80'*10000 976 (-2%) 961 utf-8 '\u0100'*10000 974 (-2%) 959 utf-8 '\u8000'*10000 804 (-14%) 694 utf-8 '\U00010000'*10000 666 (-5%) 635 utf-16le 'A'*10000 4154 (-1%) 4117 utf-16le '\x80'*10000 4055 (-2%) 3988 utf-16le '\u0100'*10000 4047 (-2%) 3974 utf-16le '\u8000'*10000 917 (-1%) 912 utf-16le '\U00010000'*10000 872 (-0%) 870 utf-16be 'A'*10000 3218 (-1%) 3185 utf-16be '\x80'*10000 3163 (-2%) 3114 utf-16be '\u0100'*10000 2591 (-1%) 2556 utf-16be '\u8000'*10000 979 (-1%) 974 utf-16be '\U00010000'*10000 928 (-0%) 925 utf-32le 'A'*10000 1681 (+12%) 1885 utf-32le '\x80'*10000 1697 (+10%) 1865 utf-32le '\u0100'*10000 2224 (+1%) 2254 utf-32le '\u8000'*10000 2224 (+2%) 2269 utf-32le '\U00010000'*10000 2234 (+1%) 2260 utf-32be 'A'*10000 1685 (+11%) 1868 utf-32be '\x80'*10000 1684 (+10%) 1860 utf-32be '\u0100'*10000 2223 (+1%) 2253 utf-32be '\u8000'*10000 2222 (+1%) 2255 utf-32be '\U00010000'*10000 2243 (+1%) 2257 decodebench.py result results on Linux 64 bits: (Linux-3.4.9-2.fc16.x86_64-x86_64-with-fedora-16-Verne) ascii 'A'*10000 10043 (+1%) 10144 latin1 'A'*10000 8351 (-1%) 8258 latin1 '\x80'*10000 19184 (+2%) 19560 utf-8 'A'*10000 8083 (+5%) 8461 utf-8 '\x80'*10000 982 (+1%) 993 utf-8 '\u0100'*10000 984 (+1%) 992 utf-8 '\u8000'*10000 806 (+31%) 1053 utf-8 '\U00010000'*10000 639 (+12%) 718 utf-16le 'A'*10000 5547 (-2%) 5422 utf-16le '\x80'*10000 5205 (+1%) 5271 utf-16le '\u0100'*10000 4900 (-4%) 4695 utf-16le '\u8000'*10000 1062 (+9%) 1154 utf-16le '\U00010000'*10000 1040 (+4%) 1078 utf-16be 'A'*10000 5416 (-5%) 5157 utf-16be '\x80'*10000 5077 (-1%) 5011 utf-16be '\u0100'*10000 4261 (-1%) 4218 utf-16be '\u8000'*10000 1146 (+0%) 1147 utf-16be '\U00010000'*10000 1125 (-1%) 1119 utf-32le 'A'*10000 1743 (+8%) 1880 utf-32le '\x80'*10000 1751 (+5%) 1842 utf-32le '\u0100'*10000 2114 (+29%) 2721 utf-32le '\u8000'*10000 2120 (+28%) 2718 utf-32le '\U00010000'*10000 2065 (+30%) 2690 utf-32be 'A'*10000 1761 (+6%) 1860 utf-32be '\x80'*10000 1749 (+6%) 1856 utf-32be '\u0100'*10000 2101 (+29%) 2715 utf-32be '\u8000'*10000 2083 (+30%) 2715 utf-32be '\U00010000'*10000 2058 (+31%) 2689 Most significant changes: * -14% to decode '\u8000'*10000 from UTF-8 on Linux 32 bits * +31% to decode '\u8000'*10000 from UTF-8 on Linux 32 bits * +28% to +31% to decode UCS-2 and UCS-4 characters from UTF-8 on Linux 32 bits @Serhiy Storchaka: If you feel able to tune _PyUnicodeWriter to improve its performance, please open a new issue. I consider the performance changes acceptable and I don't plan to work on this topic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 7 23:55:16 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 07 Nov 2012 22:55:16 +0000 Subject: [issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal In-Reply-To: <1352316377.68.0.68538809412.issue16431@psf.upfronthosting.co.za> Message-ID: <3XxjdH2xmtzMrs@mail.python.org> Roundup Robot added the comment: New changeset 7fcc58811e82 by Stefan Krah in branch '3.3': Issue #16431: Also fix the opposite direction. http://hg.python.org/cpython/rev/7fcc58811e82 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 00:02:41 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 07 Nov 2012 23:02:41 +0000 Subject: [issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal In-Reply-To: <1352316377.68.0.68538809412.issue16431@psf.upfronthosting.co.za> Message-ID: <1352329361.66.0.250014774421.issue16431@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: "Py_INCREF(v); return v;" should be used only for immutable types, not for subclasses. in 3.2, the code below prints "3, None": import decimal class MyDecimal(decimal.Decimal): x = None def __new__(cls, value): return super().__new__(cls, value) return obj a = MyDecimal("1.1") a.x = 3 b = MyDecimal(a) print(a.x, b.x) ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 01:41:57 2012 From: report at bugs.python.org (Andrew Gorcester) Date: Thu, 08 Nov 2012 00:41:57 +0000 Subject: [issue16432] Template strings documentation in Python 3 refers to % substitution in present tense In-Reply-To: <1352323704.72.0.0858754286751.issue16432@psf.upfronthosting.co.za> Message-ID: <1352335317.1.0.465080295545.issue16432@psf.upfronthosting.co.za> Andrew Gorcester added the comment: Sorry, my mistake -- I thought that %-based formatting had been deprecated and removed by now, because it wasn't documented in library/string.html . However, I still think referring to %-based formatting as "normal" in Python 3 is confusing to readers as it is not the preferred system. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 05:01:19 2012 From: report at bugs.python.org (Todd Rovito) Date: Thu, 08 Nov 2012 04:01:19 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1352347279.93.0.861802849409.issue16278@psf.upfronthosting.co.za> Todd Rovito added the comment: Here is a draft suggestion for the documentation change, not all the formatting is worked out: .. function:: rename(src, dst, *, src_dir_fd=None, dst_dir_fd=None) Rename the file or directory *src* to *dst*. If *src* exists as either a file or directory and *dst* does not exist the rename will occur with no error raised. In some cases the rename function will behave differently across platforms which are noted below. In all cases if *src* does not exist :exc: 'OSError' will be raised. Unix If *dst* exists and is a file, it will be replaced silently if the user has permission and src is a file. If *src* is a directory and *dst* is a file :exc: 'OSError' will be raised. In the case where *src* is a directory and *dst* is a empty directory the rename will occur and the *src* directory name will overwrite the *dst* directory name.Yet a special case is noted where *src* is a directory and *dst* is a non-empty directory the rename will not occur and :exc: `OSError` will be raised. Windows If *src* is a file and *dst* exists either as a file or directory :exc: 'OSError` will be raised and the rename will not occur. In the case where *src* is a directory, either empty or not empty, and *dst* exists as a file or not empty directory :exc: `OSError` will be raised. If *src* is a directory, either empty or not empty, and *dst* is a empty directory then :exc: `FileExistsError` will be raised. If successful, the renaming will be an atomic operation (this is a POSIX requirement). This function can support specifying *src_dir_fd* and/or *dst_dir_fd* to supply :ref:`paths relative to directory descriptors `. If you want cross-platform overwriting of the destination, use :func:`replace`. Availability: Unix, Windows. .. versionadded:: 3.3 The *src_dir_fd* and *dst_dir_fd* arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 06:51:26 2012 From: report at bugs.python.org (Sean Ochoa) Date: Thu, 08 Nov 2012 05:51:26 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1352353886.5.0.583643244131.issue13349@psf.upfronthosting.co.za> Sean Ochoa added the comment: >From Taggnostr on #python-dev: 1.) Use assertRaises+assertIn instead of assertRaisesRegex 2.) Add or change an existing test that you've already updated to use elements with a repr longer than 100 chars. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 07:27:52 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 08 Nov 2012 06:27:52 +0000 Subject: [issue16388] Urllib screws up capitalization in "User-Agent" HTTP Header In-Reply-To: <1351875253.7.0.390086386154.issue16388@psf.upfronthosting.co.za> Message-ID: <1352356072.83.0.526704885923.issue16388@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Calvin. - I shall act upon old bug. The tricky nature of backwards compatibility sometimes let's it stale because we can not come t a good conclusion. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 08:25:59 2012 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 08 Nov 2012 07:25:59 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1352359559.74.0.495448581065.issue16392@psf.upfronthosting.co.za> Stefan Behnel added the comment: Agreed. Since it doesn't really fit into any specific function documentation, I would place it right at the top. Something like this: """ The following functions can be used by C code to call into Python's import machinery. Note that Python 3 does not automatically register an extension module in sys.modules on creation (see module.html#initializing-c-modules). It is only added after running through the whole module init function. This means that a request to import the current module while its init function is still running (either directly or transitively by other modules) will try to reimport the module. If you cannot be sure that this will not happen, you have to register the newly created module yourself as follows, using the fully qualified module name:: PyObject *the_module = PyModule_Create(py_module_def); if (the_module == NULL) { /* failure ! */ }; PyObject *sys_modules = PyImport_GetModuleDict(); if (sys_modules == NULL) { /* failure ! */ }; if (PyDict_SetItemString(modules, "the.package.and.module", the_module) < 0) { /* failure ! */ }; """ Maybe it should add another comment that this is a major quirk in the runtime and say "sorry for being stupid here - I hope you can do better". Requiring the user to know the FQMN at build time because the import machinery fails to set it automatically is just embarrissing. Then, after the first sentence in the module.html#initializing-c-modules section, I'd add this: """ Note that, starting with Python 3.0, the module creation functions no longer register the module in sys.modules. The import machinery will only do this after the module init function has run. If you need to run imports as part of your module init function and happen to know the fully qualified module name in your code, it is best to register the module yourself after creating it. """ I wonder if the code example shouldn't go on the "module" page. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 08:55:04 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 07:55:04 +0000 Subject: [issue8939] Use C type names (PyUnicode etc;) in the C API docs In-Reply-To: <1276002876.44.0.334392966089.issue8939@psf.upfronthosting.co.za> Message-ID: <1352361304.79.0.581603737003.issue8939@psf.upfronthosting.co.za> Ezio Melotti added the comment: What's the status of this? ---------- type: -> enhancement versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 08:55:07 2012 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 08 Nov 2012 07:55:07 +0000 Subject: [issue13429] provide __file__ to extension init function In-Reply-To: <1321631218.51.0.537222078649.issue13429@psf.upfronthosting.co.za> Message-ID: <1352361307.6.0.265089263382.issue13429@psf.upfronthosting.co.za> Stefan Behnel added the comment: I'm increasing the target version as this didn't change anything for 3.3. However, for 3.4, it might be possible to work around this by splitting the module init function into two parts, one that gets executed in order to create the module object (and do safe C level setup etc.) and one that gets executed after properly registering the module and setting __file__ and friends externally and that can then populate the module dict etc. I can see two ways how this can be done. The shared library could optionally export a second symbol ("PyInit2_modulename" or whatever), or it could set a sort of callback function on the module object it returns in its original init function, either in the module dict or using a C level interface. I prefer the latter because it's safer - code can't accidentally rely on this feature in other Python versions (or implementations) because it would fail to build there if the required C-API function isn't available. A corner case that this wouldn't fix is the creation of more than one module object in the module init function, but I think it's a reasonable restriction that users should be on their own here and should properly set up these additional modules themselves. Alternatively, this could be handled (with some overhead) if the import machinery remembered all modules created during the execution of the module init function and post-processed them as noted above. So, my proposal would be to add a new callback function field to module objects and a new C-API function "PyModule_SetInitFunction(module, c_func)" that registers a C callback function on a module object. Then, extend the shared library importing code to call that init function if it's available, passing it both the module instance and an extensible context struct in order to enable future extensions to this interface. I realise that this might have to go through a PEP process, but do you see any obvious flaws I missed so far or reasons to reject this approach right away? ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 08:58:53 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 07:58:53 +0000 Subject: [issue10358] Doc styles for print should only use dark colors In-Reply-To: <1289224086.88.0.0372722217541.issue10358@psf.upfronthosting.co.za> Message-ID: <1352361533.96.0.694796685937.issue10358@psf.upfronthosting.co.za> Ezio Melotti added the comment: The docs already have a print stylesheet and its colors looks good to me. ---------- resolution: -> out of date stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 09:12:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 08 Nov 2012 08:12:15 +0000 Subject: [issue10385] Mark up "subprocess" as module in its doc In-Reply-To: <1289444045.02.0.247018067393.issue10385@psf.upfronthosting.co.za> Message-ID: <3Xxxzz01TtzMQl@mail.python.org> Roundup Robot added the comment: New changeset 58564aeec8e4 by Ezio Melotti in branch '2.7': #10385: use the mod role in subprocess docs. http://hg.python.org/cpython/rev/58564aeec8e4 New changeset 8e8d391eb3eb by Ezio Melotti in branch '3.2': #10385: use the mod role in subprocess docs. http://hg.python.org/cpython/rev/8e8d391eb3eb New changeset f45d1afb952b by Ezio Melotti in branch '3.3': #10385: merge with 3.2. http://hg.python.org/cpython/rev/f45d1afb952b New changeset 5d7e7e7e2e82 by Ezio Melotti in branch 'default': #10385: merge with 3.3. http://hg.python.org/cpython/rev/5d7e7e7e2e82 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 09:18:31 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 08:18:31 +0000 Subject: [issue10385] Mark up "subprocess" as module in its doc In-Reply-To: <1289444045.02.0.247018067393.issue10385@psf.upfronthosting.co.za> Message-ID: <1352362711.79.0.360397410212.issue10385@psf.upfronthosting.co.za> Ezio Melotti added the comment: It looked OK and the :mod: role was already used throughout the page, so I applied the patch. ---------- assignee: belopolsky -> ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 09:26:58 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 08:26:58 +0000 Subject: [issue10434] Document the rules for "public names" In-Reply-To: <1289919338.9.0.394057770971.issue10434@psf.upfronthosting.co.za> Message-ID: <1352363218.84.0.316379984824.issue10434@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy type: -> enhancement versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 09:29:46 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 08:29:46 +0000 Subject: [issue10589] I/O ABC docs should specify which methods have implementations In-Reply-To: <1291143953.85.0.0204032538698.issue10589@psf.upfronthosting.co.za> Message-ID: <1352363386.84.0.541636153202.issue10589@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: needs patch -> patch review versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 09:31:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 08:31:55 +0000 Subject: [issue11479] Add discussion of trailing slash in raw string to tutorial In-Reply-To: <1299985803.24.0.199507309731.issue11479@psf.upfronthosting.co.za> Message-ID: <1352363515.0.0.895225393912.issue11479@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- type: behavior -> enhancement versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 09:32:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 08:32:55 +0000 Subject: [issue8269] Missing return values for PyUnicode C/API functions In-Reply-To: <1269991617.43.0.918560470794.issue8269@psf.upfronthosting.co.za> Message-ID: <1352363575.75.0.707413240838.issue8269@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> patch review versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 09:34:04 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 08:34:04 +0000 Subject: [issue11974] Class definition gotcha.. should this be documented somewhere? In-Reply-To: <1304274889.3.0.162053692496.issue11974@psf.upfronthosting.co.za> Message-ID: <1352363644.86.0.942127970581.issue11974@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy stage: -> needs patch versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 09:35:00 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 08:35:00 +0000 Subject: [issue11762] Ast doc: warning and version number In-Reply-To: <1301933761.05.0.937546235723.issue11762@psf.upfronthosting.co.za> Message-ID: <1352363700.19.0.317133937156.issue11762@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy -patch type: -> enhancement versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 09:36:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 08:36:48 +0000 Subject: [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1352363808.31.0.943442723511.issue8824@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +mark.dickinson type: -> enhancement versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 09:37:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 08:37:48 +0000 Subject: [issue12077] Harmonizing descriptor protocol documentation In-Reply-To: <1305381385.94.0.81554539251.issue12077@psf.upfronthosting.co.za> Message-ID: <1352363868.87.0.403374071536.issue12077@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 09:41:12 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 08:41:12 +0000 Subject: [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1352364072.63.0.233600505562.issue11975@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +chris.jerdonek type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 09:48:02 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 08:48:02 +0000 Subject: [issue12645] test.support. import_fresh_module - incorrect doc In-Reply-To: <1311789815.76.0.639942891335.issue12645@psf.upfronthosting.co.za> Message-ID: <1352364482.39.0.972420818182.issue12645@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ncoghlan stage: -> needs patch type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 10:05:13 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 08 Nov 2012 09:05:13 +0000 Subject: [issue16433] unittest.TestCase.assertNotEqual has incorrect docstring. Message-ID: <1352365513.53.0.838021442266.issue16433@psf.upfronthosting.co.za> New submission from Mark Dickinson: The TestCase.assertNotEqual docstring currently says: Fail if the two objects are equal as determined by the '==' operator. This doesn't match the implementation, which checks that '!=' gives True (rather than checking that '==' gives False). The online docs look fine. ---------- components: Library (Lib) messages: 175142 nosy: mark.dickinson priority: normal severity: normal status: open title: unittest.TestCase.assertNotEqual has incorrect docstring. versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 10:06:30 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 08 Nov 2012 09:06:30 +0000 Subject: [issue11481] The copy module already uses copyreg In-Reply-To: <1300009670.98.0.0546201477777.issue11481@psf.upfronthosting.co.za> Message-ID: <3XxzBY6X9xzM1V@mail.python.org> Roundup Robot added the comment: New changeset 2bd6150b48ea by Ezio Melotti in branch '2.7': #11481: update copy_reg docs and add example. http://hg.python.org/cpython/rev/2bd6150b48ea New changeset e089bdca9d9c by Ezio Melotti in branch '2.7': #11481: fix markup. http://hg.python.org/cpython/rev/e089bdca9d9c New changeset 12dbb3187105 by Ezio Melotti in branch '3.2': #11481: update copyreg docs and add example. http://hg.python.org/cpython/rev/12dbb3187105 New changeset 87ec3ce3a04e by Ezio Melotti in branch '3.3': #11481: merge with 3.2. http://hg.python.org/cpython/rev/87ec3ce3a04e New changeset 20b65b88e0a0 by Ezio Melotti in branch 'default': #11481: merge with 3.3. http://hg.python.org/cpython/rev/20b65b88e0a0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 10:07:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 09:07:21 +0000 Subject: [issue11481] The copy module already uses copyreg In-Reply-To: <1300009670.98.0.0546201477777.issue11481@psf.upfronthosting.co.za> Message-ID: <1352365641.8.0.326517983147.issue11481@psf.upfronthosting.co.za> Ezio Melotti added the comment: I made a few minor changes and applied the patch. ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 10:09:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 08 Nov 2012 09:09:41 +0000 Subject: [issue16433] unittest.TestCase.assertNotEqual has incorrect docstring. In-Reply-To: <1352365513.53.0.838021442266.issue16433@psf.upfronthosting.co.za> Message-ID: <3XxzGD67N9zM1V@mail.python.org> Roundup Robot added the comment: New changeset d32d04edd371 by Ezio Melotti in branch '2.7': #16433: fix docstring of assertNotEqual. http://hg.python.org/cpython/rev/d32d04edd371 New changeset 9d5cc978cfe5 by Ezio Melotti in branch '3.2': #16433: fix docstring of assertNotEqual. http://hg.python.org/cpython/rev/9d5cc978cfe5 New changeset e0fe5eead38a by Ezio Melotti in branch '3.3': #16433: merge with 3.2. http://hg.python.org/cpython/rev/e0fe5eead38a New changeset 6eba4df6bb21 by Ezio Melotti in branch 'default': #16433: merge with 3.3. http://hg.python.org/cpython/rev/6eba4df6bb21 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 10:10:30 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 09:10:30 +0000 Subject: [issue16433] unittest.TestCase.assertNotEqual has incorrect docstring. In-Reply-To: <1352365513.53.0.838021442266.issue16433@psf.upfronthosting.co.za> Message-ID: <1352365830.03.0.224880155126.issue16433@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 10:10:49 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 08 Nov 2012 09:10:49 +0000 Subject: [issue16433] unittest.TestCase.assertNotEqual has incorrect docstring. In-Reply-To: <1352365513.53.0.838021442266.issue16433@psf.upfronthosting.co.za> Message-ID: <1352365849.19.0.534932474897.issue16433@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks, Ezio! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 11:20:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 08 Nov 2012 10:20:41 +0000 Subject: [issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal In-Reply-To: <1352316377.68.0.68538809412.issue16431@psf.upfronthosting.co.za> Message-ID: <3Xy0r82ZRRzMWT@mail.python.org> Roundup Robot added the comment: New changeset 9a701e8ec2c9 by Stefan Krah in branch '3.3': Issue #16431: Finally, consider all permutations. http://hg.python.org/cpython/rev/9a701e8ec2c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 11:31:17 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 08 Nov 2012 10:31:17 +0000 Subject: [issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal In-Reply-To: <1352316377.68.0.68538809412.issue16431@psf.upfronthosting.co.za> Message-ID: <1352370677.38.0.40614238121.issue16431@psf.upfronthosting.co.za> Stefan Krah added the comment: Thanks, Amaury. Should be fixed now. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 11:39:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 08 Nov 2012 10:39:16 +0000 Subject: [issue11479] Add discussion of trailing backslash in raw string to tutorial In-Reply-To: <1299985803.24.0.199507309731.issue11479@psf.upfronthosting.co.za> Message-ID: <1352371156.27.0.249353134848.issue11479@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: Add discussion of trailing slash in raw string to tutorial -> Add discussion of trailing backslash in raw string to tutorial _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 12:43:07 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 08 Nov 2012 11:43:07 +0000 Subject: [issue16433] unittest.TestCase.assertNotEqual has incorrect docstring. In-Reply-To: <1352365513.53.0.838021442266.issue16433@psf.upfronthosting.co.za> Message-ID: <1352374987.95.0.995659269595.issue16433@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Maybe better to use: Fail if the two objects are *not* equal as determined by the '!=' operator. ??? ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 13:24:32 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 08 Nov 2012 12:24:32 +0000 Subject: [issue16433] unittest.TestCase.assertNotEqual has incorrect docstring. In-Reply-To: <1352365513.53.0.838021442266.issue16433@psf.upfronthosting.co.za> Message-ID: <1352377472.22.0.998239333331.issue16433@psf.upfronthosting.co.za> Mark Dickinson added the comment: Andrew: if the objects are not equal, the test should pass, not fail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 13:33:10 2012 From: report at bugs.python.org (=?utf-8?q?Erik_G=C3=BCnther?=) Date: Thu, 08 Nov 2012 12:33:10 +0000 Subject: [issue16434] SocketServer call shutdown in the wrong way Message-ID: <1352377990.43.0.148428023395.issue16434@psf.upfronthosting.co.za> New submission from Erik G?nther: I have a small development WSGI-server using PythonPaste and when shutting it down I somtimes get the following error on one or two threads: -----------------------8<----------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 504, in run self.__target(*self.__args, **self.__kwargs) File "/usr/lib/python2.7/SocketServer.py", line 586, in process_request_thread self.shutdown_request(request) File "/usr/lib/python2.7/SocketServer.py", line 459, in shutdown_request request.shutdown(socket.SHUT_WR) TypeError: shutdown() takes exactly 0 arguments (1 given) --------------------->8------------------------------------- /usr/lib/python2.7/SocketServer.py: ------------8<----------- def shutdown_request(self, request): """Called to shutdown and close an individual request.""" try: #explicitly shutdown. socket.close() merely releases #the socket and waits for GC to perform the actual close. request.shutdown(socket.SHUT_WR) except socket.error: pass #some platforms may raise ENOTCONN here self.close_request(request) ----------------->8------------------------------------------ So I recon its a bug... ---------- messages: 175152 nosy: Erik.G?nther priority: normal severity: normal status: open title: SocketServer call shutdown in the wrong way type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 13:34:07 2012 From: report at bugs.python.org (=?utf-8?q?Erik_G=C3=BCnther?=) Date: Thu, 08 Nov 2012 12:34:07 +0000 Subject: [issue16434] SocketServer call shutdown in the wrong way In-Reply-To: <1352377990.43.0.148428023395.issue16434@psf.upfronthosting.co.za> Message-ID: <1352378047.8.0.304182583638.issue16434@psf.upfronthosting.co.za> Changes by Erik G?nther : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 13:47:34 2012 From: report at bugs.python.org (=?utf-8?q?Erik_G=C3=BCnther?=) Date: Thu, 08 Nov 2012 12:47:34 +0000 Subject: [issue16434] SocketServer call shutdown in the wrong way In-Reply-To: <1352377990.43.0.148428023395.issue16434@psf.upfronthosting.co.za> Message-ID: <1352378854.18.0.421816986546.issue16434@psf.upfronthosting.co.za> Erik G?nther added the comment: Sorry forgot to tell in what versions.. Its in Ubuntu 12.04-1 Python version 2.7.3 Ubuntu package version: 2.7.3-0ubuntu3.1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:18:59 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:18:59 +0000 Subject: [issue15721] PEP 3121, 384 Refactoring applied to tkinter module In-Reply-To: <1345287224.98.0.204885883161.issue15721@psf.upfronthosting.co.za> Message-ID: <1352380739.23.0.457780551555.issue15721@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:19:26 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:19:26 +0000 Subject: [issue15650] PEP 3121, 384 refactoring applied to dbm module In-Reply-To: <1344968074.48.0.47544287235.issue15650@psf.upfronthosting.co.za> Message-ID: <1352380766.18.0.321184594002.issue15650@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:19:59 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:19:59 +0000 Subject: [issue15390] PEP 3121, 384 refactoring applied to datetime module In-Reply-To: <1342647232.82.0.0763290244077.issue15390@psf.upfronthosting.co.za> Message-ID: <1352380799.11.0.0298333817536.issue15390@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:21:13 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:21:13 +0000 Subject: [issue15727] PyType_FromSpecWithBases tp_new bugfix In-Reply-To: <1345391866.4.0.54341725267.issue15727@psf.upfronthosting.co.za> Message-ID: <1352380873.75.0.49669949522.issue15727@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:22:02 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:22:02 +0000 Subject: [issue15725] PyType_FromSpecWithBases bugfix In-Reply-To: <1345381967.41.0.932282182002.issue15725@psf.upfronthosting.co.za> Message-ID: <1352380922.2.0.859804007983.issue15725@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:23:55 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:23:55 +0000 Subject: [issue15848] PEP 3121, 384 Refactoring applied to xxsubtype module In-Reply-To: <1346596167.75.0.401355088857.issue15848@psf.upfronthosting.co.za> Message-ID: <1352381035.75.0.727585157613.issue15848@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:24:29 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:24:29 +0000 Subject: [issue15849] PEP 3121, 384 Refactoring applied to xx module In-Reply-To: <1346596353.57.0.974507844943.issue15849@psf.upfronthosting.co.za> Message-ID: <1352381069.1.0.845179135969.issue15849@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:25:05 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:25:05 +0000 Subject: [issue15711] PEP 3121, 384 Refactoring applied to time module In-Reply-To: <1345152968.9.0.714502729899.issue15711@psf.upfronthosting.co.za> Message-ID: <1352381105.26.0.583883032861.issue15711@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:25:38 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:25:38 +0000 Subject: [issue15733] PEP 3121, 384 Refactoring applied to winapi module In-Reply-To: <1345455591.0.0.532625871045.issue15733@psf.upfronthosting.co.za> Message-ID: <1352381138.69.0.99016609642.issue15733@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:25:57 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:25:57 +0000 Subject: [issue15735] PEP 3121, 384 Refactoring applied to ossaudio module In-Reply-To: <1345456522.27.0.354179103538.issue15735@psf.upfronthosting.co.za> Message-ID: <1352381157.98.0.79099181671.issue15735@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:26:27 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:26:27 +0000 Subject: [issue15734] PEP 3121, 384 Refactoring applied to spwd module In-Reply-To: <1345456351.91.0.162191182976.issue15734@psf.upfronthosting.co.za> Message-ID: <1352381187.18.0.917900801029.issue15734@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:27:40 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:27:40 +0000 Subject: [issue15729] PyStructSequence_NewType enhancement In-Reply-To: <1345407378.13.0.964225258094.issue15729@psf.upfronthosting.co.za> Message-ID: <1352381260.81.0.685902004503.issue15729@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:28:05 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:28:05 +0000 Subject: [issue15653] PEP 3121, 384 refactoring applied to hashopenssl module In-Reply-To: <1344969733.85.0.308586175776.issue15653@psf.upfronthosting.co.za> Message-ID: <1352381285.27.0.204699648791.issue15653@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:28:16 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:28:16 +0000 Subject: [issue15668] PEP 3121, 384 Refactoring applied to random module In-Reply-To: <1345039836.78.0.438193538839.issue15668@psf.upfronthosting.co.za> Message-ID: <1352381296.74.0.0321505518205.issue15668@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:29:02 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:29:02 +0000 Subject: [issue15672] PEP 3121, 384 Refactoring applied to testbuffer module In-Reply-To: <1345042259.48.0.277311619921.issue15672@psf.upfronthosting.co.za> Message-ID: <1352381342.67.0.0133505528215.issue15672@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:34:31 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:34:31 +0000 Subject: [issue15675] PEP 3121, 384 Refactoring applied to array module In-Reply-To: <1345043626.95.0.208765115861.issue15675@psf.upfronthosting.co.za> Message-ID: <1352381671.58.0.447001824521.issue15675@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:34:47 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:34:47 +0000 Subject: [issue15674] PEP 3121, 384 Refactoring applied to thread module In-Reply-To: <1345043183.1.0.612175209954.issue15674@psf.upfronthosting.co.za> Message-ID: <1352381687.97.0.10367744494.issue15674@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:35:27 2012 From: report at bugs.python.org (Ray Donnelly) Date: Thu, 08 Nov 2012 13:35:27 +0000 Subject: [issue16235] Add python-config.sh for use during cross compilation. In-Reply-To: <1350251714.79.0.226527559426.issue16235@psf.upfronthosting.co.za> Message-ID: <1352381727.63.0.170306234729.issue16235@psf.upfronthosting.co.za> Ray Donnelly added the comment: I've addressed everything (local, ABIFLAGS) except the platform includes. AFAICT, platform includes only differs from includes during the Python build phase. This script can only be run post-install. I also added --extension-suffix, tidied it up and allowed it to return multiple values in a single invocation, as per the Python script. ---------- Added file: http://bugs.python.org/file27922/0000-add-python-config-sh.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:35:51 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:35:51 +0000 Subject: [issue15673] PEP 3121, 384 Refactoring applied to testcapi module In-Reply-To: <1345042709.67.0.745658134358.issue15673@psf.upfronthosting.co.za> Message-ID: <1352381751.61.0.598406448984.issue15673@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:36:00 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:36:00 +0000 Subject: [issue15671] PEP 3121, 384 Refactoring applied to struct module In-Reply-To: <1345041779.43.0.428829398339.issue15671@psf.upfronthosting.co.za> Message-ID: <1352381760.17.0.47095790188.issue15671@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:36:48 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:36:48 +0000 Subject: [issue15722] PEP 3121, 384 Refactoring applied to decimal module In-Reply-To: <1345293070.72.0.383930872934.issue15722@psf.upfronthosting.co.za> Message-ID: <1352381808.38.0.0116183237122.issue15722@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:36:58 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:36:58 +0000 Subject: [issue15670] PEP 3121, 384 Refactoring applied to ssl module In-Reply-To: <1345041029.57.0.223670432026.issue15670@psf.upfronthosting.co.za> Message-ID: <1352381818.08.0.166432882125.issue15670@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:37:12 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:37:12 +0000 Subject: [issue15669] PEP 3121, 384 Refactoring applied to sre module In-Reply-To: <1345040333.3.0.897611485757.issue15669@psf.upfronthosting.co.za> Message-ID: <1352381832.78.0.641876790298.issue15669@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:37:28 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:37:28 +0000 Subject: [issue15667] PEP 3121, 384 refactoring applied to pickle module In-Reply-To: <1345038957.09.0.78094807427.issue15667@psf.upfronthosting.co.za> Message-ID: <1352381848.76.0.50023422139.issue15667@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:37:39 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:37:39 +0000 Subject: [issue15666] PEP 3121, 384 refactoring applied to lzma module In-Reply-To: <1345037071.28.0.307240191092.issue15666@psf.upfronthosting.co.za> Message-ID: <1352381859.38.0.34957924019.issue15666@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:37:49 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:37:49 +0000 Subject: [issue15665] PEP 3121, 384 refactoring applied to lsprof module In-Reply-To: <1345035962.65.0.979590709355.issue15665@psf.upfronthosting.co.za> Message-ID: <1352381869.39.0.197060628971.issue15665@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:37:59 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:37:59 +0000 Subject: [issue15662] PEP 3121 refactoring applied to locale module In-Reply-To: <1345021532.95.0.601509802957.issue15662@psf.upfronthosting.co.za> Message-ID: <1352381879.16.0.092882539902.issue15662@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:38:22 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:38:22 +0000 Subject: [issue15655] PEP 384 Refactoring applied to json module In-Reply-To: <1344970398.16.0.223655068768.issue15655@psf.upfronthosting.co.za> Message-ID: <1352381902.69.0.902878219859.issue15655@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:38:34 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:38:34 +0000 Subject: [issue15654] PEP 384 Refactoring applied to bz2 module In-Reply-To: <1344970058.86.0.178955604138.issue15654@psf.upfronthosting.co.za> Message-ID: <1352381914.9.0.0528921817419.issue15654@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:38:45 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:38:45 +0000 Subject: [issue15652] PEP 3121, 384 refactoring applied to gdbm module In-Reply-To: <1344969100.54.0.643991722265.issue15652@psf.upfronthosting.co.za> Message-ID: <1352381925.91.0.899347488901.issue15652@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:39:26 2012 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 08 Nov 2012 13:39:26 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1352381966.61.0.00997014359859.issue16202@psf.upfronthosting.co.za> Changes by Jeroen Demeyer : Added file: http://bugs.python.org/file27923/sys_path_security.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:39:39 2012 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 08 Nov 2012 13:39:39 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1352381979.42.0.959667435546.issue16202@psf.upfronthosting.co.za> Changes by Jeroen Demeyer : Removed file: http://bugs.python.org/file27536/sys_path_security.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:39:49 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:39:49 +0000 Subject: [issue15651] PEP 3121, 384 refactoring applied to elementtree module In-Reply-To: <1344968721.44.0.689766020196.issue15651@psf.upfronthosting.co.za> Message-ID: <1352381989.43.0.624331017708.issue15651@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:39:59 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:39:59 +0000 Subject: [issue15714] PEP 3121, 384 Refactoring applied to grp module In-Reply-To: <1345154158.03.0.0313015513164.issue15714@psf.upfronthosting.co.za> Message-ID: <1352381999.58.0.700854335977.issue15714@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:40:14 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:40:14 +0000 Subject: [issue15713] PEP 3121, 384 Refactoring applied to zipimport module In-Reply-To: <1345154035.4.0.564693100383.issue15713@psf.upfronthosting.co.za> Message-ID: <1352382014.94.0.716055087224.issue15713@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:41:19 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:41:19 +0000 Subject: [issue15712] PEP 3121, 384 Refactoring applied to unicodedata module In-Reply-To: <1345153580.3.0.0817770117233.issue15712@psf.upfronthosting.co.za> Message-ID: <1352382079.63.0.0410750098535.issue15712@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:41:31 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:41:31 +0000 Subject: [issue15709] PEP 3121, 384 Refactoring applied to termios module In-Reply-To: <1345152769.02.0.418210098076.issue15709@psf.upfronthosting.co.za> Message-ID: <1352382091.1.0.73997566467.issue15709@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:41:56 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:41:56 +0000 Subject: [issue15708] PEP 3121, 384 Refactoring applied to socket module In-Reply-To: <1345152388.23.0.37223742756.issue15708@psf.upfronthosting.co.za> Message-ID: <1352382116.89.0.837051327026.issue15708@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:42:20 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:42:20 +0000 Subject: [issue15707] PEP 3121, 384 Refactoring applied to signal module In-Reply-To: <1345151967.47.0.247832517362.issue15707@psf.upfronthosting.co.za> Message-ID: <1352382140.32.0.753699231095.issue15707@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:42:30 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:42:30 +0000 Subject: [issue15706] PEP 3121, 384 Refactoring applied to sha512 module In-Reply-To: <1345151573.12.0.0841074756342.issue15706@psf.upfronthosting.co.za> Message-ID: <1352382150.75.0.629207054792.issue15706@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:42:41 2012 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 08 Nov 2012 13:42:41 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1352382161.22.0.486670439393.issue16202@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: I updated sys_path_security.patch by a newer version. This version will be merged in the Python package of Sage (http://www.sagemath.org/). I realise that it looks unlikely that it will be merged in CPython, but at least it's here for reference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:44:34 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:44:34 +0000 Subject: [issue15705] PEP 3121, 384 Refactoring applied to sha256 module In-Reply-To: <1345151339.81.0.44810343177.issue15705@psf.upfronthosting.co.za> Message-ID: <1352382274.94.0.639353360415.issue15705@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:44:54 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:44:54 +0000 Subject: [issue15704] PEP 3121, 384 Refactoring applied to sha1 module In-Reply-To: <1345151034.85.0.141930979711.issue15704@psf.upfronthosting.co.za> Message-ID: <1352382294.66.0.60119877377.issue15704@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:45:02 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:45:02 +0000 Subject: [issue15703] PEP 3121, 384 Refactoring applied to select module In-Reply-To: <1345150869.96.0.605458116599.issue15703@psf.upfronthosting.co.za> Message-ID: <1352382302.47.0.377877561951.issue15703@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:45:28 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:45:28 +0000 Subject: [issue15700] PEP 3121, 384 Refactoring applied to resource module In-Reply-To: <1345147675.99.0.556449209112.issue15700@psf.upfronthosting.co.za> Message-ID: <1352382328.44.0.202931101312.issue15700@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:45:41 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:45:41 +0000 Subject: [issue15699] PEP 3121, 384 Refactoring applied to readline module In-Reply-To: <1345147381.91.0.560597639191.issue15699@psf.upfronthosting.co.za> Message-ID: <1352382341.38.0.833852639628.issue15699@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:45:49 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:45:49 +0000 Subject: [issue15698] PEP 3121, 384 Refactoring applied to pyexpat module In-Reply-To: <1345146901.0.0.136939773234.issue15698@psf.upfronthosting.co.za> Message-ID: <1352382349.53.0.653086034246.issue15698@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:45:59 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:45:59 +0000 Subject: [issue15697] PEP 3121 refactoring applied to pwd module In-Reply-To: <1345146472.99.0.450289405214.issue15697@psf.upfronthosting.co.za> Message-ID: <1352382359.66.0.884096591245.issue15697@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:46:10 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:46:10 +0000 Subject: [issue15691] PEP 3121, 384 Refactoring applied to posix module In-Reply-To: <1345110485.53.0.856598198463.issue15691@psf.upfronthosting.co.za> Message-ID: <1352382370.14.0.243029557916.issue15691@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:46:19 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:46:19 +0000 Subject: [issue15690] PEP 3121, 384 Refactoring applied to parser module In-Reply-To: <1345108967.12.0.878524641332.issue15690@psf.upfronthosting.co.za> Message-ID: <1352382379.03.0.204354790982.issue15690@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:46:49 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:46:49 +0000 Subject: [issue15689] PEP 3121, 384 Refactoring applied to operator module In-Reply-To: <1345108270.08.0.792336890272.issue15689@psf.upfronthosting.co.za> Message-ID: <1352382409.09.0.832186946244.issue15689@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:47:08 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:47:08 +0000 Subject: [issue15688] PEP 3121 Refactoring applied to nis module In-Reply-To: <1345108030.82.0.709168426802.issue15688@psf.upfronthosting.co.za> Message-ID: <1352382428.73.0.637976534184.issue15688@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:47:21 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:47:21 +0000 Subject: [issue15687] PEP 3121, 384 Refactoring applied to mmap module In-Reply-To: <1345107854.44.0.304444585248.issue15687@psf.upfronthosting.co.za> Message-ID: <1352382441.1.0.095003627178.issue15687@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:47:31 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:47:31 +0000 Subject: [issue15686] PEP 3121, 384 Refactoring applied to md5 module In-Reply-To: <1345107394.8.0.322253629344.issue15686@psf.upfronthosting.co.za> Message-ID: <1352382451.43.0.255017569814.issue15686@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:47:53 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:47:53 +0000 Subject: [issue15685] PEP 3121, 384 Refactoring applied to itertools module In-Reply-To: <1345107130.15.0.109791509014.issue15685@psf.upfronthosting.co.za> Message-ID: <1352382473.62.0.294774745538.issue15685@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:48:11 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:48:11 +0000 Subject: [issue15684] PEP 3121 refactoring applied to fpetest module In-Reply-To: <1345106353.01.0.354070403229.issue15684@psf.upfronthosting.co.za> Message-ID: <1352382491.48.0.586518903444.issue15684@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:49:33 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:49:33 +0000 Subject: [issue15682] PEP 3121 refactoring applied to fpectl module In-Reply-To: <1345106026.62.0.405677878091.issue15682@psf.upfronthosting.co.za> Message-ID: <1352382573.4.0.647158330324.issue15682@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:49:48 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:49:48 +0000 Subject: [issue15681] PEP 3121 refactoring applied to binascii module In-Reply-To: <1345105612.5.0.663032219905.issue15681@psf.upfronthosting.co.za> Message-ID: <1352382588.83.0.00672321709607.issue15681@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:50:11 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Thu, 08 Nov 2012 13:50:11 +0000 Subject: [issue16435] Python 3 doc link to Python 2 FAQ Message-ID: <1352382611.96.0.563665281353.issue16435@psf.upfronthosting.co.za> New submission from Yongzhi Pan: http://docs.python.org/3/tutorial/whatnow.html The last paragraph links to http://www.python.org/doc/faq/, which defaults to Python 2 FAQ. ---------- assignee: docs at python components: Documentation messages: 175156 nosy: docs at python, fossilet priority: normal severity: normal status: open title: Python 3 doc link to Python 2 FAQ versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:50:31 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:50:31 +0000 Subject: [issue15680] PEP 3121 refactoring applied to audioop module In-Reply-To: <1345105315.06.0.844994480517.issue15680@psf.upfronthosting.co.za> Message-ID: <1352382631.3.0.673130801767.issue15680@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:50:43 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 08 Nov 2012 13:50:43 +0000 Subject: [issue15389] PEP 3121, 384 refactoring applied to curses module In-Reply-To: <1342647007.31.0.0527373490627.issue15389@psf.upfronthosting.co.za> Message-ID: <1352382643.85.0.0395026352808.issue15389@psf.upfronthosting.co.za> Changes by Robin Schreiber : ---------- keywords: +pep3121 -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 14:59:17 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Thu, 08 Nov 2012 13:59:17 +0000 Subject: [issue16436] Missing anchor in doc Message-ID: <1352383157.6.0.676029239429.issue16436@psf.upfronthosting.co.za> New submission from Yongzhi Pan: http://docs.python.org/3/library/functions.html#func-frozenset http://docs.python.org/3/library/functions.html#func-set frozenset and set function have no links to their definitions. Also the anchor name is prefixed with func, which is different to other builtin functions. ---------- assignee: docs at python components: Documentation messages: 175157 nosy: docs at python, fossilet priority: normal severity: normal status: open title: Missing anchor in doc versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:04:40 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Thu, 08 Nov 2012 14:04:40 +0000 Subject: [issue16437] issubclass doc improvement Message-ID: <1352383480.96.0.515607744563.issue16437@psf.upfronthosting.co.za> New submission from Yongzhi Pan: http://docs.python.org/3/library/functions.html#issubclass "classinfo may be a tuple of class objects." I suggest make it clear like isinstance, use something like this: classinfo may be a tuple of class objects and such tuples. ---------- assignee: docs at python components: Documentation messages: 175158 nosy: docs at python, fossilet priority: normal severity: normal status: open title: issubclass doc improvement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:07:06 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 08 Nov 2012 14:07:06 +0000 Subject: [issue16436] Missing anchor in doc In-Reply-To: <1352383157.6.0.676029239429.issue16436@psf.upfronthosting.co.za> Message-ID: <1352383626.2.0.866067428826.issue16436@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I guess the reason is that names are classes, not functions. See http://docs.python.org/3/library/functions.html#func-dict also for example. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:11:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 08 Nov 2012 14:11:57 +0000 Subject: [issue16435] Python 3 doc link to Python 2 FAQ In-Reply-To: <1352382611.96.0.563665281353.issue16435@psf.upfronthosting.co.za> Message-ID: <3Xy5z025yfzMPk@mail.python.org> Roundup Robot added the comment: New changeset 64527cb2e13a by Andrew Svetlov in branch '3.2': Issue #16435: Link in tutorial now points to python3 FAQ. http://hg.python.org/cpython/rev/64527cb2e13a New changeset 1d5ca20f73e2 by Andrew Svetlov in branch '3.3': Merge issue #16435: Link in tutorial now points to python3 FAQ. http://hg.python.org/cpython/rev/1d5ca20f73e2 New changeset e1e019b3d903 by Andrew Svetlov in branch 'default': Merge issue #16435: Link in tutorial now points to python3 FAQ. http://hg.python.org/cpython/rev/e1e019b3d903 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:12:59 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 08 Nov 2012 14:12:59 +0000 Subject: [issue16435] Python 3 doc link to Python 2 FAQ In-Reply-To: <1352382611.96.0.563665281353.issue16435@psf.upfronthosting.co.za> Message-ID: <1352383979.93.0.445414338757.issue16435@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:13:22 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 08 Nov 2012 14:13:22 +0000 Subject: [issue16435] Python 3 doc link to Python 2 FAQ In-Reply-To: <1352382611.96.0.563665281353.issue16435@psf.upfronthosting.co.za> Message-ID: <1352384002.14.0.246490441501.issue16435@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:16:18 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 08 Nov 2012 14:16:18 +0000 Subject: [issue16433] unittest.TestCase.assertNotEqual has incorrect docstring. In-Reply-To: <1352365513.53.0.838021442266.issue16433@psf.upfronthosting.co.za> Message-ID: <1352384178.55.0.478352858256.issue16433@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Oops. Sorry, my fault. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:19:31 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Thu, 08 Nov 2012 14:19:31 +0000 Subject: [issue16438] Numeric operator predecence confusing Message-ID: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> New submission from Yongzhi Pan: http://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex "All numeric types (except complex) support the following operations, sorted by ascending priority." It list '-' after '+', '/' after '*'. That is to mean '-' has higher precedence than '+'. That is wrong, and is contradicting with here: http://docs.python.org/3/reference/expressions.html#summary This should be made clear. ---------- assignee: docs at python components: Documentation messages: 175163 nosy: docs at python, fossilet priority: normal severity: normal status: open title: Numeric operator predecence confusing versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:20:27 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 08 Nov 2012 14:20:27 +0000 Subject: [issue16436] Missing anchor in doc In-Reply-To: <1352383157.6.0.676029239429.issue16436@psf.upfronthosting.co.za> Message-ID: <1352384427.9.0.024008922119.issue16436@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:21:03 2012 From: report at bugs.python.org (telmich) Date: Thu, 08 Nov 2012 14:21:03 +0000 Subject: [issue14228] It is impossible to catch sigint on startup in python code In-Reply-To: <1331197536.95.0.87995012042.issue14228@psf.upfronthosting.co.za> Message-ID: <1352384463.92.0.544429562626.issue14228@psf.upfronthosting.co.za> telmich added the comment: I created two diffs to solve the problem: a) a static late init of the signal handler b) configurable late init (using python -z) Both apply against latest mercurial code: [15:20] brief:cpython% ./python -V Python 3.4.0a0 [15:20] brief:cpython% ./python -h | grep -- -z -z : initialise signals after 'import site' [15:20] brief:cpython% Using shellpart.sh (the original one) and using the newly compiled python binary (with -z), works fine: [15:18] brief:python-traceback-test% ./shellpart.sh Indirect child being called Indirect child being called Indirect child being called Indirect child being called Indirect child being called Indirect child being called Indirect child being called Indirect child being called Indirect child being called Indirect child being called Indirect child being called Indirect child being called Indirect child being called Indirect child being called Indirect child being called Indirect child being called Indirect child being called Indirect child being called ^C It would be great if you apply either patch: the static one is fine for me, but changes the behaviour => may not be suited for everyone. Otoh, it feels pretty clean to do a late signal change anyway. the parameter based one lets the user choose whether to use traceback'd version or the "unix default" version -> choose this, if you want to ensure backwards compatibility. ---------- keywords: +patch Added file: http://bugs.python.org/file27924/init_sigs_after_site_static.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:21:27 2012 From: report at bugs.python.org (telmich) Date: Thu, 08 Nov 2012 14:21:27 +0000 Subject: [issue14228] It is impossible to catch sigint on startup in python code In-Reply-To: <1331197536.95.0.87995012042.issue14228@psf.upfronthosting.co.za> Message-ID: <1352384487.87.0.903327594585.issue14228@psf.upfronthosting.co.za> telmich added the comment: + parameter -z based change of behaviour ---------- Added file: http://bugs.python.org/file27925/init_sigs_after_site_parameter_z.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:22:04 2012 From: report at bugs.python.org (telmich) Date: Thu, 08 Nov 2012 14:22:04 +0000 Subject: [issue14228] It is impossible to catch sigint on startup in python code In-Reply-To: <1331197536.95.0.87995012042.issue14228@psf.upfronthosting.co.za> Message-ID: <1352384524.18.0.31025851522.issue14228@psf.upfronthosting.co.za> telmich added the comment: And sorry for the long delay... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:26:52 2012 From: report at bugs.python.org (telmich) Date: Thu, 08 Nov 2012 14:26:52 +0000 Subject: [issue16308] Undocumented (?) behaviour change in argparse from 3.2.3 to 3.3.0 In-Reply-To: <1351070553.1.0.217274613803.issue16308@psf.upfronthosting.co.za> Message-ID: <1352384812.16.0.532530127777.issue16308@psf.upfronthosting.co.za> telmich added the comment: Any news on this one? If the proposed changes are ok for you, I'd implement two patches: - fix set_defaults() to not propagate func= to child parsers => makes it usable - add required= argument to add_subparsers, defaulting to False ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:27:06 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 08 Nov 2012 14:27:06 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1352384826.64.0.821724728653.issue16438@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Precedence ordered per row. Same row, same precedence. I don't see any problem. It is natural math precedence. Closed as invalid. ---------- nosy: +jcea resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:30:58 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 08 Nov 2012 14:30:58 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1352385058.13.0.291339433054.issue16438@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:46:22 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 08 Nov 2012 14:46:22 +0000 Subject: [issue5950] Make zipimport work with zipfile containing comments In-Reply-To: <1241628586.95.0.0801479384158.issue5950@psf.upfronthosting.co.za> Message-ID: <1352385982.39.0.685223774797.issue5950@psf.upfronthosting.co.za> Brett Cannon added the comment: This is a feature request so it won't change in Python 2.7. As for progress, the answer is no as the hope is to eventually replace zipimport with something in pure Python thanks to importlib. ---------- versions: +Python 3.4 -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 15:56:12 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 08 Nov 2012 14:56:12 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1352386572.77.0.580410900715.issue16392@psf.upfronthosting.co.za> Brett Cannon added the comment: The fully qualified name requirement is definitely a design flaw where init functions should just be given the module object with everything already set, just like what @importlib.util.module_for_loader does. Hopefully we can come up with a solution through your current discussion on python-dev. As for the comment, yes at the top of the page makes sense. Whether example code should go somewhere else I don't know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 16:08:23 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Thu, 08 Nov 2012 15:08:23 +0000 Subject: [issue16439] Code not collapsed correctly Message-ID: <1352387303.13.0.2311383576.issue16439@psf.upfronthosting.co.za> New submission from Yongzhi Pan: http://docs.python.org/3/library/stdtypes.html#str.title The second snippets is not collapsed correctly. ---------- assignee: docs at python components: Documentation messages: 175171 nosy: docs at python, fossilet priority: normal severity: normal status: open title: Code not collapsed correctly versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 16:16:08 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 08 Nov 2012 15:16:08 +0000 Subject: [issue16439] Code not collapsed correctly In-Reply-To: <1352387303.13.0.2311383576.issue16439@psf.upfronthosting.co.za> Message-ID: <1352387768.66.0.217293658773.issue16439@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 16:18:05 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Thu, 08 Nov 2012 15:18:05 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1352387885.5.0.00872374468759.issue16438@psf.upfronthosting.co.za> Yongzhi Pan added the comment: I mean the text at the first link need fix. '+' and '-' are not on the same row. And the doc says: "sorted by ascending priority", that means they have ascending priority. The table in the reference is just right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 16:19:21 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 08 Nov 2012 15:19:21 +0000 Subject: [issue16439] Code not collapsed correctly In-Reply-To: <1352387303.13.0.2311383576.issue16439@psf.upfronthosting.co.za> Message-ID: <1352387961.96.0.134997509518.issue16439@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Looks like a sphinx bug :-??. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 16:22:55 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Thu, 08 Nov 2012 15:22:55 +0000 Subject: [issue16440] Exception type Message-ID: <1352388175.4.0.551627843013.issue16440@psf.upfronthosting.co.za> New submission from Yongzhi Pan: http://docs.python.org/3/library/stdtypes.html#methods "Attempting to set a method attribute results in a TypeError being raised." But in the example, if we do c.method.whoami = 'c', we get AttributeError instead of TypeError. ---------- assignee: docs at python components: Documentation messages: 175174 nosy: docs at python, fossilet priority: normal severity: normal status: open title: Exception type versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 16:23:39 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 08 Nov 2012 15:23:39 +0000 Subject: [issue16439] Code not collapsed correctly In-Reply-To: <1352387303.13.0.2311383576.issue16439@psf.upfronthosting.co.za> Message-ID: <1352388219.72.0.477172954466.issue16439@psf.upfronthosting.co.za> Andrew Svetlov added the comment: No, it isn't sphinx bug, it's markup problem. Will commit a fix in few minutes. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 16:26:23 2012 From: report at bugs.python.org (Chris Withers) Date: Thu, 08 Nov 2012 15:26:23 +0000 Subject: [issue16441] range usage in gzip module leads to excessive memory usage. Message-ID: <1352388383.51.0.371199818587.issue16441@psf.upfronthosting.co.za> New submission from Chris Withers: gzip.py uses range instead of xrange in two places. This results in excessive memory usage when opening large .gz files. I actually bumped into this using tarfile. Am I right in thinking that range basically *is* xrange in 3.x? If so, this bug applies only to 2.6 and 2.7. ---------- assignee: cjw296 components: Library (Lib) messages: 175176 nosy: cjw296 priority: normal severity: normal stage: needs patch status: open title: range usage in gzip module leads to excessive memory usage. type: resource usage versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 16:29:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 08 Nov 2012 15:29:14 +0000 Subject: [issue16439] Code not collapsed correctly In-Reply-To: <1352387303.13.0.2311383576.issue16439@psf.upfronthosting.co.za> Message-ID: <3Xy7h950nGzN6c@mail.python.org> Roundup Robot added the comment: New changeset aeb5c53a1d69 by Andrew Svetlov in branch '3.2': Issue #16439: Fix markup in example for stdtypes. http://hg.python.org/cpython/rev/aeb5c53a1d69 New changeset 65499860c6f8 by Andrew Svetlov in branch '3.3': Merge issue #16439: Fix markup in example for stdtypes. http://hg.python.org/cpython/rev/65499860c6f8 New changeset ce6fc4531d26 by Andrew Svetlov in branch 'default': Merge issue #16439: Fix markup in example for stdtypes. http://hg.python.org/cpython/rev/ce6fc4531d26 New changeset f068c3e7743d by Andrew Svetlov in branch '2.7': Issue #16439: Fix markup in example for stdtypes. http://hg.python.org/cpython/rev/f068c3e7743d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 16:29:14 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 08 Nov 2012 15:29:14 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1352388554.94.0.472813916593.issue16438@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: You are right, Yongzhi Pan. Reopening. Not sure how to solve it. Delegating to docs at python. ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 16:29:51 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 08 Nov 2012 15:29:51 +0000 Subject: [issue16439] Code not collapsed correctly In-Reply-To: <1352387303.13.0.2311383576.issue16439@psf.upfronthosting.co.za> Message-ID: <1352388591.61.0.9404781935.issue16439@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 16:58:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 08 Nov 2012 15:58:15 +0000 Subject: [issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long) In-Reply-To: <1202068724.99.0.704404319493.issue2005@psf.upfronthosting.co.za> Message-ID: <1352390295.67.0.262637001959.issue2005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch that introduces four private function for convert an integer to uid_t/gid_t and back, and consistently apply these functions in all cases of uid_t/gid_t conversions. This should fix this issue and issues 4591, 7365, 15301, and a part of 15989. Also found and fixed some other uid_t/gid_t related bugs. Please review and test on Windows and Macintosh. uid_t/gid_t not used on Windows, need to check whether I right disable this part of the code. Macintosh has the peculiarities (I found yet one), need to check whether I missed something. If the patch is good, I will port it to 2.7 and 3.2 (there were many code changes in 3.3). ---------- nosy: +brian.curtin, haypo, hynek, larry, loewis, ned.deily, ronaldoussoren, sandro.tosi, sjoerd, tim.golden stage: needs patch -> patch review Added file: http://bugs.python.org/file27926/posix_uid_gid_conv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 17:14:17 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 08 Nov 2012 16:14:17 +0000 Subject: [issue16441] range usage in gzip module leads to excessive memory usage. In-Reply-To: <1352388383.51.0.371199818587.issue16441@psf.upfronthosting.co.za> Message-ID: <1352391257.45.0.0833121891997.issue16441@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Yes, "range()" in python 3 is equivalent to python 2 "xrange()". 2.6 is in "security only" fix mode. So, you only need to fix 2.7. ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 17:17:58 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 08 Nov 2012 16:17:58 +0000 Subject: [issue16441] range usage in gzip module leads to excessive memory usage. In-Reply-To: <1352388383.51.0.371199818587.issue16441@psf.upfronthosting.co.za> Message-ID: <1352391478.79.0.430788200165.issue16441@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 17:19:08 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 08 Nov 2012 16:19:08 +0000 Subject: [issue16439] Code not collapsed correctly In-Reply-To: <1352387303.13.0.2311383576.issue16439@psf.upfronthosting.co.za> Message-ID: <1352391548.52.0.547057456208.issue16439@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Good catch. I was not aware of this feature :-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 17:48:46 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 08 Nov 2012 16:48:46 +0000 Subject: [issue16442] PATH_MAX vs MAXPATHLEN vs pathconf(..., _PC_PATH_MAX). Message-ID: <1352393326.63.0.0902907389394.issue16442@psf.upfronthosting.co.za> New submission from Trent Nelson: Two immediate issues identified whilst trying to build on HP-UX and IRIX: 1. Our source is wildly inconsistent with regards to using PATH_MAX versus MAXPATHLEN. 2. The current logic in osdefs.h is insufficient for ensuring one or the other always has a value (complicated by issue 1 above). Christian alluded to introducing a PY_PATH_MAX define, which I like. So, my proposal is to fix the logic in osdefs.h so that it works on a wider range of platforms, with the end goal of defining PY_PATH_MAX, then replacing all occurrences of PATH_MAX|MAXPATHLEN in our tree with the new PY_PATH_MAX. (It's worth mentioning that, technically, we shouldn't be using PATH_MAX or MAXPATHLEN. We should be using pathconf(..., _PC_PATH_CONF) to determine the maximum length of the underlying filesystem at runtime and dynamically allocating buffers based on that value. However, that's a huge, non-trivial change. For another day.) ---------- assignee: trent components: Build messages: 175183 nosy: trent priority: normal severity: normal stage: needs patch status: open title: PATH_MAX vs MAXPATHLEN vs pathconf(..., _PC_PATH_MAX). type: compile error versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 17:55:06 2012 From: report at bugs.python.org (Chris Withers) Date: Thu, 08 Nov 2012 16:55:06 +0000 Subject: [issue16441] range usage in gzip module leads to excessive memory usage. In-Reply-To: <1352388383.51.0.371199818587.issue16441@psf.upfronthosting.co.za> Message-ID: <1352393706.11.0.722487567611.issue16441@psf.upfronthosting.co.za> Chris Withers added the comment: Okay, here's the patch. I can't imagine any unit tests are needed or will be impacted by this. I do have commit rights, am I good to commit this? ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file27927/gzip.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 20:14:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 08 Nov 2012 19:14:11 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352402051.73.0.515962711671.issue16218@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think here should be used something like CommonTest.test_nonascii_abspath() in Lib/test/test_genericpath.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 20:21:01 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Thu, 08 Nov 2012 19:21:01 +0000 Subject: [issue16441] range usage in gzip module leads to excessive memory usage. In-Reply-To: <1352388383.51.0.371199818587.issue16441@psf.upfronthosting.co.za> Message-ID: <1352402461.95.0.198111435558.issue16441@psf.upfronthosting.co.za> Nadeem Vawda added the comment: Looks good to me. Go ahead. You needn't add or change any tests for this, but you should run the existing tests before committing, just to be safe. ---------- nosy: +nadeem.vawda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 20:23:59 2012 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 08 Nov 2012 19:23:59 +0000 Subject: [issue13429] provide __file__ to extension init function In-Reply-To: <1321631218.51.0.537222078649.issue13429@psf.upfronthosting.co.za> Message-ID: <1352402639.03.0.846890832098.issue13429@psf.upfronthosting.co.za> Stefan Behnel added the comment: Triggered discussion on python-dev: http://thread.gmane.org/gmane.comp.python.devel/135764 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 21:07:12 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 Nov 2012 20:07:12 +0000 Subject: [issue16443] Add docstrings to regular expression match objects Message-ID: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> New submission from Raymond Hettinger: The match objects currently do not have useful docstrings. An easy task is to add docstrings modeled after the text in the regular docs. import re mo = re.search('abc', 'abc') help(mo) ---------- assignee: docs at python components: Documentation keywords: easy messages: 175188 nosy: docs at python, rhettinger priority: normal severity: normal status: open title: Add docstrings to regular expression match objects type: enhancement versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 21:42:47 2012 From: report at bugs.python.org (Meador Inge) Date: Thu, 08 Nov 2012 20:42:47 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1352407367.6.0.28506752453.issue16438@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 22:02:35 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 08 Nov 2012 21:02:35 +0000 Subject: [issue16436] Missing anchor in doc In-Reply-To: <1352383157.6.0.676029239429.issue16436@psf.upfronthosting.co.za> Message-ID: <1352408555.38.0.840943227369.issue16436@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Currently, the built-in types are not treated consistently as to whether their constructors are documented in the "Built-in Functions" or "Built-in Types" page. There are some open issues related to this topic (see, for example, issue 16209). For the purposes of this issue though, yes, I agree that the abbreviated built-in function versions of the documentation for set and frozenset should contain direct links to the more complete constructor documentation in the "Built-in Types" page (as is already done for dict, for example, as Andrew pointed out). ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 22:03:53 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 08 Nov 2012 21:03:53 +0000 Subject: [issue16436] Missing anchor in doc In-Reply-To: <1352383157.6.0.676029239429.issue16436@psf.upfronthosting.co.za> Message-ID: <1352408633.5.0.58578169849.issue16436@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 22:21:28 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 08 Nov 2012 21:21:28 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1352409688.48.0.159679310602.issue9584@psf.upfronthosting.co.za> R. David Murray added the comment: Given the backward compatibility concerns, and the fact that brace expansion and wildcard expansion are conceptually separate operations, perhaps what we should have a is a glob.expand_braces (or some such name) function? (Note: I haven't looked at whether or not this would actually work as an API, I'm just throwing out an idea.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 22:31:11 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 08 Nov 2012 21:31:11 +0000 Subject: [issue16436] Link directly to set and frozenset in built-in function docs In-Reply-To: <1352383157.6.0.676029239429.issue16436@psf.upfronthosting.co.za> Message-ID: <1352410271.93.0.464458940099.issue16436@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- title: Missing anchor in doc -> Link directly to set and frozenset in built-in function docs type: -> enhancement versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 22:39:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 08 Nov 2012 21:39:25 +0000 Subject: [issue16436] Link directly to set and frozenset in built-in function docs In-Reply-To: <1352383157.6.0.676029239429.issue16436@psf.upfronthosting.co.za> Message-ID: <1352410765.82.0.653775563323.issue16436@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I recommend copying for set and frozenset the documentation pattern for dict (and in particular by stating explicitly in its own sentence that the object is a class): http://docs.python.org/3/library/functions.html#func-dict ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 22:56:57 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 21:56:57 +0000 Subject: [issue16443] Add docstrings to regular expression match objects In-Reply-To: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> Message-ID: <1352411817.44.0.529435330408.issue16443@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett stage: -> needs patch versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 22:58:55 2012 From: report at bugs.python.org (Sasha B) Date: Thu, 08 Nov 2012 21:58:55 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352411935.14.0.517303886359.issue14621@psf.upfronthosting.co.za> Sasha B added the comment: Ruby uses the Murmur hash for some types (string & integer at least): http://murmurhash.googlepages.com/ src: http://stackoverflow.com/a/3270836/1332819 The Perl hash implementation: http://cpansearch.perl.org/src/NWCLARK/perl-5.8.8/hv.c PHP5 hash implementation: http://lxr.php.net/xref/PHP_5_4/ext/hash/hash.c The Probe() function for V8's Javascript implementation is HW-specific: Hash functions: http://code.google.com/searchframe#W9JxUuHYyMg/trunk/src/hashmap.h&q=Probe%20package:v8%5C.googlecode%5C.com&l=134 Probe() function: http://code.google.com/searchframe#search%26q%3DProbe%20package%3Av8%5C.googlecode%5C.com ---------- nosy: +sbermeister _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 23:01:20 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 22:01:20 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1352412080.13.0.366920804113.issue16438@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 23:02:36 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 08 Nov 2012 22:02:36 +0000 Subject: [issue15861] ttk.Treeview "unmatched open brace in list" In-Reply-To: <1346794903.35.0.326071924778.issue15861@psf.upfronthosting.co.za> Message-ID: <1352412156.85.0.854415932211.issue15861@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 23:03:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 08 Nov 2012 22:03:30 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1352412210.39.0.38494691187.issue9584@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Given the backward compatibility concerns, and the fact that brace expansion and wildcard expansion are conceptually separate operations, perhaps what we should have a is a glob.expand_braces (or some such name) function? In this case it may be appropriate to place this function into shutil or string module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 23:04:23 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 08 Nov 2012 22:04:23 +0000 Subject: [issue15861] ttk.Treeview "unmatched open brace in list" In-Reply-To: <1346794903.35.0.326071924778.issue15861@psf.upfronthosting.co.za> Message-ID: <1352412263.6.0.83945114918.issue15861@psf.upfronthosting.co.za> Zachary Ware added the comment: Just tested on 3.3 and this still happens with that version of Tkinter, which should mean the same happens in 3.2 and 3.4. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 23:07:32 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 22:07:32 +0000 Subject: [issue16441] range usage in gzip module leads to excessive memory usage. In-Reply-To: <1352388383.51.0.371199818587.issue16441@psf.upfronthosting.co.za> Message-ID: <1352412452.45.0.558747116656.issue16441@psf.upfronthosting.co.za> Ezio Melotti added the comment: Also remember to add a Misc/NEWS entry (and/or run `make patchcheck`) before committing. If this only affects 2.7 there's no need to merge anything with 3.x, so you can just commit on 2.7 and push. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 23:10:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 08 Nov 2012 22:10:02 +0000 Subject: [issue15861] ttk.Treeview "unmatched open brace in list" In-Reply-To: <1346794903.35.0.326071924778.issue15861@psf.upfronthosting.co.za> Message-ID: <1352412602.32.0.796256903548.issue15861@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 23:10:04 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 08 Nov 2012 22:10:04 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352412604.67.0.862605538531.issue14621@psf.upfronthosting.co.za> Christian Heimes added the comment: I considered MurMur a year ago, too. Nowadays I don't think it's an option anymore. JPA and DJB have released a C++ program that is able to generate lots of collisions: https://www.131002.net/siphash/ C++ program to find universal (key-independent) multicollisions for MurmurHash3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 23:10:22 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 08 Nov 2012 22:10:22 +0000 Subject: [issue15133] tkinter.BooleanVar.get() behavior and docstring disagree In-Reply-To: <1340357266.8.0.524344970378.issue15133@psf.upfronthosting.co.za> Message-ID: <1352412622.63.0.619380625188.issue15133@psf.upfronthosting.co.za> Zachary Ware added the comment: I don't think 2.7 and 3.3 were meant to be removed from this one and we're now in 3.4 time. ---------- nosy: +zach.ware versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 23:16:06 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 08 Nov 2012 22:16:06 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352412966.95.0.683368643191.issue14621@psf.upfronthosting.co.za> Christian Heimes added the comment: >From the header of murmurcollisions.cc: * multicollisions for MurmurHash3 * * MurmurHash3 C++ implementation is available at * http://code.google.com/p/smhasher/wiki/MurmurHash3 * * the function Murmur3Multicollisions finds many different inputs * hashing to the same 32-bit value (multicollision) * * example output: * 32-bit seed 7a0e823a * 4-multicollision * 16-byte inputs * MurmurHash3_x86_32( bdd0c04b5c3995827482773b12acab35 ) = 94d7cf1b * MurmurHash3_x86_32( 652fa0565c3946be7482773b12acab35 ) = 94d7cf1b * MurmurHash3_x86_32( bdd0c04b5c399582cc23983012ac5c71 ) = 94d7cf1b * MurmurHash3_x86_32( 652fa0565c3946becc23983012ac5c71 ) = 94d7cf1b * * the multicollisions found are "universal": they work for any seed/key * * authors: * Jean-Philippe Aumasson, Daniel J. Bernstein I consider MurMur3 busted and unsuitable for our purpose. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 23:17:35 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 08 Nov 2012 22:17:35 +0000 Subject: [issue16435] Python 3 doc link to Python 2 FAQ In-Reply-To: <1352382611.96.0.563665281353.issue16435@psf.upfronthosting.co.za> Message-ID: <1352413055.01.0.611819793696.issue16435@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Isn't it better to do this type of within-doc linking with a :ref: (which would prevent issues like this)? ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 23:29:03 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 22:29:03 +0000 Subject: [issue16440] Exception type In-Reply-To: <1352388175.4.0.551627843013.issue16440@psf.upfronthosting.co.za> Message-ID: <1352413743.31.0.136297124563.issue16440@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 23:36:16 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 08 Nov 2012 22:36:16 +0000 Subject: [issue16409] urlretrieve regression: first call returns block size as 0 In-Reply-To: <1352068025.04.0.157597994471.issue16409@psf.upfronthosting.co.za> Message-ID: <1352414176.53.0.132117817041.issue16409@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 23:52:14 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 08 Nov 2012 22:52:14 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX Message-ID: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached patch changes how support.TESTFN_UNDECODABLE is computed on UNIX: use the filesystem encoding in *strict* mode, not using the surrogateescape error handler. So we can use support.TESTFN_UNDECODABLE to check if a function uses correctly the surrogateescape error handler and/or check if it behaves correctly with non-ASCII characters. The patch uses also support.TESTFN_UNDECODABLE (only on UNIX) in test_cmd_line_script.test_non_ascii() to also check that the fix for #16218 works with UTF-8 locale encoding. Please test the patch on UNIX, Windows and Mac OS X. We may also use support.TESTFN_UNDECODABLE in test_cmd_line_script.test_non_ascii() on Windows, I will check. Windows has some strange behaviour with undecodable characters: some of them are replaced a character with a similar glyph. ---------- components: Tests, Unicode files: support_undecodable.patch keywords: patch messages: 175200 nosy: ezio.melotti, haypo, serhiy.storchaka priority: normal severity: normal status: open title: Use support.TESTFN_UNDECODABLE on UNIX versions: Python 3.4 Added file: http://bugs.python.org/file27928/support_undecodable.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 8 23:53:12 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 08 Nov 2012 22:53:12 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1352415192.04.0.525573823665.issue16444@psf.upfronthosting.co.za> STINNER Victor added the comment: The patch contains two print to help debugging the patch itself, these print statements must be removed later. +print("TESTFN_UNDECODABLE = %a" % TESTFN_UNDECODABLE) +print("TESTFN_NONASCII = %a" % TESTFN_NONASCII) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 00:04:16 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 08 Nov 2012 23:04:16 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1352415856.95.0.946023350863.issue16444@psf.upfronthosting.co.za> STINNER Victor added the comment: > We may also use support.TESTFN_UNDECODABLE > in test_cmd_line_script.test_non_ascii() on Windows Oh, subprocess doesn't support passing bytes arguments to a program anymore (since Python 3.0). http://bugs.python.org/issue4036#msg100376 So it's better to use TESTFN_NONASCII instead for this test ;-) It confirms that we need two constants depending on the context. It dependson the platform and how the data is read/written: sometimes undecodable characters are supported on any platform (ex: base64 encoder), sometimes undecodable characters are not supported (ex: distutils expects valid metadata), sometimes it depends on the platform (ex: this test). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 00:05:10 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Nov 2012 23:05:10 +0000 Subject: [issue16445] SEGFAULT when deleting Exception.message Message-ID: <1352415910.77.0.640632287013.issue16445@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc: The script below segfaults cpython2.7. The cause is in BaseException_set_message(), which calls Py_XDECREF(self->message) and thus can call back into Python code with a dangling PyObject* pointer. Py_CLEAR should be used instead. class Nasty(str): def __del__(self): del e.message e = ValueError(Nasty("msg")) e.args = () del e.message del e ---------- messages: 175203 nosy: amaury.forgeotdarc priority: normal severity: normal status: open title: SEGFAULT when deleting Exception.message type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 00:09:48 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 08 Nov 2012 23:09:48 +0000 Subject: [issue16440] Exception type In-Reply-To: <1352388175.4.0.551627843013.issue16440@psf.upfronthosting.co.za> Message-ID: <3XyKvb6N8wzPsn@mail.python.org> Roundup Robot added the comment: New changeset 8b181c75792f by Ezio Melotti in branch '2.7': #16440: fix exception type and clarify example. http://hg.python.org/cpython/rev/8b181c75792f New changeset bb39ca6bcd7a by Ezio Melotti in branch '3.2': #16440: fix exception type and clarify example. http://hg.python.org/cpython/rev/bb39ca6bcd7a New changeset 8c7f2f6f3375 by Ezio Melotti in branch '3.3': #16440: merge with 3.2. http://hg.python.org/cpython/rev/8c7f2f6f3375 New changeset d170844a363f by Ezio Melotti in branch 'default': #16440: merge with 3.3. http://hg.python.org/cpython/rev/d170844a363f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 00:09:53 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 08 Nov 2012 23:09:53 +0000 Subject: [issue16446] pdb raises BdbQuit on 'quit' when started with set_trace Message-ID: <1352416193.43.0.475440625813.issue16446@psf.upfronthosting.co.za> New submission from Xavier de Gaye: Also, the two oldest frames of the stack are identical (sic), according to the printed traceback. $ python3 foo.py > /tmp/foo.py(3)() -> x = 1 (Pdb) import sys; print(sys.version) 3.2.2 (default, Dec 27 2011, 17:35:55) [GCC 4.3.2] (Pdb) list 1 import pdb 2 pdb.set_trace() 3 -> x = 1 4 [EOF] (Pdb) quit Traceback (most recent call last): File "foo.py", line 3, in x = 1 File "foo.py", line 3, in x = 1 File "/usr/local/lib/python3.2/bdb.py", line 46, in trace_dispatch return self.dispatch_line(frame) File "/usr/local/lib/python3.2/bdb.py", line 65, in dispatch_line if self.quitting: raise BdbQuit bdb.BdbQuit $ ---------- components: Library (Lib) messages: 175205 nosy: xdegaye priority: normal severity: normal status: open title: pdb raises BdbQuit on 'quit' when started with set_trace type: behavior versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 00:10:57 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 23:10:57 +0000 Subject: [issue16440] Exception type In-Reply-To: <1352388175.4.0.551627843013.issue16440@psf.upfronthosting.co.za> Message-ID: <1352416257.6.0.690785827053.issue16440@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 00:11:12 2012 From: report at bugs.python.org (Stefan Stuhr) Date: Thu, 08 Nov 2012 23:11:12 +0000 Subject: [issue15861] ttk.Treeview "unmatched open brace in list" In-Reply-To: <1346794903.35.0.326071924778.issue15861@psf.upfronthosting.co.za> Message-ID: <1352416272.83.0.564875101142.issue15861@psf.upfronthosting.co.za> Stefan Stuhr added the comment: I think this is a case of faulty over-engineering in the ttk module. The following works just fine (imports converted to Python3): import tkinter as tk import tkinter.ttk as ttk root = tk.Tk() tree = ttk.Treeview(root, columns="1 2 3") tree.tk.call(tree, "insert", "", "end" , "-values", ("one","two","bam! {")) tree.grid() root.mainloop() ---------- nosy: +Stefan.Stuhr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 00:29:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 23:29:42 +0000 Subject: [issue15680] PEP 3121 refactoring applied to audioop module In-Reply-To: <1345105315.06.0.844994480517.issue15680@psf.upfronthosting.co.za> Message-ID: <1352417382.25.0.424007417515.issue15680@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +patch stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 00:42:48 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 08 Nov 2012 23:42:48 +0000 Subject: [issue16445] SEGFAULT when deleting Exception.message In-Reply-To: <1352415910.77.0.640632287013.issue16445@psf.upfronthosting.co.za> Message-ID: <1352418168.27.0.157573836853.issue16445@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 00:46:28 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Nov 2012 23:46:28 +0000 Subject: [issue16437] issubclass doc improvement In-Reply-To: <1352383480.96.0.515607744563.issue16437@psf.upfronthosting.co.za> Message-ID: <1352418388.79.0.681492891513.issue16437@psf.upfronthosting.co.za> Ezio Melotti added the comment: While this is documented for isinstance, I'm not sure it should be advertised too much, as it seems to me an implementation detail and doesn't seem too useful in practice. This is a side-effect of the fact that isinstance(x, (A, B, ...)) is equivalent to isinstance(x, A) or isinstance(x, B) or ... and therefore isinstance(x, (A, (B, C))) is equivalent to isinstance(x, A) or isinstance(x, (B, C)) which in turn is equivalent to isinstance(x, A) or (isinstance(x, B) or isinstance(x, C)) While this behavior seems intentional [0], it doesn't seem to be tested [1]. FTR this is supported by PyPy too. [0]: http://hg.python.org/cpython/file/default/Objects/abstract.c#l2494 [1]: http://hg.python.org/cpython/file/default/Lib/test/test_builtin.py#l704 ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 00:50:56 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 08 Nov 2012 23:50:56 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1352418656.65.0.604620905715.issue16444@psf.upfronthosting.co.za> STINNER Victor added the comment: > Please test the patch on UNIX, Windows and Mac OS X. The full test suite pass on: * Linux with UTF-8 locale encoding * Linux with ASCII locale encoding * Windows with cp932 ANSI code page * Mac OS 10.8 with ASCII locale encoding (and utf-8/surrogateescape for the filesystem encoding) ($LANG, $LC_ALL, $LC_CTYPE are not set) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 01:09:20 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 09 Nov 2012 00:09:20 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ Message-ID: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc: Following script crashes all versions of Python. Cause is the "Py_DECREF(et->ht_name)" in type_set_name(). class Nasty(str): def __del__(self): C.__name__ = "other" class C(object): pass C.__name__ = Nasty("abc") C.__name__ = "normal" ---------- messages: 175210 nosy: amaury.forgeotdarc priority: normal severity: normal status: open title: SEGFAULT when setting type.__name__ type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 01:59:14 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 09 Nov 2012 00:59:14 +0000 Subject: [issue16445] SEGFAULT when deleting Exception.message In-Reply-To: <1352415910.77.0.640632287013.issue16445@psf.upfronthosting.co.za> Message-ID: <1352422754.13.0.312175068446.issue16445@psf.upfronthosting.co.za> STINNER Victor added the comment: According to Amaury an IRC, replacing "Py_XDECREF(obj->attr); obj->attr = NULL;" pattern with "Py_CLEAR(obj->attr);" should fix the issue. Instead of opening one issue per occurence of this pattern, it is possible to write a semantic patch to do the replace on the whole CPython project using the Coccinelle tool. http://coccinelle.lip6.fr/ See for example attached py_clear.spatch semantic patch. Install coccinelle and run "spatch -in_place -sp_file py_clear.spatch -dir .". The result is the attached patch (python2.7_pyclear.patch). The patch is huge! Mac/Modules/_scproxy.c | 2 +- Mac/Modules/carbonevt/_CarbonEvtmodule.c | 3 +- Mac/Modules/list/_Listmodule.c | 3 +- Modules/_bsddb.c | 48 ++++--------- Modules/_ctypes/_ctypes.c | 18 +--- Modules/_elementtree.c | 8 +- Modules/_hotshot.c | 3 +- Modules/_localemodule.c | 3 +- Modules/_sqlite/connection.c | 6 +- Modules/_sqlite/cursor.c | 12 +-- Modules/_tkinter.c | 6 +- Modules/almodule.c | 3 +- Modules/binascii.c | 21 ++---- Modules/bz2module.c | 12 +-- Modules/cPickle.c | 3 +- Modules/cdmodule.c | 18 +--- Modules/cjkcodecs/multibytecodec.c | 3 +- Modules/datetimemodule.c | 12 +-- Modules/flmodule.c | 12 +-- Modules/fmmodule.c | 3 +- Modules/nismodule.c | 3 +- Modules/posixmodule.c | 33 +++------ Modules/pyexpat.c | 6 +- Modules/readline.c | 7 +- Modules/selectmodule.c | 3 +- Modules/signalmodule.c | 9 +- Modules/svmodule.c | 3 +- Modules/syslogmodule.c | 3 +- Modules/zlibmodule.c | 18 +--- Objects/abstract.c | 6 +- Objects/classobject.c | 18 +--- Objects/descrobject.c | 3 +- Objects/exceptions.c | 3 +- Objects/fileobject.c | 12 +-- Objects/frameobject.c | 3 +- Objects/genobject.c | 3 +- Objects/longobject.c | 3 +- Objects/object.c | 6 +- Objects/stringobject.c | 12 +-- Objects/tupleobject.c | 6 +- Objects/typeobject.c | 12 +-- Objects/unicodeobject.c | 12 +-- Python/Python-ast.c | 381 ++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------- Python/bltinmodule.c | 12 +-- Python/errors.c | 3 +- Python/import.c | 6 +- Python/marshal.c | 12 +-- Python/modsupport.c | 3 +- Python/structmember.c | 3 +- Python/sysmodule.c | 9 +- RISCOS/Modules/drawfmodule.c | 2 +- RISCOS/Modules/swimodule.c | 2 +- 52 files changed, 275 insertions(+), 541 deletions(-) ---------- Added file: http://bugs.python.org/file27929/py_clear.spatch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 01:59:43 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 09 Nov 2012 00:59:43 +0000 Subject: [issue16445] SEGFAULT when deleting Exception.message In-Reply-To: <1352415910.77.0.640632287013.issue16445@psf.upfronthosting.co.za> Message-ID: <1352422783.54.0.242852303391.issue16445@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- keywords: +patch Added file: http://bugs.python.org/file27930/python27_pyclear.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 02:01:45 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 09 Nov 2012 01:01:45 +0000 Subject: [issue16445] SEGFAULT when deleting Exception.message In-Reply-To: <1352415910.77.0.640632287013.issue16445@psf.upfronthosting.co.za> Message-ID: <1352422905.09.0.489322672127.issue16445@psf.upfronthosting.co.za> STINNER Victor added the comment: The "spatch" doesn't match the following macro: Modules/_testcapimodule.c:#define UNBIND(X) Py_DECREF(X); (X) = NULL -- Python/Python-ast.c is autogenerated from Parser/asdl_c.py, the .py file should be fixed instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 02:04:14 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 09 Nov 2012 01:04:14 +0000 Subject: [issue16445] SEGFAULT when deleting Exception.message In-Reply-To: <1352415910.77.0.640632287013.issue16445@psf.upfronthosting.co.za> Message-ID: <1352423054.1.0.115206897589.issue16445@psf.upfronthosting.co.za> STINNER Victor added the comment: python27_pyclear.patch does fix the use case described in msg175203, but it doesn't fix #16447. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 02:14:50 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 09 Nov 2012 01:14:50 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <1352423690.29.0.110802131091.issue16447@psf.upfronthosting.co.za> STINNER Victor added the comment: It looks like the bug is the pattern "Py_DECREF(obj->attr); obj->attr = new_value;". Replacing it with "{ PyObject *tmp = obj->attr; obj->attr = new_value; Py_DECREF(tmp); }" does fix this specific issue. We can use the coccinelle tool to replace all such patterns in the whole CPython code base using attached py_decref_replace.spatch "semantic patch". See also issue #16445, I proposed a similar idea (and another semantic patch). Attached python27_decref_replace.patch patch is the result of the command "spatch -in_place -sp_file py_decref_replace.spatch -dir .". The patch is quite huge, I didn't read it yet :-) Mac/Modules/carbonevt/_CarbonEvtmodule.c | 7 +++++-- Mac/Modules/list/_Listmodule.c | 7 +++++-- Modules/_bsddb.c | 42 ++++++++++++++++++++++++++++++------------ Modules/_csv.c | 7 +++++-- Modules/_ctypes/_ctypes.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------- Modules/_curses_panel.c | 7 +++++-- Modules/_elementtree.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------- Modules/_json.c | 7 +++++-- Modules/_sqlite/connection.c | 28 ++++++++++++++++++++-------- Modules/_sqlite/cursor.c | 42 ++++++++++++++++++++++++++++++------------ Modules/bz2module.c | 9 +++++---- Modules/cPickle.c | 36 +++++++++++++++++++++++++++--------- Modules/flmodule.c | 28 ++++++++++++++++++++-------- Modules/itertoolsmodule.c | 7 +++++-- Modules/selectmodule.c | 7 +++++-- Modules/signalmodule.c | 7 +++++-- Modules/svmodule.c | 7 +++++-- Modules/zlibmodule.c | 23 +++++++++++++++-------- Objects/descrobject.c | 7 +++++-- Objects/exceptions.c | 21 +++++++++++++++------ Objects/fileobject.c | 14 ++++++++++---- Objects/funcobject.c | 7 +++++-- Objects/typeobject.c | 21 +++++++++++++++------ Python/ceval.c | 7 +++++-- Python/sysmodule.c | 7 +++++-- 25 files changed, 382 insertions(+), 152 deletions(-) ---------- nosy: +haypo Added file: http://bugs.python.org/file27931/py_decref_replace.spatch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 02:15:08 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 09 Nov 2012 01:15:08 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <1352423708.69.0.373638446522.issue16447@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- keywords: +patch Added file: http://bugs.python.org/file27932/python27_decref_replace.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 02:16:48 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 09 Nov 2012 01:16:48 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <1352423808.05.0.0888430373979.issue16447@psf.upfronthosting.co.za> STINNER Victor added the comment: We should maybe use a macro (ex: Py_DECREC_REPLACE) instead of copying the pattern "{ PyObject *tmp = obj->attr; obj->attr = new_value; Py_DECREF(tmp); }". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 02:18:29 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 09 Nov 2012 01:18:29 +0000 Subject: [issue16445] SEGFAULT when deleting Exception.message In-Reply-To: <1352415910.77.0.640632287013.issue16445@psf.upfronthosting.co.za> Message-ID: <1352423909.59.0.679539006117.issue16445@psf.upfronthosting.co.za> STINNER Victor added the comment: py_clear.spatch replaces: Py_DECREF(obj->attr); obj->attr = NULL; but also: Py_DECREF(obj); obj = NULL; If the second pattern is not dangerous, py_clear.spatch can be modified to only match the first pattern: see py_decref_replace.spatch of issue #16447 for an example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 09:02:41 2012 From: report at bugs.python.org (Tim Golden) Date: Fri, 09 Nov 2012 08:02:41 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1352448161.58.0.116055448369.issue9584@psf.upfronthosting.co.za> Changes by Tim Golden : Removed file: http://bugs.python.org/file27894/0003-reworked-issue9584.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 09:06:50 2012 From: report at bugs.python.org (Tim Golden) Date: Fri, 09 Nov 2012 08:06:50 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1352448410.33.0.538963204939.issue9584@psf.upfronthosting.co.za> Tim Golden added the comment: Given that this isn't going to go ahead in its current form, and will need wider discussion on python-dev, I'm unassigning myself and I've removed the flawed version of the patch which I'd posted. ---------- assignee: tim.golden -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 10:47:57 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 09:47:57 +0000 Subject: [issue11313] Speed up default encode()/decode() In-Reply-To: <1298586589.12.0.407554806858.issue11313@psf.upfronthosting.co.za> Message-ID: <1352454477.02.0.460177432706.issue11313@psf.upfronthosting.co.za> Ezio Melotti added the comment: Agreed, closing. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 11:52:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 09 Nov 2012 10:52:15 +0000 Subject: [issue13301] the script Tools/i18n/msgfmt.py allows arbitrary code execution via po files In-Reply-To: <1320052696.17.0.926291745102.issue13301@psf.upfronthosting.co.za> Message-ID: <3XydV65CzHzRBV@mail.python.org> Roundup Robot added the comment: New changeset 058ff991bdcb by Ezio Melotti in branch '2.7': #13301: use ast.literal_eval() instead of eval() in Tools/i18n/msgfmt.py. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/058ff991bdcb New changeset 2fa338374719 by Ezio Melotti in branch '3.2': #13301: use ast.literal_eval() instead of eval() in Tools/i18n/msgfmt.py. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/2fa338374719 New changeset ea2cb9b69fd9 by Ezio Melotti in branch '3.3': #13301: merge with 3.2. http://hg.python.org/cpython/rev/ea2cb9b69fd9 New changeset aa02f7be68f6 by Ezio Melotti in branch 'default': #13301: merge with 3.3. http://hg.python.org/cpython/rev/aa02f7be68f6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 11:53:39 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 10:53:39 +0000 Subject: [issue13301] the script Tools/i18n/msgfmt.py allows arbitrary code execution via po files In-Reply-To: <1320052696.17.0.926291745102.issue13301@psf.upfronthosting.co.za> Message-ID: <1352458419.84.0.615997198687.issue13301@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 12:00:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Nov 2012 11:00:23 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1352458823.64.0.964579670645.issue16444@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Try b'\x81', b'\x98', b'\xae', b'\xd5', b'\xff'. They are undecodable in all 1-byte encodings. b'\x81' : shift_jis_2004 shift_jis shift_jisx0213 cp869 cp874 cp932 cp1250 cp1252 cp1253 cp1254 cp1255 cp1257 cp1258 b'\x98' : shift_jis_2004 shift_jis shift_jisx0213 cp874 cp932 cp1250 cp1251 cp1253 cp1257 b'\xae' : iso8859-3 iso8859-6 iso8859-7 cp424 b'\xd5' : iso8859-8 cp856 cp857 b'\xff' : hp-roman8 iso8859-6 iso8859-7 iso8859-8 iso8859-11 shift_jis_2004 shift_jis shift_jisx0213 tis-620 cp864 cp874 cp1253 cp1255 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 12:09:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Nov 2012 11:09:49 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1352459389.25.0.372260896268.issue16444@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Try b'\xed\xb2\x80' and b'\xed\xb4\x80' for UTF-8 (on Unix and Mac OS X). b'\xed\xb2\x80' is b'\x80'.decode('utf-8', 'surrogateescape').encode('utf-8', 'surrogatepass'). b'\xed\xb4\x80' is '\udd00'.encode('utf-8', 'surrogatepass') and '\udd00' can't be encoded with surrogateescape. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 12:14:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Nov 2012 11:14:20 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1352459660.69.0.86234285638.issue16444@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The full test suite pass on: The matter is not only in the fact that tests passed. They should fail if the original bug occurs again. Have you tried to restore the bugs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 12:40:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Nov 2012 11:40:44 +0000 Subject: [issue16445] SEGFAULT when deleting Exception.message In-Reply-To: <1352415910.77.0.640632287013.issue16445@psf.upfronthosting.co.za> Message-ID: <1352461244.49.0.44828020215.issue16445@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The Coccinelle looks as an amazing tool! I propose split a patch on several patches (autogenerated code, attributes clearing, other pointer expressions (as *exceptionObject or unicode_latin1[i]) clearing, and local pointers clearing at the end) and commit they separately. ---------- components: +Extension Modules, Interpreter Core nosy: +serhiy.storchaka stage: -> needs patch versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 12:49:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Nov 2012 11:49:03 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <1352461743.26.0.783427037229.issue16447@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, the macro appropriate here. In Modules/zlibmodule.c this patterns should be fixed by patch for issue16350. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 12:49:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Nov 2012 11:49:26 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <1352461766.26.0.662301699876.issue16447@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Extension Modules, Interpreter Core stage: -> needs patch versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 13:04:46 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 12:04:46 +0000 Subject: [issue16335] Integer overflow in unicode-escape decoder In-Reply-To: <1351292121.99.0.943463007307.issue16335@psf.upfronthosting.co.za> Message-ID: <1352462685.99.0.0121817411774.issue16335@psf.upfronthosting.co.za> Ezio Melotti added the comment: Tests would be good. You could use test.support.bigmemtest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 13:21:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 12:21:55 +0000 Subject: [issue16163] Wrong name in Lib/pkgutil.py:iter_importers In-Reply-To: <1349697246.97.0.772309039282.issue16163@psf.upfronthosting.co.za> Message-ID: <1352463715.47.0.213545259621.issue16163@psf.upfronthosting.co.za> Ezio Melotti added the comment: Given the lack of proper tests for iter_importers, wouldn't adding a proper test that returns something useful, rather than testing only with a non-existent module be better (this test could be kept, maybe converted to an assertRaises)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 13:29:53 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 09 Nov 2012 12:29:53 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <1352464193.82.0.0688890910528.issue16447@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: - For the replacement with NULL, Py_CLEAR() should be used instead. - We should use a macro (Py_REF_ASSIGN?) for the replacement case. - Careful, in Modules/_json.c the code is wrong because tmp is already used:: PyObject *tmp = PyUnicode_AsEncodedString(...); { PyObject *tmp = s->encoding; s->encoding = tmp; Py_DECREF(tmp); } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 13:38:36 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 09 Nov 2012 12:38:36 +0000 Subject: [issue16163] Wrong name in Lib/pkgutil.py:iter_importers In-Reply-To: <1349697246.97.0.772309039282.issue16163@psf.upfronthosting.co.za> Message-ID: <1352464716.7.0.96388257934.issue16163@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, I thought that iter_importers was at least being tested indirectly by the tests for walk_packages: http://hg.python.org/cpython/file/default/Lib/test/test_runpy.py#l417 However, it turns out that iter_modules() only calls iter_importers() if you don't supply an explicit path, and walk_packages() always passes an explicit path down. I suggest looking at the walk_packages test for ideas on devising a better functional test for iter_importers. Testing iter_modules directly would be good, too. (Note: There's a series of patches from Chris to move the walk_packages test to where it belongs in test_pkgutil, but they won't be applied until after the final 3.2 maintenance release has happened. Moving the test requires some fairly significant rearranging of the test suite to get the required helper functions out of test_runpy and into a shared, discoverable, location) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 13:39:12 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 12:39:12 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1352464752.45.0.22193759157.issue4965@psf.upfronthosting.co.za> Ezio Melotti added the comment: In the root of the clone, with the doc already built in Doc/build (no need to rebuild it), do: hg import --no-c http://bugs.python.org/file27887/issue4965.diff cp Doc/tools/sphinxext/static/basic.css Doc/build/html/_static/basic.css firefox file://`pwd`/Doc/build/html/library/multiprocessing.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 13:44:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 12:44:49 +0000 Subject: [issue834840] Unhelpful error message from cgi module Message-ID: <1352465089.93.0.211860930235.issue834840@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +akuchling, ezio.melotti type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:12:19 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 13:12:19 +0000 Subject: [issue3154] "Quick search" box renders too wide if font size is large In-Reply-To: <1213998453.68.0.954320877172.issue3154@psf.upfronthosting.co.za> Message-ID: <1352466739.9.0.992147614821.issue3154@psf.upfronthosting.co.za> Ezio Melotti added the comment: I can't reproduce this with both the old (2.x) and new (3.x) themes on Firefox 16, so I'm closing this. If someone can still reproduce it, feel free to reopen it. ---------- resolution: -> out of date stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:14:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 13:14:35 +0000 Subject: [issue2454] sha and md5 fixer In-Reply-To: <1206147643.89.0.60936055638.issue2454@psf.upfronthosting.co.za> Message-ID: <1352466875.88.0.598373883228.issue2454@psf.upfronthosting.co.za> Ezio Melotti added the comment: What's the status of this? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:16:40 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 13:16:40 +0000 Subject: [issue15303] Minor revision to the method in Tkinter In-Reply-To: <1341822350.55.0.995662615633.issue15303@psf.upfronthosting.co.za> Message-ID: <1352467000.11.0.466952641133.issue15303@psf.upfronthosting.co.za> Ezio Melotti added the comment: Can you provide a patch in diff format? You can find more information about how to do it on the devguide. ---------- nosy: +ezio.melotti, gpolo stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:18:41 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 13:18:41 +0000 Subject: [issue15480] Drop TYPE_INT64 from marshal in Python 3.4 In-Reply-To: <1343497742.77.0.0142368260807.issue15480@psf.upfronthosting.co.za> Message-ID: <1352467121.73.0.66273694432.issue15480@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +larry priority: deferred blocker -> release blocker stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:19:45 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 13:19:45 +0000 Subject: [issue12907] Update test coverage devguide page In-Reply-To: <1315284413.51.0.757189280849.issue12907@psf.upfronthosting.co.za> Message-ID: <1352467185.51.0.348535083787.issue12907@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:20:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 13:20:42 +0000 Subject: [issue8843] urllib2 Digest Authorization uri must match request URI In-Reply-To: <1275046398.81.0.158910525846.issue8843@psf.upfronthosting.co.za> Message-ID: <1352467242.6.0.208010030757.issue8843@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:23:17 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 13:23:17 +0000 Subject: [issue2818] pulldom cannot handle xml file with large external entity properly In-Reply-To: <1210512738.34.0.315015103661.issue2818@psf.upfronthosting.co.za> Message-ID: <1352467397.51.0.818873232428.issue2818@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> needs patch versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:24:54 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 13:24:54 +0000 Subject: [issue9156] socket._fileobject: read raises AttributeError when closed in another thread In-Reply-To: <1278292895.39.0.187416203103.issue9156@psf.upfronthosting.co.za> Message-ID: <1352467494.89.0.220985269051.issue9156@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +pitrou stage: -> needs patch versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:25:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 13:25:42 +0000 Subject: [issue9194] winreg:fixupMultiSZ should check that P < Q in the inner loop In-Reply-To: <1278558407.29.0.39315930303.issue9194@psf.upfronthosting.co.za> Message-ID: <1352467542.36.0.677328139335.issue9194@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:26:39 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 13:26:39 +0000 Subject: [issue5550] urllib2 use of opener.addheaders In-Reply-To: <1237870141.83.0.616869799184.issue5550@psf.upfronthosting.co.za> Message-ID: <1352467599.53.0.780575995902.issue5550@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:27:23 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 13:27:23 +0000 Subject: [issue5888] mmap ehancement - resize with sequence notation In-Reply-To: <1241116451.53.0.52928290171.issue5888@psf.upfronthosting.co.za> Message-ID: <1352467643.87.0.696308450107.issue5888@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:38:33 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 13:38:33 +0000 Subject: [issue6359] pyexpat.c calls trace function incorrectly for exceptions In-Reply-To: <1246229003.36.0.107970043042.issue6359@psf.upfronthosting.co.za> Message-ID: <1352468313.06.0.342808952961.issue6359@psf.upfronthosting.co.za> Ezio Melotti added the comment: Can you provide a patch? ---------- nosy: +ezio.melotti versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:49:52 2012 From: report at bugs.python.org (Dmitry Shachnev) Date: Fri, 09 Nov 2012 13:49:52 +0000 Subject: [issue16089] _elementtree.TreeBuilder broken with a non-C-deriving element_factory In-Reply-To: <1348970862.81.0.736695242293.issue16089@psf.upfronthosting.co.za> Message-ID: <1352468992.81.0.107703833176.issue16089@psf.upfronthosting.co.za> Dmitry Shachnev added the comment: There are still some false-positive warnings caused by C code that affect docutils (see http://sourceforge.net/tracker/?func=detail&atid=422030&aid=3555164&group_id=38414). Look at this traceback for exmaple: http://paste.ubuntu.com/1345164/ There, _ElementInterfaceWrapper is a subclass of etree._ElementInterface (http://repo.or.cz/w/docutils.git/blob/HEAD:/docutils/docutils/writers/odf_odt/__init__.py#l91). ---------- nosy: +larry, mitya57 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:50:42 2012 From: report at bugs.python.org (Dmitry Shachnev) Date: Fri, 09 Nov 2012 13:50:42 +0000 Subject: [issue16089] _elementtree.TreeBuilder broken with a non-C-deriving element_factory In-Reply-To: <1348970862.81.0.736695242293.issue16089@psf.upfronthosting.co.za> Message-ID: <1352469042.27.0.345059063741.issue16089@psf.upfronthosting.co.za> Changes by Dmitry Shachnev : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 14:51:34 2012 From: report at bugs.python.org (Dmitry Shachnev) Date: Fri, 09 Nov 2012 13:51:34 +0000 Subject: [issue16089] _elementtree.TreeBuilder broken with a non-C-deriving element_factory In-Reply-To: <1348970862.81.0.736695242293.issue16089@psf.upfronthosting.co.za> Message-ID: <1352469094.08.0.766907169962.issue16089@psf.upfronthosting.co.za> Changes by Dmitry Shachnev : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 15:04:15 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 14:04:15 +0000 Subject: [issue6386] importing yields unexpected results when initial script is a symbolic link In-Reply-To: <1246356344.6.0.218965497612.issue6386@psf.upfronthosting.co.za> Message-ID: <1352469855.67.0.318474327746.issue6386@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +brett.cannon, ncoghlan versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 15:10:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 14:10:05 +0000 Subject: [issue6709] It's possible to create TryExcept with no handlers In-Reply-To: <1250303994.53.0.2741455605.issue6709@psf.upfronthosting.co.za> Message-ID: <1352470205.05.0.961821419175.issue6709@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +brett.cannon, georg.brandl, ncoghlan stage: -> needs patch versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 15:11:36 2012 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 09 Nov 2012 14:11:36 +0000 Subject: [issue15303] Minor revision to the method in Tkinter In-Reply-To: <1341822350.55.0.995662615633.issue15303@psf.upfronthosting.co.za> Message-ID: <1352470296.96.0.689357939889.issue15303@psf.upfronthosting.co.za> Guilherme Polo added the comment: Please include a short version of the widget class you mentioned. It must be only long enough to show the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 15:12:19 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 09 Nov 2012 14:12:19 +0000 Subject: [issue6709] It's possible to create TryExcept with no handlers In-Reply-To: <1250303994.53.0.2741455605.issue6709@psf.upfronthosting.co.za> Message-ID: <1352470339.75.0.166278064062.issue6709@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This was fixed a while ago: Traceback (most recent call last): File "", line 1, in ValueError: Try has neither except handlers nor finalbody ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 15:13:57 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Fri, 09 Nov 2012 14:13:57 +0000 Subject: [issue14215] http://www.python.org/dev/peps/ title is python.org In-Reply-To: <1331102600.96.0.801989456091.issue14215@psf.upfronthosting.co.za> Message-ID: <1352470437.86.0.0516223456964.issue14215@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Bump. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 15:27:35 2012 From: report at bugs.python.org (Meador Inge) Date: Fri, 09 Nov 2012 14:27:35 +0000 Subject: [issue2454] sha and md5 fixer In-Reply-To: <1206147643.89.0.60936055638.issue2454@psf.upfronthosting.co.za> Message-ID: <1352471255.36.0.340362996281.issue2454@psf.upfronthosting.co.za> Meador Inge added the comment: I haven't touched the patch since I attached it. I will refresh it today with the feedback given. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 15:28:11 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 14:28:11 +0000 Subject: [issue16443] Add docstrings to regular expression match objects In-Reply-To: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> Message-ID: <1352471291.7.0.591657993303.issue16443@psf.upfronthosting.co.za> Ezio Melotti added the comment: Do you mean http://docs.python.org/2/library/re.html#match-objects ? This doesn't seem to say anything too useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 15:31:13 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 14:31:13 +0000 Subject: [issue6709] It's possible to create TryExcept with no handlers In-Reply-To: <1250303994.53.0.2741455605.issue6709@psf.upfronthosting.co.za> Message-ID: <1352471473.12.0.827735073945.issue6709@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: needs patch -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 15:41:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Nov 2012 14:41:43 +0000 Subject: [issue16335] Integer overflow in unicode-escape decoder In-Reply-To: <1351292121.99.0.943463007307.issue16335@psf.upfronthosting.co.za> Message-ID: <1352472103.89.0.362491674647.issue16335@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27741/decode_unicode_escape_overflow.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 15:41:48 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Nov 2012 14:41:48 +0000 Subject: [issue16335] Integer overflow in unicode-escape decoder In-Reply-To: <1352462685.99.0.0121817411774.issue16335@psf.upfronthosting.co.za> Message-ID: <201211091641.19191.storchaka@gmail.com> Serhiy Storchaka added the comment: Here are patches for different Python versions. Test added. Victor, now you can try it on 12GB. Unfortunately, I can't run the tests. ---------- Added file: http://bugs.python.org/file27933/decode_unicode_escape_overflow-3.3.patch Added file: http://bugs.python.org/file27934/decode_unicode_escape_overflow-3.2.patch Added file: http://bugs.python.org/file27935/decode_unicode_escape_overflow-2.7.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r d170844a363f Lib/test/test_ucn.py --- a/Lib/test/test_ucn.py Fri Nov 09 01:09:27 2012 +0200 +++ b/Lib/test/test_ucn.py Fri Nov 09 16:36:22 2012 +0200 @@ -9,6 +9,7 @@ import unittest import unicodedata +import _testcapi from test import support from http.client import HTTPException @@ -215,6 +216,20 @@ str, b"\\NSPACE", 'unicode-escape', 'strict' ) + @unittest.skipUnless(_testcapi.INT_MAX < _testcapi.PY_SSIZE_T_MAX, + "needs UINT_MAX < SIZE_MAX") + @support.bigmemtest(size=_testcapi.UINT_MAX + 1 + len(b'\\N{SPACE}') + 1, + memuse=1 + 1, dry_run=False) + def test_issue16335(self, size): + # very very long bogus character name + x = b'\\N{SPACE' + b'x' * (_testcapi.UINT_MAX + 1) + b'}' + self.assertEqual(len(x), len(b'\\N{SPACE}') + (_testcapi.UINT_MAX + 1)) + self.assertRaisesRegex(UnicodeError, + 'unknown Unicode character name', + x.decode, 'unicode-escape' + ) + + def test_main(): support.run_unittest(UnicodeNamesTest) diff -r d170844a363f Objects/unicodeobject.c --- a/Objects/unicodeobject.c Fri Nov 09 01:09:27 2012 +0200 +++ b/Objects/unicodeobject.c Fri Nov 09 16:36:22 2012 +0200 @@ -5561,7 +5561,8 @@ /* found a name. look it up in the unicode database */ message = "unknown Unicode character name"; s++; - if (ucnhash_CAPI->getcode(NULL, start, (int)(s-start-1), + if (s - start - 1 <= INT_MAX && + ucnhash_CAPI->getcode(NULL, start, (int)(s-start-1), &chr, 0)) goto store; } -------------- next part -------------- diff -r bb39ca6bcd7a Lib/test/test_ucn.py --- a/Lib/test/test_ucn.py Fri Nov 09 01:08:25 2012 +0200 +++ b/Lib/test/test_ucn.py Fri Nov 09 16:36:32 2012 +0200 @@ -8,6 +8,7 @@ """#" import unittest +import _testcapi from test import support @@ -141,6 +142,20 @@ str, b"\\NSPACE", 'unicode-escape', 'strict' ) + @unittest.skipUnless(_testcapi.INT_MAX < _testcapi.PY_SSIZE_T_MAX, + "needs UINT_MAX < SIZE_MAX") + @support.bigmemtest(size=_testcapi.UINT_MAX + 1 + len(b'\\N{SPACE}') + 1, + memuse=1 + 4, dry_run=False) + def test_issue16335(self, size): + # very very long bogus character name + x = b'\\N{SPACE' + b'x' * (_testcapi.UINT_MAX + 1) + b'}' + self.assertEqual(len(x), len(b'\\N{SPACE}') + (_testcapi.UINT_MAX + 1)) + self.assertRaisesRegex(UnicodeError, + 'unknown Unicode character name', + x.decode, 'unicode-escape' + ) + + def test_main(): support.run_unittest(UnicodeNamesTest) diff -r bb39ca6bcd7a Objects/unicodeobject.c --- a/Objects/unicodeobject.c Fri Nov 09 01:08:25 2012 +0200 +++ b/Objects/unicodeobject.c Fri Nov 09 16:36:32 2012 +0200 @@ -3919,7 +3919,8 @@ /* found a name. look it up in the unicode database */ message = "unknown Unicode character name"; s++; - if (ucnhash_CAPI->getcode(NULL, start, (int)(s-start-1), &chr)) + if (s - start - 1 <= INT_MAX && + ucnhash_CAPI->getcode(NULL, start, (int)(s-start-1), &chr)) goto store; } } -------------- next part -------------- diff -r 8b181c75792f Lib/test/test_ucn.py --- a/Lib/test/test_ucn.py Fri Nov 09 01:03:44 2012 +0200 +++ b/Lib/test/test_ucn.py Fri Nov 09 16:37:11 2012 +0200 @@ -8,6 +8,7 @@ """#" import unittest +import _testcapi from test import test_support @@ -137,6 +138,20 @@ unicode, "\\NSPACE", 'unicode-escape', 'strict' ) + @unittest.skipUnless(_testcapi.INT_MAX < _testcapi.PY_SSIZE_T_MAX, + "needs UINT_MAX < SIZE_MAX") + @test_support.bigmemtest(minsize=_testcapi.UINT_MAX + 1 + len(b'\\N{SPACE}') + 1, + memuse=1 + 4) + def test_issue16335(self, size): + # very very long bogus character name + x = b'\\N{SPACE' + b'x' * (_testcapi.UINT_MAX + 1) + b'}' + self.assertEqual(len(x), len(b'\\N{SPACE}') + (_testcapi.UINT_MAX + 1)) + self.assertRaisesRegex(UnicodeError, + 'unknown Unicode character name', + x.decode, 'unicode-escape' + ) + + def test_main(): test_support.run_unittest(UnicodeNamesTest) diff -r 8b181c75792f Objects/unicodeobject.c --- a/Objects/unicodeobject.c Fri Nov 09 01:03:44 2012 +0200 +++ b/Objects/unicodeobject.c Fri Nov 09 16:37:11 2012 +0200 @@ -2896,7 +2896,8 @@ /* found a name. look it up in the unicode database */ message = "unknown Unicode character name"; s++; - if (ucnhash_CAPI->getcode(NULL, start, (int)(s-start-1), &chr)) + if (s - start - 1 <= INT_MAX && + ucnhash_CAPI->getcode(NULL, start, (int)(s-start-1), &chr)) goto store; } } From report at bugs.python.org Fri Nov 9 15:42:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 14:42:05 +0000 Subject: [issue16121] shlex.shlex.error_leader() reports incorrect line number In-Reply-To: <1349295018.27.0.805550020258.issue16121@psf.upfronthosting.co.za> Message-ID: <1352472125.74.0.686913433462.issue16121@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 15:46:42 2012 From: report at bugs.python.org (Alex Gaynor) Date: Fri, 09 Nov 2012 14:46:42 +0000 Subject: [issue14010] deeply nested filter segfaults In-Reply-To: <1329235106.54.0.737183388066.issue14010@psf.upfronthosting.co.za> Message-ID: <1352472402.35.0.575492741949.issue14010@psf.upfronthosting.co.za> Alex Gaynor added the comment: Since the paste is dead: i = filter(bool, range(5)) for _ in range(1000000): i = filter(bool, i) for p in i: print(p) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 16:01:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 15:01:05 +0000 Subject: [issue13574] refresh example in doc for Extending and Embedding In-Reply-To: <1323546725.7.0.960922330938.issue13574@psf.upfronthosting.co.za> Message-ID: <1352473265.71.0.057718263984.issue13574@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 16:04:15 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 15:04:15 +0000 Subject: [issue15474] Differentiate decorator and decorator factory in docs In-Reply-To: <1343416207.69.0.71696747041.issue15474@psf.upfronthosting.co.za> Message-ID: <1352473455.65.0.221705301666.issue15474@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 16:06:19 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 15:06:19 +0000 Subject: [issue12217] Cross-link docs for faulthandler, traceback and pdb In-Reply-To: <1306770313.4.0.799430970978.issue12217@psf.upfronthosting.co.za> Message-ID: <1352473579.75.0.835467757117.issue12217@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 16:07:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Nov 2012 15:07:07 +0000 Subject: [issue10048] urllib.request documentation confusing In-Reply-To: <1286535990.46.0.129844190964.issue10048@psf.upfronthosting.co.za> Message-ID: <1352473627.31.0.334854203921.issue10048@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- type: -> enhancement versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 16:10:20 2012 From: report at bugs.python.org (George Peristerakis) Date: Fri, 09 Nov 2012 15:10:20 +0000 Subject: [issue16190] Misleading warning in random module docs In-Reply-To: <1349885590.41.0.193272073786.issue16190@psf.upfronthosting.co.za> Message-ID: <1352473820.3.0.959202992095.issue16190@psf.upfronthosting.co.za> Changes by George Peristerakis : ---------- nosy: -George.Peristerakis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 16:54:54 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 09 Nov 2012 15:54:54 +0000 Subject: [issue16441] range usage in gzip module leads to excessive memory usage. In-Reply-To: <1352388383.51.0.371199818587.issue16441@psf.upfronthosting.co.za> Message-ID: <3XymCL0FZhzPmC@mail.python.org> Roundup Robot added the comment: New changeset f938d478359a by Chris Withers in branch '2.7': Bug #16441: avoid excessive memory usage working with large gzip files http://hg.python.org/cpython/rev/f938d478359a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 16:56:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Nov 2012 15:56:39 +0000 Subject: [issue16009] Json error messages could provide more information about the error In-Reply-To: <1348420465.53.0.405036591258.issue16009@psf.upfronthosting.co.za> Message-ID: <1352476599.35.0.969580308793.issue16009@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Added new test cases as Ezio want.. ---------- Added file: http://bugs.python.org/file27936/json_errmsg_5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 16:59:44 2012 From: report at bugs.python.org (Chris Withers) Date: Fri, 09 Nov 2012 15:59:44 +0000 Subject: [issue16441] range usage in gzip module leads to excessive memory usage. In-Reply-To: <1352388383.51.0.371199818587.issue16441@psf.upfronthosting.co.za> Message-ID: <1352476784.73.0.961874126017.issue16441@psf.upfronthosting.co.za> Chris Withers added the comment: Committed on 2.7 branch. ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 17:00:27 2012 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 09 Nov 2012 16:00:27 +0000 Subject: [issue6359] pyexpat.c calls trace function incorrectly for exceptions In-Reply-To: <1246229003.36.0.107970043042.issue6359@psf.upfronthosting.co.za> Message-ID: <1352476827.06.0.580036202376.issue6359@psf.upfronthosting.co.za> Ned Batchelder added the comment: I have no idea why pyexpat.c invokes the trace function in the first place. Unless someone can explain why it does that when no other C extension does, my inclination would be to make it stop calling the trace function at all, not to fix how it calls it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 20:42:01 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Nov 2012 19:42:01 +0000 Subject: [issue9156] socket._fileobject: read raises AttributeError when closed in another thread In-Reply-To: <1278292895.39.0.187416203103.issue9156@psf.upfronthosting.co.za> Message-ID: <1352490121.93.0.747519847115.issue9156@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure there's really a point in making socket.makefile() objects thread-safe. In any case, making them thread-safe would probably require more than this small fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 21:21:57 2012 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 09 Nov 2012 20:21:57 +0000 Subject: [issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers In-Reply-To: <1351896425.99.0.911168182655.issue16391@psf.upfronthosting.co.za> Message-ID: <1352492517.22.0.151292334231.issue16391@psf.upfronthosting.co.za> Vinay Sajip added the comment: You can already do this with Python 3.2 (and hence with later Python 3.x): import logging.config def my_handler(*args, **kwargs): h = logging.StreamHandler(*args, **kwargs) h.terminator = '!\n' return h LOGGING = { 'version': 1, 'handlers': { 'console': { '()': my_handler, 'stream': 'ext://sys.stdout', } }, 'root': { 'handlers': ['console'], 'level': 'INFO', } } logging.config.dictConfig(LOGGING) logging.info('Hello') logging.info('world') which will print Hello! world! ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 21:24:19 2012 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 09 Nov 2012 20:24:19 +0000 Subject: [issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers In-Reply-To: <1351896425.99.0.911168182655.issue16391@psf.upfronthosting.co.za> Message-ID: <1352492659.04.0.234654511608.issue16391@psf.upfronthosting.co.za> Vinay Sajip added the comment: Note that you can also use the value 'ext://__main__.my_handler' for key '()'. ---------- assignee: -> vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 21:55:54 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 09 Nov 2012 20:55:54 +0000 Subject: [issue9156] socket._fileobject: read raises AttributeError when closed in another thread In-Reply-To: <1278292895.39.0.187416203103.issue9156@psf.upfronthosting.co.za> Message-ID: <1352494554.48.0.904578007171.issue9156@psf.upfronthosting.co.za> Christian Heimes added the comment: I agree with Antoine. IMHO it's common knowledge that file and socket object aren't thread safe. All access to these objects must be synced with a lock. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 22:21:02 2012 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Fri, 09 Nov 2012 21:21:02 +0000 Subject: [issue9156] socket._fileobject: read raises AttributeError when closed in another thread In-Reply-To: <1278292895.39.0.187416203103.issue9156@psf.upfronthosting.co.za> Message-ID: <1352496062.15.0.535449315055.issue9156@psf.upfronthosting.co.za> Mathias Panzenb?ck added the comment: The problem is that the other thread is blocked, waiting for new client connections. A common pattern for very simple server applications (like you write during exercises at universities) is: 2 threads: 1. A server thread waiting for clients, maybe spawning even more threads for each connection. 2. A small shell thread reading commands from stdin. When "quit" is read it closes the server socket, which shuts down the server (the server thread just notices that the socket was closed and shuts down properly). This pattern we used all the time when writing exercises in Java. However, it seems to work quite differently in Python 3. I have to check if this problem still exists. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 22:28:13 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Nov 2012 21:28:13 +0000 Subject: [issue9156] socket._fileobject: read raises AttributeError when closed in another thread In-Reply-To: <1352496062.15.0.535449315055.issue9156@psf.upfronthosting.co.za> Message-ID: <1352496458.3494.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > 2 threads: > 1. A server thread waiting for clients, maybe spawning even more > threads for each connection. > 2. A small shell thread reading commands from stdin. When "quit" is > read it closes the server socket, which shuts down the server (the > server thread just notices that the socket was closed and shuts down > properly). You're originally talking about socket._fileobject. I don't see what that has to do with a listening socket being closed ("a server thread waiting for clients"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 22:38:40 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 09 Nov 2012 21:38:40 +0000 Subject: [issue16424] regression: os.path.split('//hostname/foo/bar.txt') In-Reply-To: <1352268933.45.0.882120414377.issue16424@psf.upfronthosting.co.za> Message-ID: <1352497120.71.0.638312706851.issue16424@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 22:48:10 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 09 Nov 2012 21:48:10 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1352497690.13.0.645079770335.issue16427@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 22:48:17 2012 From: report at bugs.python.org (Zachary Ware) Date: Fri, 09 Nov 2012 21:48:17 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1352497697.64.0.227057398317.issue16248@psf.upfronthosting.co.za> Zachary Ware added the comment: Here are a pair of trivial patches that implement Antoine's suggestion of not executing readprofile() if the -E flag is set. Current tests seem to pass, but there are no new tests included because frankly I'm not sure of either how to test it or where. Also, I can't seem to find any tests of the -E flag at all; does this change need a test? No doc change either since the function isn't documented. The patches apply equally well on 2.6 or 2.7, or 3.1 or 3.2, depending on whether this is determined to be security issue enough to mess with 2.6 and 3.1. Thanks, Zach ---------- keywords: +patch Added file: http://bugs.python.org/file27937/issue16248-2.x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 22:48:32 2012 From: report at bugs.python.org (Zachary Ware) Date: Fri, 09 Nov 2012 21:48:32 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1352497712.69.0.726030679104.issue16248@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file27938/issue16248-3.x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 9 23:35:28 2012 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Fri, 09 Nov 2012 22:35:28 +0000 Subject: [issue9156] socket._fileobject: read raises AttributeError when closed in another thread In-Reply-To: <1278292895.39.0.187416203103.issue9156@psf.upfronthosting.co.za> Message-ID: <1352500528.42.0.109755689394.issue9156@psf.upfronthosting.co.za> Mathias Panzenb?ck added the comment: Yeah, I don't remember anymore. It was so long ago. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 02:16:25 2012 From: report at bugs.python.org (koobs) Date: Sat, 10 Nov 2012 01:16:25 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352510185.5.0.721764559953.issue16218@psf.upfronthosting.co.za> koobs added the comment: If there's not another revision of the test patch in the wings, can 56df0d4f0011 also be applied to 3.3, as tests are still failing on at least koobs-freebsd and koobs-freebsd-clang buildbots. ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 02:41:07 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 10 Nov 2012 01:41:07 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <1352511667.7.0.632629961496.issue16447@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 02:42:25 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 10 Nov 2012 01:42:25 +0000 Subject: [issue16445] SEGFAULT when deleting Exception.message In-Reply-To: <1352415910.77.0.640632287013.issue16445@psf.upfronthosting.co.za> Message-ID: <1352511745.2.0.788394192129.issue16445@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 02:50:57 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 10 Nov 2012 01:50:57 +0000 Subject: [issue1020188] Use Py_CLEAR where necessary to avoid crashes Message-ID: <1352512257.31.0.508800289542.issue1020188@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 02:56:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 10 Nov 2012 01:56:22 +0000 Subject: [issue16435] Python 3 doc link to Python 2 FAQ In-Reply-To: <1352382611.96.0.563665281353.issue16435@psf.upfronthosting.co.za> Message-ID: <3Xz1YK6VhGzN1s@mail.python.org> Roundup Robot added the comment: New changeset da0b3735be27 by Chris Jerdonek in branch '3.2': Improve FAQ link in documentation (for issue #16435). http://hg.python.org/cpython/rev/da0b3735be27 New changeset 3951264b0763 by Chris Jerdonek in branch '3.3': Merge from 3.2: improve FAQ link in documentation (for issue #16435). http://hg.python.org/cpython/rev/3951264b0763 New changeset 7cfe8cd4d65e by Chris Jerdonek in branch 'default': Merge from 3.3: improve FAQ link in documentation (for issue #16435). http://hg.python.org/cpython/rev/7cfe8cd4d65e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 03:04:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 10 Nov 2012 02:04:47 +0000 Subject: [issue16435] Python 3 doc link to Python 2 FAQ In-Reply-To: <1352382611.96.0.563665281353.issue16435@psf.upfronthosting.co.za> Message-ID: <3Xz1l23fpWzPsW@mail.python.org> Roundup Robot added the comment: New changeset 5b3648f5e452 by Chris Jerdonek in branch '2.7': Backport from 3.2: improve FAQ link in documentation (for issue #16435). http://hg.python.org/cpython/rev/5b3648f5e452 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 03:07:14 2012 From: report at bugs.python.org (Eric Snow) Date: Sat, 10 Nov 2012 02:07:14 +0000 Subject: [issue9974] tokenizer.untokenize not invariant with line continuations In-Reply-To: <1285695065.99.0.439423855227.issue9974@psf.upfronthosting.co.za> Message-ID: <1352513234.9.0.0784806807142.issue9974@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 03:38:51 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 10 Nov 2012 02:38:51 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <1352515131.63.0.528538198309.issue16447@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Yes, we should add a "Py_REPLACE()" macro. Sure. +1 to that. With this issue in mind, I wonder if there is any situation where "Py_DECREF/Py_XDECREF" must be used that can not be replace with "Py_CLEAR/Py_REPLACE". Is there any code that breaks if we replace "Py_XDECREF()" by "Py_CLEAR()"?. Could be possible even to replace Py_DECREF definition?. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 04:02:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 10 Nov 2012 03:02:35 +0000 Subject: [issue16436] Link directly to set and frozenset in built-in function docs In-Reply-To: <1352383157.6.0.676029239429.issue16436@psf.upfronthosting.co.za> Message-ID: <3Xz31j5JhbzMy3@mail.python.org> Roundup Robot added the comment: New changeset 16fa6462dfe1 by Chris Jerdonek in branch '3.2': Link set and frozenset function docs to their class definitions (issue #16436). http://hg.python.org/cpython/rev/16fa6462dfe1 New changeset d534da27ca8b by Chris Jerdonek in branch '3.3': Merge from 3.2: adjust set and frozenset function docs (issue #16436). http://hg.python.org/cpython/rev/d534da27ca8b New changeset 1fde0d70f2b8 by Chris Jerdonek in branch 'default': Merge from 3.3: adjust set and frozenset function docs (issue #16436). http://hg.python.org/cpython/rev/1fde0d70f2b8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 04:13:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 10 Nov 2012 03:13:20 +0000 Subject: [issue16436] Link directly to set and frozenset in built-in function docs In-Reply-To: <1352383157.6.0.676029239429.issue16436@psf.upfronthosting.co.za> Message-ID: <3Xz3G74XSPzN42@mail.python.org> Roundup Robot added the comment: New changeset 24db5292c2c9 by Chris Jerdonek in branch '2.7': Backport from 3.2: adjust set and frozenset function docs (issue #16436). http://hg.python.org/cpython/rev/24db5292c2c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 04:14:35 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 10 Nov 2012 03:14:35 +0000 Subject: [issue16436] Link directly to set and frozenset in built-in function docs In-Reply-To: <1352383157.6.0.676029239429.issue16436@psf.upfronthosting.co.za> Message-ID: <1352517275.66.0.791723876716.issue16436@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Fixed. Thanks a lot for the report, Yongzhi. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 04:35:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 10 Nov 2012 03:35:19 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1352518519.63.0.186860712592.issue13538@psf.upfronthosting.co.za> Chris Jerdonek added the comment: New patch incorporating Ezio's suggestions, along with some other changes. ---------- Added file: http://bugs.python.org/file27939/issue-13538-4-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 06:25:06 2012 From: report at bugs.python.org (Eric Snow) Date: Sat, 10 Nov 2012 05:25:06 +0000 Subject: [issue11957] re.sub confusion between count and flags args In-Reply-To: <1304101630.86.0.175815070517.issue11957@psf.upfronthosting.co.za> Message-ID: <1352525106.19.0.951055900548.issue11957@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: -eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 06:30:30 2012 From: report at bugs.python.org (Eric Snow) Date: Sat, 10 Nov 2012 05:30:30 +0000 Subject: [issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT In-Reply-To: <1305503118.99.0.0671211382341.issue12082@psf.upfronthosting.co.za> Message-ID: <1352525430.14.0.154169387456.issue12082@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 06:42:56 2012 From: report at bugs.python.org (Eric Snow) Date: Sat, 10 Nov 2012 05:42:56 +0000 Subject: [issue13912] ImportError using __import__ and relative level 1 In-Reply-To: <1327942847.95.0.649353892202.issue13912@psf.upfronthosting.co.za> Message-ID: <1352526176.41.0.155941877732.issue13912@psf.upfronthosting.co.za> Eric Snow added the comment: Are you okay on this, Jason? ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 07:24:01 2012 From: report at bugs.python.org (Eric Snow) Date: Sat, 10 Nov 2012 06:24:01 +0000 Subject: [issue14080] Sporadic test_imp failure In-Reply-To: <1329874561.39.0.329557516679.issue14080@psf.upfronthosting.co.za> Message-ID: <1352528641.6.0.442722762486.issue14080@psf.upfronthosting.co.za> Eric Snow added the comment: Given that issue14657 wrapped up, I'm closing this issue too. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 07:54:47 2012 From: report at bugs.python.org (Sean Ochoa) Date: Sat, 10 Nov 2012 06:54:47 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1352530487.24.0.263257902017.issue13349@psf.upfronthosting.co.za> Sean Ochoa added the comment: Truncating repr strings to 100chars will require the patch from #7330. After applying the patch from that issue, my tests work fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 08:29:36 2012 From: report at bugs.python.org (Sean Ochoa) Date: Sat, 10 Nov 2012 07:29:36 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1352532576.96.0.569824852668.issue13349@psf.upfronthosting.co.za> Sean Ochoa added the comment: Updated patch after taking into account Ezio's (aka Taggnostr on #python-dev) latest feedback. ---------- Added file: http://bugs.python.org/file27940/issue13349.patch.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 09:20:23 2012 From: report at bugs.python.org (jf) Date: Sat, 10 Nov 2012 08:20:23 +0000 Subject: [issue16448] 'module' object has no attribute 'font' when "import tkinter" only. Message-ID: <1352535623.44.0.876378351655.issue16448@psf.upfronthosting.co.za> New submission from jf: when i use tkinter.font, i meet a error "'module' object has no attribute 'font'". if i add "import tkinter.font", it's no error. but when i use tkinter,messagebox, it's no error without "import tkinter.messagebox". and, under the tkinter folder, "messagebox.py" and "font.py" have the same hierarchical filesystem. why they have different import method? here is my code: 1)tkinter.font -- only use "import tkinter" meet a error, must add "import tkinter.font".code is below: import tkinter #import tkinter.font root = tkinter.Tk() ft = tkinter.font.Font(family = 'Fixdsys',size = 20,weight = tkinter.font.BOLD) tkinter.Label(root,text = 'hello sticky',font = ft ).grid() root.mainloop() 2)tkinter.messagebox -- only use "import tkinter" is all ok.code is below: import tkinter def callback(): if tkinter.messagebox.askokcancel("Quit", "Do you really wish to quit?"): root.destroy() root = tkinter.Tk() root.protocol("WM_DELETE_WINDOW", callback) root.mainloop() i am a beginner on python. if have a reply, please email me. thinks. ---------- components: Tkinter messages: 175267 nosy: zaazbb priority: normal severity: normal status: open title: 'module' object has no attribute 'font' when "import tkinter" only. type: compile error versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 09:23:43 2012 From: report at bugs.python.org (jf) Date: Sat, 10 Nov 2012 08:23:43 +0000 Subject: [issue16448] 'module' object has no attribute 'font' when "import tkinter" only. In-Reply-To: <1352535623.44.0.876378351655.issue16448@psf.upfronthosting.co.za> Message-ID: <1352535823.62.0.690631725764.issue16448@psf.upfronthosting.co.za> jf added the comment: when i use tkinter.font, i meet a error "'module' object has no attribute 'font'". if i add "import tkinter.font", it's no error. but when i use tkinter,messagebox, it's no error without "import tkinter.messagebox". and, under the tkinter folder, "messagebox.py" and "font.py" have the same hierarchical filesystem. why they have different import method? here is my code: 1)tkinter.font -- only use "import tkinter" meet a error, must add "import tkinter.font".code is below: import tkinter #import tkinter.font root = tkinter.Tk() ft = tkinter.font.Font(family = 'Fixdsys',size = 20,weight = tkinter.font.BOLD) tkinter.Label(root,text = 'hello sticky',font = ft ).grid() root.mainloop() 2)tkinter.messagebox -- only use "import tkinter" is all ok.code is below: import tkinter def callback(): if tkinter.messagebox.askokcancel("Quit", "Do you really wish to quit?"): root.destroy() root = tkinter.Tk() root.protocol("WM_DELETE_WINDOW", callback) root.mainloop() i am a beginner on python. if have a reply, please email me. thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 10:43:22 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Nov 2012 09:43:22 +0000 Subject: [issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT In-Reply-To: <1305503118.99.0.0671211382341.issue12082@psf.upfronthosting.co.za> Message-ID: <1352540602.35.0.045299243352.issue12082@psf.upfronthosting.co.za> Antoine Pitrou added the comment: My vote is for won't fix. Systems without stat() or fstat() are clearly broken from Python's point of view; at the very least, they aren't POSIX-compliant. ---------- nosy: +pitrou resolution: -> wont fix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 11:36:16 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 10 Nov 2012 10:36:16 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352543776.43.0.0359315088935.issue16218@psf.upfronthosting.co.za> STINNER Victor added the comment: >> Non-ASCII filenames were already supported with UTF-8 locale encoding. > > Test the example in msg173373. It fails without fix. Oh, I didn't understand that, sorry. I created #16444 to test also UTF-8 locale encoding with undecodable filenames (undecodable from UTF-8 in *strict* mode, not by os.fsencode() which uses surrogateescape). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 11:50:07 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 10 Nov 2012 10:50:07 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1352544607.36.0.326227814274.issue16444@psf.upfronthosting.co.za> STINNER Victor added the comment: > The matter is not only in the fact that tests passed. Right, but I don't want to introduce a regression :-) > They should fail if the original bug occurs again. Have you tried to restore the bugs? test_cmd_line_script.test_non_ascii() comes from the issue #16218, changeset 23ebe277e982. I checked this issue: support_undecodable.patch checks for non-regression with UTF-8 (and ASCI and ISO-8859-1) locale encoding on UNIX. test_genericpath.test_non_ascii() comes from the issue #3426, this fix comes from the issue #3187, changeset 8a7c930abab6. I don't want to spend time on trying the new test on this issue because this 8a7c930abab6 is a major change, I don't see how to revert it just to test the issue. I consider the issue has fixed, and the new test should not reduce the test coverage, but just increase it ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 12:07:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 10 Nov 2012 11:07:35 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <3XzFnL44p2zN42@mail.python.org> Roundup Robot added the comment: New changeset 6b8a8bc6ba9c by Victor Stinner in branch 'default': Issue #16444, #16218: Use TESTFN_UNDECODABLE on UNIX http://hg.python.org/cpython/rev/6b8a8bc6ba9c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 12:07:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 10 Nov 2012 11:07:35 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <3XzFnM2SZ5zN9g@mail.python.org> Roundup Robot added the comment: New changeset 6b8a8bc6ba9c by Victor Stinner in branch 'default': Issue #16444, #16218: Use TESTFN_UNDECODABLE on UNIX http://hg.python.org/cpython/rev/6b8a8bc6ba9c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 12:08:21 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 10 Nov 2012 11:08:21 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352545701.06.0.458332875697.issue16218@psf.upfronthosting.co.za> STINNER Victor added the comment: "If there's not another revision of the test patch in the wings, can 56df0d4f0011 also be applied to 3.3, as tests are still failing on at least koobs-freebsd and koobs-freebsd-clang buildbots." I just applied the patch of the issue #16444. I will check 3.4 buildbots, and then backport to older Python versions (at least 3.3). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 13:21:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Nov 2012 12:21:27 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1352550087.94.0.993924047144.issue16444@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: TESTFN_UNDECODABLE is not detected for cp1250, cp1251, cp1252, cp1254, cp1257 and cp1258. Just add b'\x81\x98\xae\xd5\xff', at leas one of this bytes undecodable in some encoding which has any undecodable bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 14:59:09 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 10 Nov 2012 13:59:09 +0000 Subject: [issue16448] 'module' object has no attribute 'font' when "import tkinter" only. In-Reply-To: <1352535623.44.0.876378351655.issue16448@psf.upfronthosting.co.za> Message-ID: <1352555949.55.0.465555293111.issue16448@psf.upfronthosting.co.za> R. David Murray added the comment: This is a question more suited to be asked on python-list or python-tutor, rather than a bug report. I'll give you a clue while I'm closing the issue: in the font snippt you reference the font attribute when your module is imported. In the messagebox snippet, you reference the messagebox attribute inside a callback which is *not* executed when your module is imported. So while the file hierarchy structure is analogous in the two cases, your *code* is not. When you close the window, you will see your messagebox attribute error when the callback is called. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 15:36:10 2012 From: report at bugs.python.org (Phil Connell) Date: Sat, 10 Nov 2012 14:36:10 +0000 Subject: [issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems Message-ID: <1352558170.33.0.527628732316.issue16449@psf.upfronthosting.co.za> New submission from Phil Connell: logging.handlers.RotatingFileHandler.doRollover fails on QNX /dev/shmem filesystems (seen on a 6.4.0-based system). QNX RAM filesystems don't support rename() (see http://www.qnx.com/developers/docs/6.4.0/neutrino/sys_arch/fsys.html#DEVSHMEM - it's a 'big filesystem' feature). So for example, rename("/dev/shmem/foo", "/dev/shmem/bar") fails with EXDEV. This is easily fixed by using shutils.move rather than os.rename where appropriate, falling back to copying if a rename() fails. It's not sufficient to set the rotator attribute, since there are other os.rename calls in in doRollover. ---------- components: Library (Lib) files: rfh_rename_fix.patch keywords: patch messages: 175277 nosy: pconnell, vinay.sajip priority: normal severity: normal status: open title: RotatingFileHandler rollover doesn't work on QNX shmem filesystems versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file27941/rfh_rename_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 15:36:23 2012 From: report at bugs.python.org (Phil Connell) Date: Sat, 10 Nov 2012 14:36:23 +0000 Subject: [issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems In-Reply-To: <1352558170.33.0.527628732316.issue16449@psf.upfronthosting.co.za> Message-ID: <1352558183.26.0.540219348093.issue16449@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 15:42:12 2012 From: report at bugs.python.org (Hans Mulder) Date: Sat, 10 Nov 2012 14:42:12 +0000 Subject: [issue16450] test_missing_localfile masks problems in urlopen Message-ID: <1352558532.09.0.890578567494.issue16450@psf.upfronthosting.co.za> New submission from Hans Mulder: Due to a misconfiguration, urllib.thishost() raises an IOError on my laptop. This causes urllib.urlopen to raise an exception. A flaw in test_missing_localfile causes this exception to not be reported. The problem happens at line 230-235: try: self.assertTrue(os.path.exists(tmp_file)) fp = urllib.urlopen(tmp_fileurl) finally: os.close(fd) fp.close() On my laptop, urllib.urlopen raises a socket.gaierror. This means that the variable fp is never set, and the fp.close() at line 235 raises an UnboundLoccalError, masking the socket error. A quick fix would be: try: self.assertTrue(os.path.exists(tmp_file)) fp = urllib.urlopen(tmp_fileurl) fp.close() finally: os.close(fd) That way, the .close is only attempted if the open succeeds. ---------- components: Tests messages: 175278 nosy: HansM priority: normal severity: normal status: open title: test_missing_localfile masks problems in urlopen versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 15:52:26 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 10 Nov 2012 14:52:26 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <3XzLmn3w1pzPkD@mail.python.org> Roundup Robot added the comment: New changeset 9214f8440c44 by Mark Dickinson in branch 'default': Issue #14794: slice.indices no longer returns OverflowError for out-of-range start, stop, step or length. http://hg.python.org/cpython/rev/9214f8440c44 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 15:54:39 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 10 Nov 2012 14:54:39 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1352559279.09.0.614148586006.issue14794@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed the patch. I'll open a new issue for the refactoring. Many thanks to Serhiy Storchaka for the thorough reviews. Now if only we could fix len, too... :-) Python 3.4.0a0 (default:f02555353544, Nov 4 2012, 11:50:12) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> len(range(10**20)) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C ssize_t [68571 refs] ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 15:57:31 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 10 Nov 2012 14:57:31 +0000 Subject: [issue16451] Remove duplication between slice_indices and compute_slice_indices Message-ID: <1352559451.13.0.963654733597.issue16451@psf.upfronthosting.co.za> New submission from Mark Dickinson: (From #14794 ...) compute_slice_indices in Objects/rangeobject.c and slice_indices in Objects/sliceobject.c implement essentially the same algorithm. It would be nice to refactor to avoid the repetition. ---------- messages: 175281 nosy: mark.dickinson priority: normal severity: normal status: open title: Remove duplication between slice_indices and compute_slice_indices type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 15:58:03 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 10 Nov 2012 14:58:03 +0000 Subject: [issue16451] Remove duplication between slice_indices and compute_slice_indices In-Reply-To: <1352559451.13.0.963654733597.issue16451@psf.upfronthosting.co.za> Message-ID: <1352559483.63.0.178244918183.issue16451@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +serhiy.storchaka stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 16:21:59 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Nov 2012 15:21:59 +0000 Subject: [issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems In-Reply-To: <1352558170.33.0.527628732316.issue16449@psf.upfronthosting.co.za> Message-ID: <1352560919.19.0.667427751068.issue16449@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure why you would setup logging on a RAM filesystem (I assume we're talking about normal volatile RAM)? But besides, the big point of using rename() is that it's fast, atomic and won't disrupt existing file handlers pointing to that file. If RotatingFileHandler may resort to copying by mistake, it may cause other issues down the line. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 16:36:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Nov 2012 15:36:47 +0000 Subject: [issue15861] ttk.Treeview "unmatched open brace in list" In-Reply-To: <1346794903.35.0.326071924778.issue15861@psf.upfronthosting.co.za> Message-ID: <1352561807.43.0.510792994127.issue15861@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch for right quoting of arguments before concatenation. Thanks Bryan Oakley for the analysis. ---------- keywords: +patch Added file: http://bugs.python.org/file27942/tkinter_quoting.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 16:47:43 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 10 Nov 2012 15:47:43 +0000 Subject: [issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems In-Reply-To: <1352558170.33.0.527628732316.issue16449@psf.upfronthosting.co.za> Message-ID: <1352562463.76.0.928887067914.issue16449@psf.upfronthosting.co.za> R. David Murray added the comment: I agree with Antoine. It seems to me that it is very important to the semantics of rollover that the rename be atomic, even if we ignore the issue of existing other readers. If it were not atomic, you might end up with lost log messages. So I don't think there is anything to do here: you just can't use rollover on a filesystem that doesn't support atomic rename. I'll leave it Vinay to close the issue if he agrees with us. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 17:07:53 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 10 Nov 2012 16:07:53 +0000 Subject: [issue6584] gzip module has no custom exception In-Reply-To: <1248675050.27.0.747048824781.issue6584@psf.upfronthosting.co.za> Message-ID: <1352563673.1.0.566664399429.issue6584@psf.upfronthosting.co.za> Michele Orr? added the comment: done! ---------- Added file: http://bugs.python.org/file27943/issue6584_6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 17:27:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Nov 2012 16:27:42 +0000 Subject: [issue6584] gzip module has no custom exception In-Reply-To: <1248675050.27.0.747048824781.issue6584@psf.upfronthosting.co.za> Message-ID: <1352564862.45.0.703792757339.issue6584@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Not all invalid gzip files raise BadGzipFile. Some of them raises ZlibError. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 17:41:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Nov 2012 16:41:40 +0000 Subject: [issue16240] Document a way to escape metacharacters in glob/fnmatch In-Reply-To: <1350312209.74.0.651951907427.issue16240@psf.upfronthosting.co.za> Message-ID: <1352565700.81.0.83272549014.issue16240@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ezio, feel free to finalize this. For me all variants look good. ---------- keywords: -patch stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 17:44:45 2012 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 10 Nov 2012 16:44:45 +0000 Subject: [issue13912] ImportError using __import__ and relative level 1 In-Reply-To: <1327942847.95.0.649353892202.issue13912@psf.upfronthosting.co.za> Message-ID: <1352565885.63.0.884234357152.issue13912@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Yes. Since Nick's comment , I've been using importlib for all programmatic imports with great success. ---------- resolution: -> invalid status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 17:57:30 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sat, 10 Nov 2012 16:57:30 +0000 Subject: [issue6584] gzip module has no custom exception In-Reply-To: <1248675050.27.0.747048824781.issue6584@psf.upfronthosting.co.za> Message-ID: <1352566650.54.0.745268035917.issue6584@psf.upfronthosting.co.za> Michele Orr? added the comment: Well, I specified the word ``files`` everywhere for that reason. Looking at Doc/library/zlib.rst I see: For reading and writing .gz files see the gzip module. Also, I specified 'the gzip module' on the whatsnew section. Is there anything more specific I could have done? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 17:59:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Nov 2012 16:59:30 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1352566770.73.0.584556032058.issue13349@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 18:20:59 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Nov 2012 17:20:59 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352568059.32.0.863218931283.issue16218@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > If there's not another revision of the test patch in the wings, can > 56df0d4f0011 also be applied to 3.3, as tests are still failing on at > least koobs-freebsd and koobs-freebsd-clang buildbots. Let me insist on what koobs just said. The Windows buildbots are still broken on 3.3, so this either needs fixing or reverting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 19:06:41 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 10 Nov 2012 18:06:41 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1352570801.11.0.916043682181.issue13538@psf.upfronthosting.co.za> Changes by Chris Jerdonek : Added file: http://bugs.python.org/file27944/issue-13538-5-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 19:13:28 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 10 Nov 2012 18:13:28 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1352571208.97.0.223256455581.issue13538@psf.upfronthosting.co.za> Changes by Chris Jerdonek : Removed file: http://bugs.python.org/file27939/issue-13538-4-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 19:24:33 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 10 Nov 2012 18:24:33 +0000 Subject: [issue16450] test_missing_localfile masks problems in urlopen In-Reply-To: <1352558532.09.0.890578567494.issue16450@psf.upfronthosting.co.za> Message-ID: <1352571873.58.0.360555732822.issue16450@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 19:24:50 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Nov 2012 18:24:50 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1352571890.39.0.37052118861.issue16444@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I suppose you noticed you broke a bunch of buildbots :) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 19:34:28 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 10 Nov 2012 18:34:28 +0000 Subject: [issue16400] update default PyPI behavior in docs re: listing versions In-Reply-To: <1352023055.39.0.262942434831.issue16400@psf.upfronthosting.co.za> Message-ID: <1352572468.43.0.00534591571763.issue16400@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching a proposed patch. ---------- keywords: +patch nosy: +ezio.melotti Added file: http://bugs.python.org/file27945/issue-16400-1-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 20:10:41 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 10 Nov 2012 19:10:41 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352574641.21.0.916872171675.issue16418@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Proposed documentation patch attached. ---------- assignee: -> docs at python components: +Documentation keywords: +easy, patch nosy: +docs at python, ezio.melotti stage: -> patch review type: behavior -> enhancement versions: +Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27946/issue-16418-1-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 21:25:05 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 10 Nov 2012 20:25:05 +0000 Subject: [issue14196] Unhandled exceptions in pdb return value display In-Reply-To: <1330906516.74.0.432612109172.issue14196@psf.upfronthosting.co.za> Message-ID: <1352579105.8.0.16670488459.issue14196@psf.upfronthosting.co.za> Xavier de Gaye added the comment: I cannot reproduce the problem on python 2.7. The example runs without problem after fixing the example with the following changes: remove the call to pdb.set_trace(), the debugger is already started with a call to pdb.run() add the missing 'cls' parameter in the call to __new__() in: return super(A, cls).__new__() ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 21:26:41 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 10 Nov 2012 20:26:41 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352579201.02.0.694973644332.issue16218@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: OpenIndiana 3.3 and 3.x buildbot broken too for a week. I suggest to revert this patch and use the custom buildbots to "debug it" before committing again. A week, and counting, it is about time. Feel free to hammer my OpenIndiana custom buildbots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 22:31:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 10 Nov 2012 21:31:49 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <3XzWdc73MzzPhT@mail.python.org> Roundup Robot added the comment: New changeset 398f8770bf0d by Victor Stinner in branch 'default': Issue #16444: disable undecodable characters in test_non_ascii() test until http://hg.python.org/cpython/rev/398f8770bf0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 22:44:56 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 10 Nov 2012 21:44:56 +0000 Subject: [issue16409] urlretrieve regression: first call returns block size as 0 In-Reply-To: <1352068025.04.0.157597994471.issue16409@psf.upfronthosting.co.za> Message-ID: <3XzWwm1xnjzPpF@mail.python.org> Roundup Robot added the comment: New changeset 19e6e32db5ec by Gregory P. Smith in branch '3.3': Fixes issue #16409: The reporthook callback made by the legacy http://hg.python.org/cpython/rev/19e6e32db5ec New changeset 8c48eb0239ca by Gregory P. Smith in branch 'default': Fixes issue #16409: The reporthook callback made by the legacy http://hg.python.org/cpython/rev/8c48eb0239ca ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 22:45:35 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 10 Nov 2012 21:45:35 +0000 Subject: [issue16409] urlretrieve regression: first call returns block size as 0 In-Reply-To: <1352068025.04.0.157597994471.issue16409@psf.upfronthosting.co.za> Message-ID: <1352583935.64.0.16309285484.issue16409@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 23:01:56 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 10 Nov 2012 22:01:56 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1352584916.17.0.71519511792.issue16427@psf.upfronthosting.co.za> Gregory P. Smith added the comment: yes please! Any reason you're using an unsigned int in your loop instead of a Py_uhash_t? ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 23:23:39 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 10 Nov 2012 22:23:39 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352586219.28.0.274807931635.issue14621@psf.upfronthosting.co.za> Gregory P. Smith added the comment: People have been posting micro-benchmarks (often run wrong) rather than actual useful benchmarks. Running our real world benchmarks would be more interesting. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 23:38:57 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 10 Nov 2012 22:38:57 +0000 Subject: [issue812369] module shutdown procedure based on GC Message-ID: <1352587137.63.0.384586706574.issue812369@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: gregory.p.smith -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 23:39:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Nov 2012 22:39:51 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1352587191.04.0.077496332834.issue16427@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Any reason you're using an unsigned int in your loop instead of a Py_uhash_t? In fact, there is no serious reason. This should be the type aligned as minimal alignment of void*, size_t and Py_hash_t. Since de facto Py_uhash_t is size_t, then we can use size_t. ---------- Added file: http://bugs.python.org/file27947/fast_hash_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 10 23:43:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Nov 2012 22:43:17 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1352587397.83.0.0102900371938.issue16427@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27920/fast_hash.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 00:13:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 10 Nov 2012 23:13:36 +0000 Subject: [issue10050] urllib.request still has old 2.x urllib primitives In-Reply-To: <1286536471.26.0.454336144311.issue10050@psf.upfronthosting.co.za> Message-ID: <3XzYv40VCSzPpY@mail.python.org> Roundup Robot added the comment: New changeset e19a6194aee4 by Gregory P. Smith in branch '3.3': Fix test_urllib broken by my previous commits. The assumptions it was http://hg.python.org/cpython/rev/e19a6194aee4 New changeset dcf9a07830a6 by Gregory P. Smith in branch 'default': Fix test_urllib broken by my previous commits. The assumptions it was http://hg.python.org/cpython/rev/dcf9a07830a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 00:26:40 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Nov 2012 23:26:40 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1352590000.34.0.900287227742.issue16427@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch is too optimistic, it gives different results depending on the alignment of the memory buffer: >>> b = b"abcd"*100 >>> hash(b[1:]) 7264687738704559842 >>> hash(memoryview(b)[1:]) 9054791208347464792 >>> memoryview(b)[1:] == b[1:] True ---------- nosy: +pitrou stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 00:27:39 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Nov 2012 23:27:39 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1352590059.97.0.125919803935.issue16427@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +mark.dickinson, skrah, tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 00:37:41 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Nov 2012 23:37:41 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1352590661.93.0.0128053493538.issue16427@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a test case for the hash/alignment issue. ---------- Added file: http://bugs.python.org/file27948/test_hash_align.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 00:57:21 2012 From: report at bugs.python.org (David Barnett) Date: Sat, 10 Nov 2012 23:57:21 +0000 Subject: [issue1065986] Fix pydoc crashing on unicode strings Message-ID: <1352591841.16.0.0467255621171.issue1065986@psf.upfronthosting.co.za> Changes by David Barnett : ---------- nosy: +mu_mind _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 01:18:28 2012 From: report at bugs.python.org (David Barnett) Date: Sun, 11 Nov 2012 00:18:28 +0000 Subject: [issue1065986] Fix pydoc crashing on unicode strings Message-ID: <1352593108.58.0.816174091663.issue1065986@psf.upfronthosting.co.za> David Barnett added the comment: I just ran into this, and I'd like to communicate how unfortunate it is that it's not a priority to fix this fairly trivial (?) bug. It means there's no way to define a unicode string literal with non-ascii characters that won't crash the builtin help() command. I ran into this with the desktop package (http://pypi.python.org/pypi/desktop) where the only useful documentation right now is the source code and the docstrings. Apparently the author, who has non-ascii characters in his name, did me a favor by using broken encoding on the doc string so that at least I could read everything except for his name in the help. I tried to correct the encoding and found I get a nice traceback instead of help. And to top it all off, googling for things like "help unicode docstring" and "python help ascii codec" turns up nothing. I only found this issue once I thought to include "pipepager" in the search... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 01:18:54 2012 From: report at bugs.python.org (David Barnett) Date: Sun, 11 Nov 2012 00:18:54 +0000 Subject: [issue1065986] Fix pydoc crashing on unicode strings Message-ID: <1352593134.08.0.051343641969.issue1065986@psf.upfronthosting.co.za> David Barnett added the comment: Also, the resolution is still marked as "fixed", which is not correct... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 01:29:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 00:29:13 +0000 Subject: [issue16357] SSLSocket created from SSLContext.wrap_socket doesn't include cert/keyfile In-Reply-To: <1351526039.51.0.105215109749.issue16357@psf.upfronthosting.co.za> Message-ID: <3XzbZJ6m3DzPpY@mail.python.org> Roundup Robot added the comment: New changeset f475332df9b5 by Antoine Pitrou in branch '3.2': Issue #16357: fix calling accept() on a SSLSocket created through SSLContext.wrap_socket(). http://hg.python.org/cpython/rev/f475332df9b5 New changeset 9510a9641c80 by Antoine Pitrou in branch '3.3': Issue #16357: fix calling accept() on a SSLSocket created through SSLContext.wrap_socket(). http://hg.python.org/cpython/rev/9510a9641c80 New changeset 5fc30f0277a5 by Antoine Pitrou in branch 'default': Issue #16357: fix calling accept() on a SSLSocket created through SSLContext.wrap_socket(). http://hg.python.org/cpython/rev/5fc30f0277a5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 01:30:12 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Nov 2012 00:30:12 +0000 Subject: [issue16357] SSLSocket created from SSLContext.wrap_socket doesn't include cert/keyfile In-Reply-To: <1351526039.51.0.105215109749.issue16357@psf.upfronthosting.co.za> Message-ID: <1352593812.13.0.297784674844.issue16357@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've reworked the patch a bit and committed it. Thank you for reporting this! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 02:26:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 01:26:27 +0000 Subject: [issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data In-Reply-To: <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za> Message-ID: <3XzcrK6NSczQ5j@mail.python.org> Roundup Robot added the comment: New changeset 94256d7804b8 by Nadeem Vawda in branch '2.7': Issue #16350, part 2: Set unused_data (and unconsumed_tail) correctly in decompressobj().flush(). http://hg.python.org/cpython/rev/94256d7804b8 New changeset 85886268c40b by Nadeem Vawda in branch '3.2': Issue #16350, part 2: Set unused_data (and unconsumed_tail) correctly in decompressobj().flush(). http://hg.python.org/cpython/rev/85886268c40b New changeset 654eb5163ba1 by Nadeem Vawda in branch '3.3': Issue #16350, part 2: Set unused_data (and unconsumed_tail) correctly in decompressobj().flush(). http://hg.python.org/cpython/rev/654eb5163ba1 New changeset 4440e45c10f9 by Nadeem Vawda in branch 'default': Issue #16350, part 2: Set unused_data (and unconsumed_tail) correctly in decompressobj().flush(). http://hg.python.org/cpython/rev/4440e45c10f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 02:37:56 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 11 Nov 2012 01:37:56 +0000 Subject: [issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data In-Reply-To: <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za> Message-ID: <1352597876.29.0.814932312353.issue16350@psf.upfronthosting.co.za> Nadeem Vawda added the comment: New patch committed. Once again, thanks for all your work on this issue! ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 03:20:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 02:20:23 +0000 Subject: [issue16411] zlib.Decompress.decompress() retains pointer to input buffer without acquiring reference to it In-Reply-To: <1352075364.32.0.439696678294.issue16411@psf.upfronthosting.co.za> Message-ID: <3Xzf2Z6NnFzPn3@mail.python.org> Roundup Robot added the comment: New changeset c3828831861c by Nadeem Vawda in branch '2.7': Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access previously-freed memory. http://hg.python.org/cpython/rev/c3828831861c New changeset a1db815d0829 by Nadeem Vawda in branch '3.2': Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access previously-freed memory. http://hg.python.org/cpython/rev/a1db815d0829 New changeset a7934fe2927e by Nadeem Vawda in branch '3.3': Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access previously-freed memory. http://hg.python.org/cpython/rev/a7934fe2927e New changeset d63c751e9f01 by Nadeem Vawda in branch 'default': Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access previously-freed memory. http://hg.python.org/cpython/rev/d63c751e9f01 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 03:28:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 02:28:41 +0000 Subject: [issue16411] zlib.Decompress.decompress() retains pointer to input buffer without acquiring reference to it In-Reply-To: <1352075364.32.0.439696678294.issue16411@psf.upfronthosting.co.za> Message-ID: <3XzfD91wVkzPsn@mail.python.org> Roundup Robot added the comment: New changeset be40a10d553a by Nadeem Vawda in branch '2.7': Fix typo in backporting fix of issue #16411 to 2.7. http://hg.python.org/cpython/rev/be40a10d553a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 03:37:51 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 11 Nov 2012 02:37:51 +0000 Subject: [issue16411] zlib.Decompress.decompress() retains pointer to input buffer without acquiring reference to it In-Reply-To: <1352075364.32.0.439696678294.issue16411@psf.upfronthosting.co.za> Message-ID: <1352601471.42.0.798667131623.issue16411@psf.upfronthosting.co.za> Nadeem Vawda added the comment: Ah, that's much nicer than either of my ideas. Patch committed. Thanks! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 04:43:28 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 11 Nov 2012 03:43:28 +0000 Subject: [issue1065986] Fix pydoc crashing on unicode strings Message-ID: <1352605408.21.0.138400708724.issue1065986@psf.upfronthosting.co.za> R. David Murray added the comment: It is not so much that it isn't a priority, as that no one has suggested a working fix that is suitable for 2.7. Do you have a suggestion? ---------- resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 05:08:53 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Nov 2012 04:08:53 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1352606933.1.0.914105365346.issue8865@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: gregory.p.smith -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 05:31:49 2012 From: report at bugs.python.org (Jeff McNeil) Date: Sun, 11 Nov 2012 04:31:49 +0000 Subject: [issue10050] urllib.request still has old 2.x urllib primitives In-Reply-To: <1286536471.26.0.454336144311.issue10050@psf.upfronthosting.co.za> Message-ID: <1352608309.01.0.835552644231.issue10050@psf.upfronthosting.co.za> Jeff McNeil added the comment: Reverting of the len(block) back to 'bs' here aside, does it even make sense to include block information at all? That's the attempted read size, so it might not be an accurate representation of the size of the data actually read. Thus the reason for the initial change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 05:34:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 04:34:49 +0000 Subject: [issue9535] Pending signals are inherited by child processes In-Reply-To: <1281105795.17.0.408658965128.issue9535@psf.upfronthosting.co.za> Message-ID: <3Xzj1h6lvhzQ0L@mail.python.org> Roundup Robot added the comment: New changeset ba45976c2801 by Gregory P. Smith in branch '3.2': Fixes issue #9535: Fix pending signals that have been received but not http://hg.python.org/cpython/rev/ba45976c2801 New changeset c7d6cd3c27b9 by Gregory P. Smith in branch '3.3': Fixes issue #9535: Fix pending signals that have been received but not http://hg.python.org/cpython/rev/c7d6cd3c27b9 New changeset 41280973921a by Gregory P. Smith in branch 'default': Fixes issue #9535: Fix pending signals that have been received but not http://hg.python.org/cpython/rev/41280973921a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 05:38:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 04:38:29 +0000 Subject: [issue9535] Pending signals are inherited by child processes In-Reply-To: <1281105795.17.0.408658965128.issue9535@psf.upfronthosting.co.za> Message-ID: <3Xzj5w3xnGzQ0L@mail.python.org> Roundup Robot added the comment: New changeset 9b711422c98f by Gregory P. Smith in branch '2.7': Fixes issue #9535: Fix pending signals that have been received but not yet http://hg.python.org/cpython/rev/9b711422c98f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 05:39:09 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Nov 2012 04:39:09 +0000 Subject: [issue9535] Pending signals are inherited by child processes In-Reply-To: <1281105795.17.0.408658965128.issue9535@psf.upfronthosting.co.za> Message-ID: <1352608749.75.0.446018575084.issue9535@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 05:47:44 2012 From: report at bugs.python.org (Jeff McNeil) Date: Sun, 11 Nov 2012 04:47:44 +0000 Subject: [issue10050] urllib.request still has old 2.x urllib primitives In-Reply-To: <1286536471.26.0.454336144311.issue10050@psf.upfronthosting.co.za> Message-ID: <1352609264.63.0.692875794436.issue10050@psf.upfronthosting.co.za> Jeff McNeil added the comment: Ah, disregard. I followed up on the other bug. The legacy interface indeed should have stayed consistant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 05:56:29 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 11 Nov 2012 04:56:29 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1352609789.04.0.0950250284469.issue14621@psf.upfronthosting.co.za> Chris Rebert added the comment: What about CityHash? (http://code.google.com/p/cityhash/ ; unofficial C port: http://code.google.com/p/cityhash-c/ ) It's good enough for Google... ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 06:01:57 2012 From: report at bugs.python.org (Sean Ochoa) Date: Sun, 11 Nov 2012 05:01:57 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1352610117.11.0.0678590019295.issue13349@psf.upfronthosting.co.za> Sean Ochoa added the comment: Updates after feedback from Serhiy. ---------- Added file: http://bugs.python.org/file27949/issue13349.patch.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 06:10:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 05:10:39 +0000 Subject: [issue14396] Popen wait() doesn't handle spurious wakeups In-Reply-To: <1332561864.36.0.581817043223.issue14396@psf.upfronthosting.co.za> Message-ID: <3Xzjq26MCdzPwQ@mail.python.org> Roundup Robot added the comment: New changeset d478df13abde by Gregory P. Smith in branch '3.2': Fixes issue #14396: Handle the odd rare case of waitpid returning 0 when http://hg.python.org/cpython/rev/d478df13abde New changeset 61a0eace0f2e by Gregory P. Smith in branch '3.3': Fixes issue #14396: Handle the odd rare case of waitpid returning 0 http://hg.python.org/cpython/rev/61a0eace0f2e New changeset 512c1120332f by Gregory P. Smith in branch 'default': Fixes issue #14396: Handle the odd rare case of waitpid returning 0 http://hg.python.org/cpython/rev/512c1120332f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 06:13:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 05:13:36 +0000 Subject: [issue14396] Popen wait() doesn't handle spurious wakeups In-Reply-To: <1332561864.36.0.581817043223.issue14396@psf.upfronthosting.co.za> Message-ID: <3XzjtR6XGkzPyD@mail.python.org> Roundup Robot added the comment: New changeset 82711f5ab507 by Gregory P. Smith in branch '2.7': Fixes issue #14396: Handle the odd rare case of waitpid returning 0 http://hg.python.org/cpython/rev/82711f5ab507 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 06:16:10 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Nov 2012 05:16:10 +0000 Subject: [issue14396] Popen wait() doesn't handle spurious wakeups In-Reply-To: <1332561864.36.0.581817043223.issue14396@psf.upfronthosting.co.za> Message-ID: <1352610970.1.0.55451924964.issue14396@psf.upfronthosting.co.za> Gregory P. Smith added the comment: regardless of knowing how to reproduce this system call behavior, the changes necessary to handle robustly it are easy enough. fixed. 3.3+ already handled it if a timeout was specified (new feature). I only had to fix the default no timeout case. ---------- resolution: -> fixed status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 06:20:16 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Nov 2012 05:20:16 +0000 Subject: [issue16114] incorrect path in subprocess.Popen() FileNotFoundError message In-Reply-To: <1349237807.22.0.592724343556.issue16114@psf.upfronthosting.co.za> Message-ID: <1352611216.7.0.428806406976.issue16114@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fyi - I agree with your comments about the test and assertRaises. This code is old, there's a lot that could be improved in there. I chose to maintain a style equivalent to the existing surrounding code. Feel free to clean that up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 06:50:53 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Nov 2012 05:50:53 +0000 Subject: [issue16327] subprocess.Popen leaks file descriptors on os.fork() failure In-Reply-To: <1351204263.29.0.689540716038.issue16327@psf.upfronthosting.co.za> Message-ID: <1352613053.61.0.144726628339.issue16327@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Thanks! I'm looking into applying these tonight (including 3.2) with a couple minor edits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 07:19:54 2012 From: report at bugs.python.org (Julian Berman) Date: Sun, 11 Nov 2012 06:19:54 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1352614793.99.0.0633662983614.issue13349@psf.upfronthosting.co.za> Julian Berman added the comment: test_issuewhatever is a bit indescriptive. It'd be easier for someone glancing at the test to see what it claims to be testing if there were a more descriptive name given, like perhaps test_exception_message (or something even more verbose). ---------- nosy: +Julian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 07:34:26 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 06:34:26 +0000 Subject: [issue16327] subprocess.Popen leaks file descriptors on os.fork() failure In-Reply-To: <1351204263.29.0.689540716038.issue16327@psf.upfronthosting.co.za> Message-ID: <3Xzlgk1KGXzQ1J@mail.python.org> Roundup Robot added the comment: New changeset 63ff4c9a2ed2 by Gregory P. Smith in branch '3.2': Fixes issue #16327: The subprocess module no longer leaks file descriptors http://hg.python.org/cpython/rev/63ff4c9a2ed2 New changeset a6a6c349af7e by Gregory P. Smith in branch '3.3': Fixes issue #16327: The subprocess module no longer leaks file descriptors http://hg.python.org/cpython/rev/a6a6c349af7e New changeset a9e238168588 by Gregory P. Smith in branch 'default': Fixes issue #16327: The subprocess module no longer leaks file descriptors http://hg.python.org/cpython/rev/a9e238168588 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 07:49:16 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 06:49:16 +0000 Subject: [issue16327] subprocess.Popen leaks file descriptors on os.fork() failure In-Reply-To: <1351204263.29.0.689540716038.issue16327@psf.upfronthosting.co.za> Message-ID: <3Xzm0r0yHZzQ6l@mail.python.org> Roundup Robot added the comment: New changeset e67620048d2f by Gregory P. Smith in branch '2.7': Fixes issue #16327: The subprocess module no longer leaks file descriptors http://hg.python.org/cpython/rev/e67620048d2f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 07:50:51 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Nov 2012 06:50:51 +0000 Subject: [issue16327] subprocess.Popen leaks file descriptors on os.fork() failure In-Reply-To: <1351204263.29.0.689540716038.issue16327@psf.upfronthosting.co.za> Message-ID: <1352616651.18.0.387243402949.issue16327@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 08:58:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 07:58:30 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1352620710.62.0.0389803419106.issue13349@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Or test_index()/test_remove(). In this case positive test cases (and may be other exception types) should be added. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 09:22:29 2012 From: report at bugs.python.org (David Barnett) Date: Sun, 11 Nov 2012 08:22:29 +0000 Subject: [issue1065986] Fix pydoc crashing on unicode strings Message-ID: <1352622149.19.0.755998091538.issue1065986@psf.upfronthosting.co.za> David Barnett added the comment: I guess it must be more complicated than it looks, because I thought checking for unicode strings and doing .encode('utf-8') would help at least some cases without making anything worse. Anyways, if it's too hard or not worth fixing "correctly", couldn't we at least do something to prevent a crash? Maybe strip out / replace special characters and try again? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 09:50:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 08:50:20 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1352623820.34.0.371115175574.issue16427@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The patch is too optimistic, it gives different results depending on the alignment of the memory buffer: So this method is not applicable for a byte. Here is a patch only for strings. If a fast hash for bytes/memoryview is desirable, I can write a fast robust implementation for nonaligned data. But this will be more cumbersome and a bit slower. ---------- Added file: http://bugs.python.org/file27950/fast_str_hash.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 09:53:43 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Nov 2012 08:53:43 +0000 Subject: [issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception In-Reply-To: <1349420361.8.0.0219880030745.issue16140@psf.upfronthosting.co.za> Message-ID: <1352624023.23.0.375456270759.issue16140@psf.upfronthosting.co.za> Gregory P. Smith added the comment: To remove the double close fd-reuse-window race condition you describe in 3.2.3 and later I don't think you even need to add that code snippet. Just get rid of the for loop calling os.close on those three fd's all together. self.stdin, self.stdout and self.stderr are already closed in the error case here: http://hg.python.org/releasing/3.2.3/file/86d1421a552c/Lib/subprocess.py#l746 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 09:53:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 08:53:47 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1352624027.41.0.809669843254.issue16427@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Here is a test case for the hash/alignment issue. I think here should be a test for a shifted data. Something like hash(b'abcd...') == hash(memoryview(b'xabcd...')[1:]). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 10:13:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 09:13:52 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1352625232.0.0.697703820212.issue16427@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, I see, it's already here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 10:34:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 09:34:55 +0000 Subject: [issue15677] Gzip/zlib allows for compression level=0 In-Reply-To: <1345062923.32.0.954619584637.issue15677@psf.upfronthosting.co.za> Message-ID: <1352626495.07.0.360153319408.issue15677@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- nosy: +nadeem.vawda, serhiy.storchaka stage: needs patch -> commit review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 10:41:58 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 09:41:58 +0000 Subject: [issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception In-Reply-To: <1349420361.8.0.0219880030745.issue16140@psf.upfronthosting.co.za> Message-ID: <3Xzqr61x0VzNK3@mail.python.org> Roundup Robot added the comment: New changeset 6ebfdfe74c04 by Gregory P. Smith in branch '3.2': Fixes issue #16140: The subprocess module no longer double closes its http://hg.python.org/cpython/rev/6ebfdfe74c04 New changeset 9f8b0444c8a6 by Gregory P. Smith in branch '3.3': Fixes issue #16140: The subprocess module no longer double closes its http://hg.python.org/cpython/rev/9f8b0444c8a6 New changeset d51df72dadb7 by Gregory P. Smith in branch 'default': Fixes issue #16140: The subprocess module no longer double closes its http://hg.python.org/cpython/rev/d51df72dadb7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 10:49:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 09:49:38 +0000 Subject: [issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data In-Reply-To: <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za> Message-ID: <1352627378.9.0.904657572512.issue16350@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I see you much adjusted the patch. It looks good, thanks you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 10:56:06 2012 From: report at bugs.python.org (Simon Feltman) Date: Sun, 11 Nov 2012 09:56:06 +0000 Subject: [issue16452] Add support for weak reference to bound methods Message-ID: <1352627766.58.0.403468077196.issue16452@psf.upfronthosting.co.za> New submission from Simon Feltman: This is a feature request to include a "WeakMethod" or similar object to the weakref module. The object decomposes a bound method and holds a weakref to the object and unbound function. This can be a very useful utility in signal and ui based programming. The issue has come up a few times but I was unable to find a bug specifically requesting this feature. I think similar code has shown up in enough libraries at this point that it makes sense to just include it in pythons weakref module. See also: http://bugs.python.org/issue813299 http://bugs.python.org/issue7464 This is the recipes: http://code.activestate.com/recipes/81253/ http://mindtrove.info/python-weak-references/ ---------- components: None messages: 175337 nosy: sfeltman priority: normal severity: normal status: open title: Add support for weak reference to bound methods type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 10:59:59 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Nov 2012 09:59:59 +0000 Subject: [issue16452] Add support for weak reference to bound methods In-Reply-To: <1352627766.58.0.403468077196.issue16452@psf.upfronthosting.co.za> Message-ID: <1352627999.19.0.358772129979.issue16452@psf.upfronthosting.co.za> Mark Dickinson added the comment: Duplicate of http://bugs.python.org/issue14631 ? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 11:00:31 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Nov 2012 10:00:31 +0000 Subject: [issue16452] Add support for weak reference to bound methods In-Reply-To: <1352627766.58.0.403468077196.issue16452@psf.upfronthosting.co.za> Message-ID: <1352628031.95.0.362753733344.issue16452@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 11:00:47 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Nov 2012 10:00:47 +0000 Subject: [issue16452] Add support for weak reference to bound methods In-Reply-To: <1352627766.58.0.403468077196.issue16452@psf.upfronthosting.co.za> Message-ID: <1352628047.15.0.426671477989.issue16452@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- components: +Library (Lib) -None versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 11:02:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 10:02:10 +0000 Subject: [issue16327] subprocess.Popen leaks file descriptors on os.fork() failure In-Reply-To: <1351204263.29.0.689540716038.issue16327@psf.upfronthosting.co.za> Message-ID: <3XzrHP33cczQ6H@mail.python.org> Roundup Robot added the comment: New changeset 2bdd984a55ac by Gregory P. Smith in branch '2.7': Fix issue #16140 bug that the fix to issue #16327 added - don't double http://hg.python.org/cpython/rev/2bdd984a55ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 11:02:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 10:02:10 +0000 Subject: [issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception In-Reply-To: <1349420361.8.0.0219880030745.issue16140@psf.upfronthosting.co.za> Message-ID: <3XzrHQ1lVhzQ7F@mail.python.org> Roundup Robot added the comment: New changeset 2bdd984a55ac by Gregory P. Smith in branch '2.7': Fix issue #16140 bug that the fix to issue #16327 added - don't double http://hg.python.org/cpython/rev/2bdd984a55ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 11:03:28 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Nov 2012 10:03:28 +0000 Subject: [issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception In-Reply-To: <1349420361.8.0.0219880030745.issue16140@psf.upfronthosting.co.za> Message-ID: <1352628208.68.0.0911502983093.issue16140@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- resolution: -> fixed status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 11:03:40 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Nov 2012 10:03:40 +0000 Subject: [issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception In-Reply-To: <1349420361.8.0.0219880030745.issue16140@psf.upfronthosting.co.za> Message-ID: <1352628220.63.0.116998860771.issue16140@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- stage: test needed -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 11:08:52 2012 From: report at bugs.python.org (Simon Feltman) Date: Sun, 11 Nov 2012 10:08:52 +0000 Subject: [issue16452] Add support for weak reference to bound methods In-Reply-To: <1352627766.58.0.403468077196.issue16452@psf.upfronthosting.co.za> Message-ID: <1352628532.22.0.986780698664.issue16452@psf.upfronthosting.co.za> Simon Feltman added the comment: Indeed a duplicate of: http://bugs.python.org/issue14631 ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 11:09:31 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 11 Nov 2012 10:09:31 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1352609789.04.0.0950250284469.issue14621@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Did qomeone start to write a PEP? Le 11 nov. 2012 05:56, "Chris Rebert" a ?crit : > > Chris Rebert added the comment: > > What about CityHash? (http://code.google.com/p/cityhash/ ; unofficial C > port: http://code.google.com/p/cityhash-c/ ) > It's good enough for Google... > > ---------- > nosy: +cvrebert > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 11:11:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 10:11:03 +0000 Subject: [issue5784] raw deflate format and zlib module In-Reply-To: <1240006221.86.0.263428051867.issue5784@psf.upfronthosting.co.za> Message-ID: <1352628663.01.0.97227843081.issue5784@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> needs patch versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 11:18:49 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Nov 2012 10:18:49 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <1352629129.44.0.620087108848.issue14631@psf.upfronthosting.co.za> Mark Dickinson added the comment: Adding some useful links from Simon Feltman in issue 16452. See also: http://bugs.python.org/issue813299 http://bugs.python.org/issue7464 This is the recipes: http://code.activestate.com/recipes/81253/ http://mindtrove.info/python-weak-references/ ---------- nosy: +sfeltman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 11:19:04 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Nov 2012 10:19:04 +0000 Subject: [issue16452] Add support for weak reference to bound methods In-Reply-To: <1352627766.58.0.403468077196.issue16452@psf.upfronthosting.co.za> Message-ID: <1352629144.43.0.381764955714.issue16452@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- superseder: -> Instance methods and WeakRefs don't mix. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 11:20:17 2012 From: report at bugs.python.org (Simon Feltman) Date: Sun, 11 Nov 2012 10:20:17 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <1352629217.78.0.966293599544.issue14631@psf.upfronthosting.co.za> Simon Feltman added the comment: Just a note this is also referred to as a "WeakMethod" by some folks (so this ticket shows up in those searches). See also: http://bugs.python.org/issue813299 http://bugs.python.org/issue7464 http://bugs.python.org/issue16452 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 11:28:36 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Nov 2012 10:28:36 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <1352629716.74.0.309939155137.issue14631@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 12:14:30 2012 From: report at bugs.python.org (Giovanni Bajo) Date: Sun, 11 Nov 2012 11:14:30 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1352609789.04.0.0950250284469.issue14621@psf.upfronthosting.co.za> Message-ID: <881EB71D-799C-4B6D-A48B-F6DD694D0DFC@gmail.com> Giovanni Bajo added the comment: Il giorno 11/nov/2012, alle ore 05:56, Chris Rebert ha scritto: > > Chris Rebert added the comment: > > What about CityHash? (http://code.google.com/p/cityhash/ ; unofficial C port: http://code.google.com/p/cityhash-c/ ) > It's good enough for Google... It's good enough for Google in a context that does not require protection against collision attacks. If you have a look at SipHash' page, you will find a program to generate collisions to CityHash. -- Giovanni Bajo My Blog: http://giovanni.bajo.it ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 12:24:06 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Nov 2012 11:24:06 +0000 Subject: [issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception In-Reply-To: <1349420361.8.0.0219880030745.issue16140@psf.upfronthosting.co.za> Message-ID: <1352633046.87.0.946231084331.issue16140@psf.upfronthosting.co.za> Mark Dickinson added the comment: test_gc and test_csv seem to be failing on some of the buildbots as a result of these checkins. It looks as though the new test_subprocess test creates some uncollectable garbage. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 12:28:57 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Nov 2012 11:28:57 +0000 Subject: [issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception In-Reply-To: <1349420361.8.0.0219880030745.issue16140@psf.upfronthosting.co.za> Message-ID: <1352633337.77.0.0491600523612.issue16140@psf.upfronthosting.co.za> Mark Dickinson added the comment: Adding 'del p' at the end of the test method fixes this for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 12:36:48 2012 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 11 Nov 2012 11:36:48 +0000 Subject: [issue16124] fcntl_ioctl still not 100% sane with unsigned longs In-Reply-To: <1349322414.95.0.371484313067.issue16124@psf.upfronthosting.co.za> Message-ID: <1352633808.03.0.464187759811.issue16124@psf.upfronthosting.co.za> Garrett Cooper added the comment: Yes. Submitting a patch to fix this based on hg master shortly.. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 12:41:43 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Nov 2012 11:41:43 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352623820.34.0.371115175574.issue16427@psf.upfronthosting.co.za> Message-ID: <1352634063.3360.2.camel@localhost.localdomain> Antoine Pitrou added the comment: > If a fast hash for bytes/memoryview is desirable, I can write a fast > robust implementation for nonaligned data. But this will be more > cumbersome and a bit slower. Unaligned accesses are not a problem on x86(-64), but they will segfault (bus error, IIRC) on other architectures such as SPARC, unfortunately. (blame RISC for being really too "simplified") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 12:45:46 2012 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 11 Nov 2012 11:45:46 +0000 Subject: [issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems In-Reply-To: <1352558170.33.0.527628732316.issue16449@psf.upfronthosting.co.za> Message-ID: <1352634346.83.0.854384914646.issue16449@psf.upfronthosting.co.za> Vinay Sajip added the comment: Thanks for the patch, but I'm closing this as 'wontfix', as per the points made by Antoine and David. If you need logging from an embedded system, please consider using one of the socket-based logging handlers, if that's feasible in the specific situation. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 12:55:35 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Nov 2012 11:55:35 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352634063.3360.2.camel@localhost.localdomain> Message-ID: <20121111115536.GA7759@sleipnir.bytereef.org> Stefan Krah added the comment: FWIW, on x86/x64 gcc often generates identical code for x = y and memcpy(x, y, 8). See e.g. the PACK_SINGLE and UNPACK_SINGLE macros in Objects/memoryobject.c. I didn't look at the patch yet, just an idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 13:10:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 12:10:16 +0000 Subject: [issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems In-Reply-To: <1352558170.33.0.527628732316.issue16449@psf.upfronthosting.co.za> Message-ID: <1352635816.23.0.836493688539.issue16449@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about the "rotator" attribute. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 13:20:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 12:20:51 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1352636451.48.0.0723873299569.issue16427@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Unaligned accesses are not a problem on x86(-64), but they will segfault (bus error, IIRC) on other architectures such as SPARC, unfortunately. On x86(-64) this kills performance and makes the optimization be senseless. > FWIW, on x86/x64 gcc often generates identical code for x = y and memcpy(x, y, 8). The code can be identical, but the time will differ significantly for aligned and non-aligned data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 13:24:14 2012 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 11 Nov 2012 12:24:14 +0000 Subject: [issue16124] fcntl_ioctl still not 100% sane with unsigned longs In-Reply-To: <1349322414.95.0.371484313067.issue16124@psf.upfronthosting.co.za> Message-ID: <1352636654.15.0.422088724805.issue16124@psf.upfronthosting.co.za> Garrett Cooper added the comment: $ uname -a FreeBSD bayonetta.local 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0 r240836M: Sat Sep 22 12:30:11 PDT 2012 gcooper at bayonetta.local:/usr/obj/store/freebsd/stable/9/sys/BAYONETTA amd64 $ ./configure --prefix=/scratch/python-bin/3k/ ... $ make all; make install ... $ /scratch/python-bin/3k/bin/python3 Lib/test/test_ioctl.py test_ioctl (__main__.IoctlTests) ... ok test_ioctl_mutate (__main__.IoctlTests) ... ok test_ioctl_mutate_1024 (__main__.IoctlTests) ... ok test_ioctl_mutate_2048 (__main__.IoctlTests) ... ok test_ioctl_signed_unsigned_code_param (__main__.IoctlTests) ... ok ---------------------------------------------------------------------- Ran 5 tests in 0.003s OK ---------- keywords: +patch versions: +Python 2.6, Python 3.1, Python 3.2, Python 3.5 Added file: http://bugs.python.org/file27951/python-issue13500-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 13:25:38 2012 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 11 Nov 2012 12:25:38 +0000 Subject: [issue16124] fcntl_ioctl still not 100% sane with unsigned longs In-Reply-To: <1349322414.95.0.371484313067.issue16124@psf.upfronthosting.co.za> Message-ID: <1352636738.15.0.947201004959.issue16124@psf.upfronthosting.co.za> Garrett Cooper added the comment: Sorry; previous patch is not applicable to this issue. This one is. ---------- Added file: http://bugs.python.org/file27952/python-issue16124.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 13:25:55 2012 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 11 Nov 2012 12:25:55 +0000 Subject: [issue16124] fcntl_ioctl still not 100% sane with unsigned longs In-Reply-To: <1349322414.95.0.371484313067.issue16124@psf.upfronthosting.co.za> Message-ID: <1352636755.18.0.448689326259.issue16124@psf.upfronthosting.co.za> Changes by Garrett Cooper : Removed file: http://bugs.python.org/file27951/python-issue13500-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 13:27:47 2012 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 11 Nov 2012 12:27:47 +0000 Subject: [issue16124] fcntl_ioctl still not 100% sane with unsigned longs In-Reply-To: <1349322414.95.0.371484313067.issue16124@psf.upfronthosting.co.za> Message-ID: <1352636867.61.0.371730499299.issue16124@psf.upfronthosting.co.za> Garrett Cooper added the comment: And I missed the int -> unsigned int part. Resubmitting one last time for tonight.. ---------- Added file: http://bugs.python.org/file27953/python-issue16124.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 13:28:24 2012 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 11 Nov 2012 12:28:24 +0000 Subject: [issue16124] fcntl_ioctl still not 100% sane with unsigned longs In-Reply-To: <1349322414.95.0.371484313067.issue16124@psf.upfronthosting.co.za> Message-ID: <1352636904.66.0.795079539514.issue16124@psf.upfronthosting.co.za> Changes by Garrett Cooper : Removed file: http://bugs.python.org/file27953/python-issue16124.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 13:28:46 2012 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 11 Nov 2012 12:28:46 +0000 Subject: [issue16124] fcntl_ioctl still not 100% sane with unsigned longs In-Reply-To: <1349322414.95.0.371484313067.issue16124@psf.upfronthosting.co.za> Message-ID: <1352636925.98.0.399845985515.issue16124@psf.upfronthosting.co.za> Garrett Cooper added the comment: Grr... Let's try again. ---------- Added file: http://bugs.python.org/file27954/python-issue16124.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 13:30:13 2012 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 11 Nov 2012 12:30:13 +0000 Subject: [issue16124] fcntl_ioctl still not 100% sane with unsigned longs In-Reply-To: <1349322414.95.0.371484313067.issue16124@psf.upfronthosting.co.za> Message-ID: <1352637013.45.0.619587064479.issue16124@psf.upfronthosting.co.za> Garrett Cooper added the comment: ... g'night. ---------- Added file: http://bugs.python.org/file27955/python-issue16124.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 13:38:21 2012 From: report at bugs.python.org (Phil Connell) Date: Sun, 11 Nov 2012 12:38:21 +0000 Subject: [issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems In-Reply-To: <1352558170.33.0.527628732316.issue16449@psf.upfronthosting.co.za> Message-ID: <1352637501.24.0.768752389311.issue16449@psf.upfronthosting.co.za> Phil Connell added the comment: I'm not convinced that it matters whether the rename or move is atomic. Can anyone come up with a quick concrete example? I see two scenarios: 1. The process crashes during a copy in shutils.move(). In this case, some logs will be duplicated across the files involved in the copy. 2. Other threads emit logs during the rollover. Given that the IO lock is acquired in Handler.handle() before calling emit(), this is fine. While the first case isn't ideal, I don't think there can be any loss of logs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 13:39:10 2012 From: report at bugs.python.org (Phil Connell) Date: Sun, 11 Nov 2012 12:39:10 +0000 Subject: [issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems In-Reply-To: <1352558170.33.0.527628732316.issue16449@psf.upfronthosting.co.za> Message-ID: <1352637550.57.0.411814946667.issue16449@psf.upfronthosting.co.za> Phil Connell added the comment: Serhiy, there are also calls to os.rename in RotatingFileHandler.doRollover ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 13:45:05 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Nov 2012 12:45:05 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352636451.48.0.0723873299569.issue16427@psf.upfronthosting.co.za> Message-ID: <20121111124506.GA8200@sleipnir.bytereef.org> Stefan Krah added the comment: > The code can be identical, but the time will differ significantly for > aligned and non-aligned data. Of course, but in most cases the data *is* aligned, so only code that does something quite special pays the performance penalty. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 14:17:52 2012 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 11 Nov 2012 13:17:52 +0000 Subject: [issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems In-Reply-To: <1352558170.33.0.527628732316.issue16449@psf.upfronthosting.co.za> Message-ID: <1352639872.67.0.824097890688.issue16449@psf.upfronthosting.co.za> Vinay Sajip added the comment: The current implementation was written with an expectation of working rename functionality in the stdlib. As such, while this issue might be categorised as being of type "enhancement", I don't see how you can categorise it as being of type "behaviour". What's the problem with subclassing the relevant handlers to implement your own doRollover() method? You only need to do that once for all the projects in your QNX environment. Given that it's not a mainstream environment, that's not IMO an unreasonable suggestion. If you publish such a handler, I'll mention it on http://plumberjack.blogspot.co.uk/p/handlers-for-logging.html which has a whole bunch of handlers written by people for specific requirements which don't warrant adding functionality directly in the stdlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 14:20:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 13:20:35 +0000 Subject: [issue15677] Gzip/zlib allows for compression level=0 In-Reply-To: <1345062923.32.0.954619584637.issue15677@psf.upfronthosting.co.za> Message-ID: <3XzwhL2ZcHzQBX@mail.python.org> Roundup Robot added the comment: New changeset 735ef27fa231 by Nadeem Vawda in branch '2.7': Issue #15677: Document that zlib and gzip accept a compression level of 0 to mean 'no compression'. http://hg.python.org/cpython/rev/735ef27fa231 New changeset f6c4c178da56 by Nadeem Vawda in branch '2.7': Issue #15677: Also fix docstrings in zlib module. http://hg.python.org/cpython/rev/f6c4c178da56 New changeset 9dde30690f44 by Nadeem Vawda in branch '3.2': Issue #15677: Document that zlib and gzip accept a compression level of 0 to mean 'no compression'. http://hg.python.org/cpython/rev/9dde30690f44 New changeset 0e48bf45313c by Nadeem Vawda in branch '3.3': Issue #15677: Document that zlib and gzip accept a compression level of 0 to mean 'no compression'. http://hg.python.org/cpython/rev/0e48bf45313c New changeset 21335c9fcec0 by Nadeem Vawda in branch 'default': Issue #15677: Document that zlib and gzip accept a compression level of 0 to mean 'no compression'. http://hg.python.org/cpython/rev/21335c9fcec0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 14:25:21 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 11 Nov 2012 13:25:21 +0000 Subject: [issue15677] Gzip/zlib allows for compression level=0 In-Reply-To: <1345062923.32.0.954619584637.issue15677@psf.upfronthosting.co.za> Message-ID: <1352640321.53.0.322583933578.issue15677@psf.upfronthosting.co.za> Nadeem Vawda added the comment: Committed. Thanks for the patch! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 14:46:53 2012 From: report at bugs.python.org (Phil Connell) Date: Sun, 11 Nov 2012 13:46:53 +0000 Subject: [issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems In-Reply-To: <1352558170.33.0.527628732316.issue16449@psf.upfronthosting.co.za> Message-ID: <1352641613.38.0.490750411808.issue16449@psf.upfronthosting.co.za> Phil Connell added the comment: I've updated the type to enhancement (it seems like a grey area to me - it's a behavioural fix for a niche use case). I suggested a patch rather than simply subclassing RotatingFileHandler since: - The subclass would just have a copy of RotatingFileHandler's doRollover method with a one-line change. - The proposed fix is functionally equivalent to the current code for all currently working uses. Thanks for the offer of having an extension linked from your blog. I don't think it's appropriate for this case (since it's just a slightly modified copy of the stdlib code - I'll probably just keep the patch along with a few other compatibility hacks we have) although I may have something for you in future (we do have a subclass that compresses old logs). ---------- type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 14:57:52 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Nov 2012 13:57:52 +0000 Subject: [issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems In-Reply-To: <1352641613.38.0.490750411808.issue16449@psf.upfronthosting.co.za> Message-ID: <1352642231.3360.6.camel@localhost.localdomain> Antoine Pitrou added the comment: > I've updated the type to enhancement (it seems like a grey area to me > - it's a behavioural fix for a niche use case). > > I suggested a patch rather than simply subclassing RotatingFileHandler > since: > - The subclass would just have a copy of RotatingFileHandler's > doRollover method with a one-line change. > - The proposed fix is functionally equivalent to the current code > for all currently working uses. You may just as well monkeypatch os.rename() to fallback on shutil.move() if the filenames are on a /dev/shm filesystem (or you could bug QNX to fix their broken filesystem...). >From a code quality and readability standpoint, os.rename() conveys the intended semantics clearly, while shutil.move() doesn't, so switching to shutil.move() in the stdlib would be a regression. Also, doing this in logging would open the door to doing the same thing in other modules. Even a critical piece of infrastructure such as importlib relies on os.rename() working properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 15:19:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 14:19:22 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1352643562.72.0.791248491404.issue16427@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Stefan, thank you for the suggestion. The test showed that, in fact, at least under some x86 there is no performance decrease when using memcpy on nonaligned data. This is good news. The code can left simple and even some doubtful potential undefined behavior was removed. Additional microbenchmarks: $ ./python -m timeit -n 1 -s "t = memview(b'a' * 10**8)" "hash(t)" $ ./python -m timeit -n 1 -s "t = memview(b'a' * 10**8)[1:]" "hash(t)" $ ./python -m timeit -n 1 -s "t = memview(b'a' * 10**8)[8:]" "hash(t)" original patched speedup bytes 181 msec 46 msec 3.9x UCS1 429 msec 46.2 msec 9.3x UCS2 179 msec 91.9 msec 1.9x UCS4 183 msec 184 msec 1x memview() 362 msec 91.7 msec 3.9x memview()[1:] 362 msec 93.2 msec 3.9x memview()[8:] 362 msec 92.4 msec 3.9x I don't know how it will be on other platforms. ---------- Added file: http://bugs.python.org/file27956/fast_hash_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 15:49:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 14:49:45 +0000 Subject: [issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems In-Reply-To: <1352558170.33.0.527628732316.issue16449@psf.upfronthosting.co.za> Message-ID: <1352645385.21.0.243263704177.issue16449@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Doesn't the "rotator" attribute break atomicity? A careful rotator should first rename the source to the temporary file, process the data and save it to other temporary file, and then rename the result to the destination and remove the first temporary file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 16:20:00 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Nov 2012 15:20:00 +0000 Subject: [issue16124] fcntl_ioctl still not 100% sane with unsigned longs In-Reply-To: <1349322414.95.0.371484313067.issue16124@psf.upfronthosting.co.za> Message-ID: <1352647200.37.0.315055704241.issue16124@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +skrah, trent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 16:44:50 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 Nov 2012 15:44:50 +0000 Subject: [issue14215] http://www.python.org/dev/peps/ title is python.org In-Reply-To: <1331102600.96.0.801989456091.issue14215@psf.upfronthosting.co.za> Message-ID: <1352648690.11.0.0528098216303.issue14215@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed with commit 11779150cf87 in the peps repo. May need a PEP addition or PEP title change to trigger, but it's too minor to force that right now. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 16:46:40 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 Nov 2012 15:46:40 +0000 Subject: [issue14215] http://www.python.org/dev/peps/ title is python.org In-Reply-To: <1331102600.96.0.801989456091.issue14215@psf.upfronthosting.co.za> Message-ID: <1352648800.48.0.34136422961.issue14215@psf.upfronthosting.co.za> Georg Brandl added the comment: @ Nick/Ezio: the catch was that the /dev/peps/ directory is handled in addition to /dev/peps/pep-0000/, which always had a nice title. For all PEPs, four files are generated (although it seems sufficient to have two), while for /dev/peps/, only body.html was copied over to its directory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 17:34:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 16:34:08 +0000 Subject: [issue15861] ttk.Treeview "unmatched open brace in list" In-Reply-To: <1346794903.35.0.326071924778.issue15861@psf.upfronthosting.co.za> Message-ID: <1352651648.12.0.67322029254.issue15861@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 17:41:24 2012 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 11 Nov 2012 16:41:24 +0000 Subject: [issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems In-Reply-To: <1352558170.33.0.527628732316.issue16449@psf.upfronthosting.co.za> Message-ID: <1352652084.22.0.550017133692.issue16449@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Doesn't the "rotator" attribute break atomicity? Which rotator do you mean? The default rotator is None, which leads to os.rename being called. If you're referring to the example in the documentation (cookbook) - it was intended purely as an example, and the paragraph under the snippet does say it's only intended for illustrative purposes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 17:52:34 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Nov 2012 16:52:34 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1352652754.87.0.941159470308.issue8865@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 18:16:43 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Nov 2012 17:16:43 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <1352654203.06.0.580256961394.issue14631@psf.upfronthosting.co.za> Antoine Pitrou added the comment: WeakMethod sounds like a good name to me. However, instead of acting as a proxy, I think it should act as a regular weakref (i.e. you have to call it to get the actual method object). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 18:20:18 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Nov 2012 17:20:18 +0000 Subject: [issue16396] Importing ctypes.wintypes on Linux gives a traceback In-Reply-To: <1351956172.0.0.64927799046.issue16396@psf.upfronthosting.co.za> Message-ID: <1352654418.6.0.403984807087.issue16396@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +amaury.forgeotdarc, belopolsky, meador.inge versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 18:23:01 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Nov 2012 17:23:01 +0000 Subject: [issue16397] UserString doesn't combine nicely with strings In-Reply-To: <1351966393.52.0.468233404693.issue16397@psf.upfronthosting.co.za> Message-ID: <1352654581.24.0.988849504402.issue16397@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Jorge, can we close this or do you still have a specific suggestion. Also, if you reply by mail, please snip previous messages as they are already posted. ---------- nosy: +terry.reedy type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 18:29:03 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Nov 2012 17:29:03 +0000 Subject: [issue16405] Explain how to set up the whitespace commit hook locally In-Reply-To: <1352041451.32.0.465920697634.issue16405@psf.upfronthosting.co.za> Message-ID: <1352654943.13.0.631715904204.issue16405@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I would be helped by such an explanation in the devguide. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 18:41:26 2012 From: report at bugs.python.org (Jorge Cardona) Date: Sun, 11 Nov 2012 17:41:26 +0000 Subject: [issue16397] UserString doesn't combine nicely with strings In-Reply-To: <1351966393.52.0.468233404693.issue16397@psf.upfronthosting.co.za> Message-ID: <1352655686.51.0.161586214874.issue16397@psf.upfronthosting.co.za> Jorge Cardona added the comment: Hi, this can be closed. Thanks. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 18:42:38 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Nov 2012 17:42:38 +0000 Subject: [issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception In-Reply-To: <1349420361.8.0.0219880030745.issue16140@psf.upfronthosting.co.za> Message-ID: <1352655758.57.0.102360194472.issue16140@psf.upfronthosting.co.za> Gregory P. Smith added the comment: That test is gross... it creates a nasty cycle of an instance back to itself via a stubbed out nested function's enclosing scope. I'm sanitizing it now to simplify the code and not have any cycles. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 18:53:22 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Nov 2012 17:53:22 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352656402.38.0.843121187183.issue16418@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Juraj: Is the example behavior from Py2 or Py3? The meaning of 'range' changed. In Py2, xrange would be the correct choice for 'choice'. Does argparse actually convert (x)range objects to a list or set (the help indicates the latter) for internal use? That would be foolish as 'n in ' is an O(1) operation. (I don't remember is that works for xrange.) For instance, range(0, 1000, 2) is a nice way to say 'even count less than 1000'. If it is not so converted, converting for display is also foolish. 'range(0, 1000, 2)' is clearer than an explicit sequence. ---------- nosy: +bethard, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 19:07:35 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Nov 2012 18:07:35 +0000 Subject: [issue16453] Inconsistent dead weakref equality Message-ID: <1352657255.44.0.0509101223416.issue16453@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Dead weakrefs to a given object happen to be equal if they don't have a callback, but unequal if they do. However, they are always equal when alive: >>> class O: pass ... >>> o = O() >>> def cb(_): pass ... >>> q = weakref.ref(o) >>> r = weakref.ref(o) >>> s = weakref.ref(o, cb) >>> t = weakref.ref(o, cb) >>> q == r True >>> s == t True >>> del o >>> q() is None True >>> q == r True >>> s == t False This may be related to the following optimization (?): >>> q is r True >>> s is t False ---------- components: Library (Lib) messages: 175378 nosy: fdrake, pitrou, tim_one priority: normal severity: normal status: open title: Inconsistent dead weakref equality type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 19:11:53 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Nov 2012 18:11:53 +0000 Subject: [issue16453] Inconsistent dead weakref equality In-Reply-To: <1352657255.44.0.0509101223416.issue16453@psf.upfronthosting.co.za> Message-ID: <1352657513.2.0.600546820968.issue16453@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Aha, it is even worse: >>> o = O() >>> q = weakref.ref(o) >>> r = weakref.ref(o) >>> del o >>> q() is None True >>> q == r True >>> q != r True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 19:21:38 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Nov 2012 18:21:38 +0000 Subject: [issue16397] UserString doesn't combine nicely with strings In-Reply-To: <1351966393.52.0.468233404693.issue16397@psf.upfronthosting.co.za> Message-ID: <1352658098.84.0.488518160261.issue16397@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> works for me stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 19:42:01 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 18:42:01 +0000 Subject: [issue16453] Inconsistent dead weakref equality In-Reply-To: <1352657255.44.0.0509101223416.issue16453@psf.upfronthosting.co.za> Message-ID: <3Y03qD2rT6zRCC@mail.python.org> Roundup Robot added the comment: New changeset 590f1b55abea by Antoine Pitrou in branch '3.2': Issue #16453: Fix equality testing of dead weakref objects. http://hg.python.org/cpython/rev/590f1b55abea New changeset c00e2c1cb3a7 by Antoine Pitrou in branch '3.3': Issue #16453: Fix equality testing of dead weakref objects. http://hg.python.org/cpython/rev/c00e2c1cb3a7 New changeset 9e80ea48ff39 by Antoine Pitrou in branch 'default': Issue #16453: Fix equality testing of dead weakref objects. http://hg.python.org/cpython/rev/9e80ea48ff39 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 19:49:06 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 18:49:06 +0000 Subject: [issue16453] Inconsistent dead weakref equality In-Reply-To: <1352657255.44.0.0509101223416.issue16453@psf.upfronthosting.co.za> Message-ID: <3Y03zP3lR3zQYf@mail.python.org> Roundup Robot added the comment: New changeset 13b74c0b040c by Antoine Pitrou in branch '2.7': Issue #16453: Fix equality testing of dead weakref objects. http://hg.python.org/cpython/rev/13b74c0b040c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 19:51:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 18:51:28 +0000 Subject: [issue1160] Medium size regexp crashes python In-Reply-To: <1189670456.94.0.669298411185.issue1160@psf.upfronthosting.co.za> Message-ID: <1352659888.94.0.206269826526.issue1160@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If we will considered it's important enough to fix, here are patches. ---------- keywords: +patch Added file: http://bugs.python.org/file27957/sre_code_ucs4-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 19:52:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 18:52:01 +0000 Subject: [issue1160] Medium size regexp crashes python In-Reply-To: <1189670456.94.0.669298411185.issue1160@psf.upfronthosting.co.za> Message-ID: <1352659921.43.0.387770576575.issue1160@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file27958/sre_code_ucs4-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 20:04:22 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Nov 2012 19:04:22 +0000 Subject: [issue16453] Inconsistent dead weakref equality In-Reply-To: <1352657255.44.0.0509101223416.issue16453@psf.upfronthosting.co.za> Message-ID: <1352660662.24.0.396323180377.issue16453@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Now fixed. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 20:06:21 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 19:06:21 +0000 Subject: [issue1160] Medium size regexp crashes python In-Reply-To: <1189670456.94.0.669298411185.issue1160@psf.upfronthosting.co.za> Message-ID: <1352660781.59.0.645478436548.issue1160@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: test needed -> patch review Added file: http://bugs.python.org/file27959/sre_code_ucs4_test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 20:07:29 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Nov 2012 19:07:29 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <1352660849.48.0.369211297519.issue14631@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch adding a WeakMethod class. It still lacks docs, I'll add some if people agree on the principle. ---------- keywords: +patch Added file: http://bugs.python.org/file27960/weakmethod.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 20:12:04 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 11 Nov 2012 19:12:04 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <3Y04Tv5D6ZzRCr@mail.python.org> Roundup Robot added the comment: New changeset 797de1864fd9 by Antoine Pitrou in branch '3.3': Add a test for hashing of unaligned memory buffers (from issue #16427). http://hg.python.org/cpython/rev/797de1864fd9 New changeset 9cb1366b251b by Antoine Pitrou in branch 'default': Add a test for hashing of unaligned memory buffers (from issue #16427). http://hg.python.org/cpython/rev/9cb1366b251b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 20:32:47 2012 From: report at bugs.python.org (Juraj Variny) Date: Sun, 11 Nov 2012 19:32:47 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352662367.49.0.199145887353.issue16418@psf.upfronthosting.co.za> Juraj Variny added the comment: It was Python 2.7 . But if range shouldn't be used for large number of options, arguing whether it's O(1) is splitting hairs, no? I'll remove the choices from my code. Adding new type for port is overkill, users should know what legal TCP port numbers are. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 20:48:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 19:48:10 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1352663290.02.0.210765160038.issue8865@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I was unable to apply the patch automatically, so I had to do it manually. Here is an updated patch for review. I did not consider it in detail yet, but it seems to correct these errors. ---------- type: behavior -> crash versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.1 Added file: http://bugs.python.org/file27961/select_concurrent_poll.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 20:55:05 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Nov 2012 19:55:05 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352663705.72.0.543471051014.issue16418@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am arguing that (x)range *should* be usable for large numbers of options *because* the containment test is O(1). What happens is you *do* use xrange instead of range in 2.7 or 3.x instead of 2.7? In 2.x, range(n) *is* a list so that is a bad choice for large n, regardless of the display issue, which could be fixed separately as is being done on other issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 20:55:29 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Nov 2012 19:55:29 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1352663729.6.0.883323383303.issue8865@psf.upfronthosting.co.za> Gregory P. Smith added the comment: i'm looking at getting this in. ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 21:55:06 2012 From: report at bugs.python.org (Daniel Urban) Date: Sun, 11 Nov 2012 20:55:06 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <1352667306.51.0.224535754361.issue14631@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +daniel.urban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 22:21:22 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Nov 2012 21:21:22 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1352668882.15.0.844522262116.issue8865@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Christian Schubert (apexo) - Would you please submit a PSF contributor agreement form? http://www.python.org/psf/contrib/ http://www.python.org/psf/contrib/contrib-form-python/ thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 22:23:49 2012 From: report at bugs.python.org (Simon Feltman) Date: Sun, 11 Nov 2012 21:23:49 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <1352669029.81.0.412082202883.issue14631@psf.upfronthosting.co.za> Simon Feltman added the comment: The WeakCallableRef that was attached seemed to support regular functions (or anything callable) which is nice. The naming also leaves room for a WeakCallableProxy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 22:34:09 2012 From: report at bugs.python.org (Simon Feltman) Date: Sun, 11 Nov 2012 21:34:09 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <1352669649.02.0.216519988144.issue14631@psf.upfronthosting.co.za> Simon Feltman added the comment: Some more complex examples from various libraries: https://github.com/django/django/blob/master/django/dispatch/saferef.py https://github.com/11craft/louie/blob/master/louie/saferef.py I think both of these originated in pydispatcher. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 22:49:34 2012 From: report at bugs.python.org (Ray Donnelly) Date: Sun, 11 Nov 2012 21:49:34 +0000 Subject: [issue16454] Mostly for discussion: _winapi as builtin for bootstrapping distutils. Message-ID: <1352670574.14.0.083815608214.issue16454@psf.upfronthosting.co.za> New submission from Ray Donnelly: I'm submitting this patch as it was suggested I do so by Antoine Pitrou on #python-dev. As such, it's more a point of discussion than a patch I'm trying to get merged (for one thing, my build is a MinGW GCC compiled and I've not considered the MSVC Windows build). I ran into a problem with a customisation I made to cygwinccompiler.py where I wanted to use Popen to ask gcc where it's ld is: out = Popen(gcc+' --print-prog-name ld', shell=True, stdout=PIPE).stdout This has worked fine before on 2.7.3, but with 3.3.0, subprocess can't be imported as _winapi isn't builtin, instead, it's built by setup.py as a module. So is this the right thing to do? Or is distutils not supposed to use subprocess during bootstrapping? ---------- files: _winapi_as_builtin_for_distutils_bootstrap.patch keywords: patch messages: 175393 nosy: Ray.Donnelly, pitrou, sbt priority: normal severity: normal status: open title: Mostly for discussion: _winapi as builtin for bootstrapping distutils. type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file27962/_winapi_as_builtin_for_distutils_bootstrap.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 22:50:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 21:50:31 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1352670631.17.0.708825352629.issue8865@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In general the patch looks good to me. I only get rid of non-needed macros. ---------- stage: -> test needed Added file: http://bugs.python.org/file27963/select_concurrent_poll.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 22:51:05 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Nov 2012 21:51:05 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1352670665.27.0.59190503073.issue8865@psf.upfronthosting.co.za> Gregory P. Smith added the comment: here's an updated patch. it strikes me that this should not be a very common problem. how many applications are going to share the same poll object _across_ multiple threads? if they do and the file descriptor they'll be spending a lot of time mallocing and freeing new pollfd ufds arrays in each thread as a result as they all fight for ownership of the pollObject's ufds. ---------- Added file: http://bugs.python.org/file27964/issue8865-poll-multithread-gps01.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 22:51:52 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 11 Nov 2012 21:51:52 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1352670712.81.0.170499667984.issue16444@psf.upfronthosting.co.za> STINNER Victor added the comment: > TESTFN_UNDECODABLE is not detected for cp1250, cp1251, cp1252, cp1254, cp1257 and cp1258. The Python encoding and the real codec used by Windows are different: Python fails to decode bytes 0x80-0x9f, but Windows does decode them. I prefer to avoid these bytes to not rely too much on the Python codec. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 22:54:08 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Nov 2012 21:54:08 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1352670848.92.0.202689824623.issue8865@psf.upfronthosting.co.za> Gregory P. Smith added the comment: our patches are similar. i updated it to use long long and Py_ssize_t and Py_CLEAR and Py_RETURN_NONE in a few places and added comments. getting rid of the CLEAR_UFDS macro as you did is a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 22:56:21 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 21:56:21 +0000 Subject: [issue11981] dupe self.fp.tell() in zipfile.ZipFile.writestr In-Reply-To: <1304354217.95.0.422937158098.issue11981@psf.upfronthosting.co.za> Message-ID: <1352670981.83.0.686351624967.issue11981@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- stage: -> commit review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 23:08:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Nov 2012 22:08:49 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1352671729.72.0.971269918706.issue16444@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: These encodings used not only on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 23:10:08 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Nov 2012 22:10:08 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1352671808.41.0.725942811757.issue8865@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > it strikes me that this should not be a very common problem. how many > applications are going to share the same poll object _across_ multiple > threads? Indeed that doesn't sound very likely. How about raising an error on concurrent modification, instead of trying to make it thread-safe? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 23:14:15 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 11 Nov 2012 22:14:15 +0000 Subject: [issue16455] sys.getfilesystemencoding() is not the locale encoding on FreeBSD and OpenSolaris when the locale is not set Message-ID: <1352672055.11.0.23985291602.issue16455@psf.upfronthosting.co.za> New submission from STINNER Victor: On FreeBSD and OpenIndiana, sys.getfilesystemencoding() is 'ascii' when the locale is not set, whereas the locale encoding is ISO-8859-1. This inconsistency causes different issue. For example, os.fsencode(sys.argv[1]) fails if the argument is not ASCII because sys.argv are decoded from the locale encoding (by _Py_char2wchar()). sys.getfilesystemencoding() is 'ascii' because nl_langinfo(CODESET) is used to to get the locale encoding and nl_langinfo(CODESET) announces ASCII (or an alias of this encoding). Python should detect this case and set sys.getfilesystemencoding() to 'iso8859-1' if the locale encoding is 'iso8859-1' whereas nl_langinfo(CODESET) announces ASCII. We can for example decode b'\xe9' with mbstowcs() and check if it fails or if the result is U+00E9. ---------- components: Unicode messages: 175401 nosy: ezio.melotti, haypo priority: normal severity: normal status: open title: sys.getfilesystemencoding() is not the locale encoding on FreeBSD and OpenSolaris when the locale is not set versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 23:15:48 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 11 Nov 2012 22:15:48 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1352672148.21.0.589310476134.issue16444@psf.upfronthosting.co.za> STINNER Victor added the comment: > I suppose you noticed you broke a bunch of buildbots :) Failures occur on FreeBSD, OpenIndiana and some other buildbots which don't set a locale and so use the "C" locale. main() decodes command line arguments from the locale encoding using _Py_char2wchar(). On these OSes, the "C" locale uses the ISO-8859-1 encoding, but the problem is that nl_langinfo(CODESET) announces ASCII :-/ test_cmd_line.test_undecodable_code() handles this case. Extract of a comment: # _Py_char2wchar() decoded b'\xff' as '\xff' even if the locale is # C and the locale encoding is ASCII. It occurs on FreeBSD, Solaris # and Mac OS X. Mac OS X is now using UTF-8 to decode the command line arguments. I just created the issue #16455 to fix FreeBSD and OpenIndiana. I propose to close this issue because I consider it as fixed (#16455 will reenable TESTFN_UNDECODABLE in test_cmd_line_script). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 23:48:35 2012 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Sun, 11 Nov 2012 22:48:35 +0000 Subject: [issue15667] PEP 3121, 384 refactoring applied to pickle module In-Reply-To: <1345038957.09.0.78094807427.issue15667@psf.upfronthosting.co.za> Message-ID: <1352674115.58.0.46255279717.issue15667@psf.upfronthosting.co.za> Andreas St?hrk added the comment: See also issue #11349. ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 23:51:36 2012 From: report at bugs.python.org (Wojtek Szymilowski) Date: Sun, 11 Nov 2012 22:51:36 +0000 Subject: [issue16456] UnicodeDecodeError thrown for 'encode' operation on string Message-ID: <1352674296.04.0.101357421426.issue16456@psf.upfronthosting.co.za> New submission from Wojtek Szymilowski: UnicodeDecodeError exception is reported for encode operation on strings. This issue does not surface for the same operation on unicode string (UnicodeEncodeError exception is correctly reported). ---- string: >>> 'AB\xff'.encode('ascii') Traceback (most recent call last): File "", line 1, in 'AB\xff'.encode('ascii') UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 2: ordinal not in range(128) ---- unicode string: >>> u'AB\xff'.encode('ascii') Traceback (most recent call last): File "", line 1, in u'AB\xff'.encode('ascii') UnicodeEncodeError: 'ascii' codec can't encode character u'\xff' in position 2: ordinal not in range(128) ---------- components: Unicode messages: 175404 nosy: Wojtek.Szymilowski, ezio.melotti priority: normal severity: normal status: open title: UnicodeDecodeError thrown for 'encode' operation on string type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 11 23:54:45 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 11 Nov 2012 22:54:45 +0000 Subject: [issue16454] Mostly for discussion: _winapi as builtin for bootstrapping distutils. In-Reply-To: <1352670574.14.0.083815608214.issue16454@psf.upfronthosting.co.za> Message-ID: <1352674485.68.0.79788361514.issue16454@psf.upfronthosting.co.za> Richard Oudkerk added the comment: The patch does not apply correctly against vanilla Python 3.3. I would guess that you are using a version of Python which has been patched to add mingw support. Where did you get it from? (In vanilla Python 3.3, setup.py does not contain any mention of _winapi.c.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 00:12:16 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 11 Nov 2012 23:12:16 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1352675536.75.0.987130459702.issue16444@psf.upfronthosting.co.za> STINNER Victor added the comment: > These encodings used not only on Windows. You can uses cpXXX encodings explictly to read or write a file, but these encodings are not used for sys.getfilesystemencoding() (or sys.stdout.encoding). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 00:28:46 2012 From: report at bugs.python.org (Ray Donnelly) Date: Sun, 11 Nov 2012 23:28:46 +0000 Subject: [issue16454] Mostly for discussion: _winapi as builtin for bootstrapping distutils. In-Reply-To: <1352670574.14.0.083815608214.issue16454@psf.upfronthosting.co.za> Message-ID: <1352676526.23.0.719992022541.issue16454@psf.upfronthosting.co.za> Ray Donnelly added the comment: I should have checked the situation better, it is indeed towards the back end of a series of patches to enable MinGW compilation, so the issue is irrelevant without the preceding patches. Sorry for the noise. ---------- resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 00:34:24 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 11 Nov 2012 23:34:24 +0000 Subject: [issue16455] sys.getfilesystemencoding() is not the locale encoding on FreeBSD and OpenSolaris when the locale is not set In-Reply-To: <1352672055.11.0.23985291602.issue16455@psf.upfronthosting.co.za> Message-ID: <1352676864.76.0.63024120757.issue16455@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached patch works around the CODESET issue on OpenIndiana and FreeBSD. If the LC_CTYPE locale is "C" and nl_langinfo(CODESET) returns ASCII (or an alias of this encoding), b"\xE9" is decoded from the locale encoding: if the result is U+00E9, the patch Python uses ISO-8859-1. (If decoding fails, the locale encoding is really ASCII, the workaround is not used.) If the result is different (b'\xe9' is not decoded from the locale encoding to U+00E9), a ValueError is raised. I wrote this test to detect bugs. I hope that our buildbots will validate the code. We may choose a different behaviour (ex: keep ASCII). Example on FreeBSD 8.2, original Python 3.4: $ ./python >>> import sys, locale >>> sys.getfilesystemencoding() 'ascii' >>> locale.getpreferredencoding() 'US-ASCII' Example on FreeBSD 8.2, patched Python 3.4: $ ./python >>> import sys, locale >>> sys.getfilesystemencoding() 'iso8859-1' >>> locale.getpreferredencoding() 'iso8859-1' ---------- keywords: +patch Added file: http://bugs.python.org/file27965/workaround_codeset.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 00:44:34 2012 From: report at bugs.python.org (Christian Schubert) Date: Sun, 11 Nov 2012 23:44:34 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1352677474.03.0.703996686357.issue8865@psf.upfronthosting.co.za> Christian Schubert added the comment: > How about raising an error on concurrent modification, instead of trying to make it thread-safe? That's totally fine with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 00:54:59 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 11 Nov 2012 23:54:59 +0000 Subject: [issue16455] sys.getfilesystemencoding() is not the locale encoding on FreeBSD and OpenSolaris when the locale is not set In-Reply-To: <1352672055.11.0.23985291602.issue16455@psf.upfronthosting.co.za> Message-ID: <1352678099.01.0.304537834188.issue16455@psf.upfronthosting.co.za> STINNER Victor added the comment: Some tests are failing with the patch: ====================================================================== FAIL: test_undecodable_env (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/haypo/prog/python/default/Lib/test/test_subprocess.py", line 1606, in test_undecodable_env self.assertEqual(stdout.decode('ascii'), ascii(value)) AssertionError: "'abc\\xff'" != "'abc\\udcff'" - 'abc\xff' ? ^ + 'abc\udcff' ? ^^^ ====================================================================== FAIL: test_strcoll_with_diacritic (test.test_locale.TestEnUSCollation) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/haypo/prog/python/default/Lib/test/test_locale.py", line 364, in test_strcoll_with_diacritic self.assertLess(locale.strcoll('\xe0', 'b'), 0) AssertionError: 126 not less than 0 ====================================================================== FAIL: test_strxfrm_with_diacritic (test.test_locale.TestEnUSCollation) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/haypo/prog/python/default/Lib/test/test_locale.py", line 367, in test_strxfrm_with_diacritic self.assertLess(locale.strxfrm('\xe0'), locale.strxfrm('b')) AssertionError: '\xe0' not less than 'b' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 00:57:40 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 11 Nov 2012 23:57:40 +0000 Subject: [issue16456] UnicodeDecodeError thrown for 'encode' operation on string In-Reply-To: <1352674296.04.0.101357421426.issue16456@psf.upfronthosting.co.za> Message-ID: <1352678260.94.0.804740030943.issue16456@psf.upfronthosting.co.za> STINNER Victor added the comment: 'AB\xff'.encode('ascii') raises a UnicodeDecodeError because the byte string 'AB\xff' is decoded from the default encoding (sys.getdefaultencoding(), which is 'ASCII' in most cases), before the .encode() method is called. This is not a Python bug, but it is surprising. You should try Python 3 which does not have implicit conversion from/to bytes/unicode. ---------- nosy: +haypo resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 01:11:52 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 12 Nov 2012 00:11:52 +0000 Subject: [issue16454] Mostly for discussion: _winapi as builtin for bootstrapping distutils. In-Reply-To: <1352670574.14.0.083815608214.issue16454@psf.upfronthosting.co.za> Message-ID: <1352679112.36.0.366317732692.issue16454@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 01:17:39 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Nov 2012 00:17:39 +0000 Subject: [issue16457] Allow operator 'getter' methods to take a list and return a tuple Message-ID: <1352679459.02.0.414122398053.issue16457@psf.upfronthosting.co.za> New submission from R. David Murray: Consider this code snippet, simplified from a real application: def display(self, *columns) getter = attrgetter(*columns) toprint = [[str(x) for x in getter(row)] for row in self._rows] This works great...as long as there are two or more columns to print. If there is only one column, it bombs because the getter returns a value instead of a tuple. This would not be a problem in and of itself, but there is no way to tell attrgetter that I want a tuple even if there is only one value. I believe it would be backward compatible to allow: attrgetter(['a']) itemgetter(['a', 'b']) to return a tuple, since a list cannot be an attribute name. The same would apply to itemgetter, since a list cannot be a dictionary key. ---------- components: Library (Lib) messages: 175412 nosy: r.david.murray priority: normal severity: normal stage: needs patch status: open title: Allow operator 'getter' methods to take a list and return a tuple type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 01:24:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 12 Nov 2012 00:24:14 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <3Y0CQ62twGzRJX@mail.python.org> Roundup Robot added the comment: New changeset 6017f09ead53 by Victor Stinner in branch '3.3': Issue #16218, #16444: Backport improvment on tests for non-ASCII characters http://hg.python.org/cpython/rev/6017f09ead53 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 01:24:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 12 Nov 2012 00:24:15 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <3Y0CQ71SmZzRJr@mail.python.org> Roundup Robot added the comment: New changeset 6017f09ead53 by Victor Stinner in branch '3.3': Issue #16218, #16444: Backport improvment on tests for non-ASCII characters http://hg.python.org/cpython/rev/6017f09ead53 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 02:39:23 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 12 Nov 2012 01:39:23 +0000 Subject: [issue16457] Allow operator 'getter' methods to take a list and return a tuple In-Reply-To: <1352679459.02.0.414122398053.issue16457@psf.upfronthosting.co.za> Message-ID: <1352684362.98.0.281078392673.issue16457@psf.upfronthosting.co.za> Nick Coghlan added the comment: Lists can't be dictionary keys, but they can appear in other mappings (e.g. an id-keyed mapping). So, while you could add this capability to attrgetter without breaking backwards compatibility, it's not possible for itemgetter. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 03:49:27 2012 From: report at bugs.python.org (Karthk Rajagopalan) Date: Mon, 12 Nov 2012 02:49:27 +0000 Subject: [issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE Message-ID: <1352688567.58.0.199976634188.issue16458@psf.upfronthosting.co.za> New submission from Karthk Rajagopalan: Please download subprocess.zip and extract the archive. Run - perl test.pl you will notice 'invalid handle' error on duplicating STD_INPUT_HANDLE in python. This is observed in Windows XP SP3. Vista SP2 and higher platforms doesn't show this failure when I checked. "test.pl" spawn a python process "test.py" using CREATE_NEW_PROCESS_GROUP flag. Before it does, it close STDIN and create a listening socket. Perl under the hood, convert the socket handle to file descriptor using open_osfhandle(..) call. When it does this, the C runtime set the standard input handle to this descriptor for console app. [ See msvcr* osfinfo.c code - SetStdHandle( STD_INPUT_HANDLE, (HANDLE)value ) ]. As a result, when you get the STD_INPUT_HANDLE, you will get the new one. Duplicating this handle, hence throw the invalid handle error in Windows XP SP3. When I looked at MSDN for DuplicateHandle(..), it is mentioned not to duplicate socket handle using this call. So I suspect something going wrong in XP platform. To fix this issue, I have come up with a patch - python-2143_patch. Please take a look and let me know your comments. -Karthik ---------- components: Windows files: subprocess.zip messages: 175416 nosy: kartlee05 priority: normal severity: normal status: open title: subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file27966/subprocess.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 03:53:16 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 12 Nov 2012 02:53:16 +0000 Subject: [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1352688796.68.0.698120788773.issue16267@psf.upfronthosting.co.za> Nick Coghlan added the comment: It took me a while to get my brain back up to speed with the full rationale behind the current design (mostly by rereading the multitude of comment on #11610). As Darren says, the main advantage of the current scheme is that the wrapper descriptors deliberately *don't* have any concept of abstract/non-abstract independent of the methods that make them up. So I think the main thing to do is change the documentation of the affected descriptors to be more explicit about the required order of the replacement decorators. Otherwise people are likely to map "abstractXmethod" to "@abstractmethod + @Xmethod" and write them in that order (which won't work). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 07:42:14 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 12 Nov 2012 06:42:14 +0000 Subject: [issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT In-Reply-To: <1305503118.99.0.0671211382341.issue12082@psf.upfronthosting.co.za> Message-ID: <1352702534.76.0.524909736755.issue12082@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Should the defines be removed then, because they're kind of false promises for the user. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 07:51:28 2012 From: report at bugs.python.org (Firat Ozgul) Date: Mon, 12 Nov 2012 06:51:28 +0000 Subject: [issue16459] sys.stdout.write printing length of string Message-ID: <1352703088.16.0.793564052776.issue16459@psf.upfronthosting.co.za> New submission from Firat Ozgul: On Python 3.3 under Windows and GNU/Linux, sys.stdout.write prints the length of string along with the string itself: >>> sys.stdout.write("a_string") a_string8 Note the '8' at the end of 'a_string'. Is it expected behavior? ---------- components: None messages: 175419 nosy: firatozgul priority: normal severity: normal status: open title: sys.stdout.write printing length of string versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 08:22:44 2012 From: report at bugs.python.org (Firat Ozgul) Date: Mon, 12 Nov 2012 07:22:44 +0000 Subject: [issue16459] sys.stdout.write printing length of string In-Reply-To: <1352703088.16.0.793564052776.issue16459@psf.upfronthosting.co.za> Message-ID: <1352704964.76.0.143604508154.issue16459@psf.upfronthosting.co.za> Firat Ozgul added the comment: Although I do not know the reason for change, it seems that this is expected behavior as of Python 3.0 in interactive shell. Closing the record as 'invalid'. ---------- resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 08:23:10 2012 From: report at bugs.python.org (Firat Ozgul) Date: Mon, 12 Nov 2012 07:23:10 +0000 Subject: [issue16459] sys.stdout.write printing length of string In-Reply-To: <1352703088.16.0.793564052776.issue16459@psf.upfronthosting.co.za> Message-ID: <1352704990.33.0.124624028703.issue16459@psf.upfronthosting.co.za> Changes by Firat Ozgul : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 08:23:31 2012 From: report at bugs.python.org (Kushal Das) Date: Mon, 12 Nov 2012 07:23:31 +0000 Subject: [issue16459] sys.stdout.write printing length of string In-Reply-To: <1352703088.16.0.793564052776.issue16459@psf.upfronthosting.co.za> Message-ID: <1352705011.02.0.861349981926.issue16459@psf.upfronthosting.co.za> Kushal Das added the comment: sys.stdout.write returns the length of the string it printed. try these: x = sys.stdout.write("abc") print x or from console python -c 'import sys ; sys.stdout.write("abc")' ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 08:28:04 2012 From: report at bugs.python.org (Firat Ozgul) Date: Mon, 12 Nov 2012 07:28:04 +0000 Subject: [issue16459] sys.stdout.write printing length of string In-Reply-To: <1352703088.16.0.793564052776.issue16459@psf.upfronthosting.co.za> Message-ID: <1352705284.54.0.991925841612.issue16459@psf.upfronthosting.co.za> Firat Ozgul added the comment: Thank you for the explanation, kushaldas. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 08:39:11 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Nov 2012 07:39:11 +0000 Subject: [issue16451] Remove duplication between slice_indices and compute_slice_indices In-Reply-To: <1352559451.13.0.963654733597.issue16451@psf.upfronthosting.co.za> Message-ID: <1352705951.78.0.0328548647995.issue16451@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 08:44:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 12 Nov 2012 07:44:42 +0000 Subject: [issue16459] sys.stdout.write printing length of string In-Reply-To: <1352703088.16.0.793564052776.issue16459@psf.upfronthosting.co.za> Message-ID: <1352706282.32.0.493444476713.issue16459@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: -None stage: -> committed/rejected type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 09:05:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 08:05:43 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352675536.75.0.987130459702.issue16444@psf.upfronthosting.co.za> Message-ID: <201211121005.27680.storchaka@gmail.com> Serhiy Storchaka added the comment: > You can uses cpXXX encodings explictly to read or write a file, but these > encodings are not used for sys.getfilesystemencoding() (or > sys.stdout.encoding). At least CP1251 has been used for many cyrillic locales in before-UTF8 age (I use it sometimes still). For now CP1251 is the default encoding for Byelorussian and Bulgarian: $ grep CP /usr/share/i18n/SUPPORTED be_BY CP1251 bg_BG CP1251 ru_RU.CP1251 CP1251 yi_US CP1255 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 09:25:05 2012 From: report at bugs.python.org (Tom Pohl) Date: Mon, 12 Nov 2012 08:25:05 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors Message-ID: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> New submission from Tom Pohl: According to the documentation of the floor division (http://docs.python.org/2/reference/expressions.html#binary-arithmetic-operations), x//y should be equal to math.floor(x/y). However, the result of 1//0.1 is 9.0 (tested on 2.6, 2.7, 3.2). It might be related to the internal representation of floating-point numbers, but for this example I would expect it to come up with the correct values. Cheers, Tom ---------- components: None messages: 175424 nosy: Tom.Pohl priority: normal severity: normal status: open title: Strange results for floor division ("//") with non-integer divisors type: behavior versions: Python 2.6, Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 09:33:39 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 12 Nov 2012 08:33:39 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352709219.62.0.752962805274.issue16460@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +mark.dickinson, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 09:41:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 08:41:53 +0000 Subject: [issue16285] Update urllib to RFC 3986 In-Reply-To: <1350644168.93.0.364254038155.issue16285@psf.upfronthosting.co.za> Message-ID: <1352709713.72.0.475487770815.issue16285@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 09:53:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 08:53:09 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352710389.72.0.392317771219.issue16460@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, this is related to the internal representation of floating-point numbers. 0.1 is 3602879701896397/36028797018963968 in float. >>> import fractions >>> fractions.Fraction(0.1) Fraction(3602879701896397, 36028797018963968) >>> 36028797018963968 / 3602879701896397 10.0 >>> 36028797018963968 // 3602879701896397 9 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 09:55:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 08:55:41 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1352710541.46.0.674346217018.issue16203@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 09:55:48 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Nov 2012 08:55:48 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352710548.7.0.497823778244.issue16460@psf.upfronthosting.co.za> Mark Dickinson added the comment: 9.0 *is* the correct result here. The number that Python stores for 0.1 is an approximation that's actually a little greater than 0.1. ---------- resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 09:55:54 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Nov 2012 08:55:54 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352710554.72.0.647244039881.issue16460@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 10:09:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 09:09:43 +0000 Subject: [issue15880] os.path.split() and long UNC names In-Reply-To: <1347036015.89.0.836232949292.issue15880@psf.upfronthosting.co.za> Message-ID: <1352711383.71.0.104211505655.issue15880@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I propose to close this issue as "won't fix". A long-UNC prefix support is a new feature and can't be applied to 2.7. As workaround use splitunc() in Python prior to 3.1. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 10:12:58 2012 From: report at bugs.python.org (Tom Pohl) Date: Mon, 12 Nov 2012 09:12:58 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352711578.48.0.177516383558.issue16460@psf.upfronthosting.co.za> Tom Pohl added the comment: Thanks for your comments. From a technical/numerical point of view I agree with you that the computed result is correct given the floating-point limitations. >From a user's point of view (and the documentation seems to agree with me) the result is wrong. The documentation (see link in first post) says: [...] the result is that of mathematical division with the ?floor? function applied to the result. math.floor(1/0.1) returns the expected 10.0 and the doc says that the floor division should behave the same. If 9.0 for 1//0.1 is the correct result according to your definition of the floor division then I cannot think of a reasonable use case for the floor division. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 10:22:10 2012 From: report at bugs.python.org (Christian Schubert) Date: Mon, 12 Nov 2012 09:22:10 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1352712130.05.0.118231490035.issue8865@psf.upfronthosting.co.za> Christian Schubert added the comment: new proposed fix: forbid concurrent poll() invocation ---------- Added file: http://bugs.python.org/file27967/issue8865_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 10:52:21 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Nov 2012 09:52:21 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352713941.35.0.384348329926.issue16460@psf.upfronthosting.co.za> Mark Dickinson added the comment: Tom: there's no reasonable way to define all 3 of /, // and % for floating-point numbers that avoids all user surprises. There are a couple of notes (nos 2 and 3) at the bottom of the documentation page you refer to that attempt to explain some of the potential difficulties here. > I cannot think of a reasonable use case for the floor division. Indeed, one has to be careful when using floating-point for *anything* where tiny numerical errors can significant: rounding is another example of this. What's your application? There may be better ways of doing what you're trying to do. If you're working with financial data, you might want to look at the decimal module. If you're working with Python floats (or floating-point arithmetic in *any* programming language), your code has to be robust in the face of small errors. > math.floor(1/0.1) returns the expected 10.0 Yep. What happens here is that the exact result of 1 / 0.1 is just a touch under 10.0, but the closest representable float to that exact result is 10.0 itself. So the result of the division is rounded up to 10.0, and then the floor returns 10.0 > and the doc says that the floor division should behave the same. Where do the docs say that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 10:57:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 09:57:11 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1352714231.73.0.78996764712.issue8865@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch LGTM. I doubt about the exception type. May be RuntimeError is more appropriate? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 11:02:00 2012 From: report at bugs.python.org (Christian Schubert) Date: Mon, 12 Nov 2012 10:02:00 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1352714520.98.0.835899432807.issue8865@psf.upfronthosting.co.za> Christian Schubert added the comment: > I doubt about the exception type. May be RuntimeError is more appropriate? mea culpa, just copy&pasted without actually looking; fixed in v3 ---------- Added file: http://bugs.python.org/file27968/issue8865_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 11:05:43 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 12 Nov 2012 10:05:43 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352714743.73.0.984451372165.issue16460@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Tom: you are misinterpreting the docs. It says (paraphrased) that the result of x//y equals floor(x mathematically-divided-by y), which is different from floor(x/y). Your computer is not capable of performing the mathematically-divided-by operation; you have to compute it on paper. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 11:21:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 10:21:40 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352715700.26.0.80437397594.issue16460@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Your computer is not capable of performing the mathematically-divided-by operation; you have to compute it on paper. You can compute it with Python. >>> math.floor(1/fractions.Fraction(0.1)) 9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 11:58:36 2012 From: report at bugs.python.org (koobs) Date: Mon, 12 Nov 2012 10:58:36 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352717916.76.0.0335054488422.issue16218@psf.upfronthosting.co.za> koobs added the comment: Back to green for all branches on FreeBSD, thank you Victor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 12:07:23 2012 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Nov 2012 11:07:23 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352718443.12.0.628198744677.issue16218@psf.upfronthosting.co.za> Stefan Krah added the comment: The "Mountain Lion" bots still fail. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 12:14:46 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 12 Nov 2012 11:14:46 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1352718886.52.0.219903884825.issue16218@psf.upfronthosting.co.za> STINNER Victor added the comment: > Back to green for all branches on FreeBSD, thank you Victor FreeBSD buildbots are green because I disabled the test on undecodable bytes! See issue #16455 which proposes a fix for FreeBSD and OpenIndiana. > The "Mountain Lion" bots still fail. :) Yeah I know, see the issue #16416 which has a patch. I plan to commit it to 3.4, wait for buildbots, and then backport to 3.3. -- Python 3.3 handles non-ASCII almost everywhere. Python 3.4 will probably handle non-ASCII everywhere. Handling *undecodable* bytes is really hard. We cannot use the same code for UNIX and Windows. If we store data as bytes, it solves the issue, but we don't support any Unicode character on Windows anymore. If we store data as Unicode, it's the opposite (ok for Windows, decode error on UNIX). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 12:29:20 2012 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 12 Nov 2012 11:29:20 +0000 Subject: [issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers In-Reply-To: <1351896425.99.0.911168182655.issue16391@psf.upfronthosting.co.za> Message-ID: <1352719760.39.0.104717421379.issue16391@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 12:35:26 2012 From: report at bugs.python.org (Nikolay Bryskin) Date: Mon, 12 Nov 2012 11:35:26 +0000 Subject: [issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers In-Reply-To: <1351896425.99.0.911168182655.issue16391@psf.upfronthosting.co.za> Message-ID: <1352720126.88.0.110514987136.issue16391@psf.upfronthosting.co.za> Nikolay Bryskin added the comment: Vinay, why do you close this feature request? Proposed workaround is just a workaround and even doesn't provide some functionality - for example, it seems impossible to define a terminator using config file. ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 13:19:48 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 12:19:48 +0000 Subject: [issue15809] IDLE console uses incorrect encoding. In-Reply-To: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za> Message-ID: <1352722788.45.0.773310842292.issue15809@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > However, this patch isn't right, since it will cause all source to be interpreted as UTF-8. This would be wrong when the sys.stdin.encoding is not UTF-8, and byte string objects are created in interactive mode. Can you show how to reproduce the error that you're talking about? I have found no issues running the bare Python and IDLE (with your patch, of course) with files in different encodings under different locales. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 13:20:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 12:20:05 +0000 Subject: [issue15809] IDLE console uses incorrect encoding. In-Reply-To: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za> Message-ID: <1352722805.08.0.951075009987.issue15809@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 14:31:05 2012 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 12 Nov 2012 13:31:05 +0000 Subject: [issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers In-Reply-To: <1351896425.99.0.911168182655.issue16391@psf.upfronthosting.co.za> Message-ID: <1352727065.35.0.457470911312.issue16391@psf.upfronthosting.co.za> Vinay Sajip added the comment: Well, the config file format is older and fileConfig() does not cover as much as dictConfig() does. (For example, filters). I don't propose to spend time enhancing fileConfig(), now that dictConfig() is available. If you are forced to use fileConfig(), you can subclass the handler for those projects where you need custom terminators. This is not much work, and you can use that subclass on all projects where you need custom terminators. What I proposed was not a workaround, exactly - it's how dictConfig() is *meant* to be used. The reason for supporting factories for handlers is that users can set them up however they want. I closed the issue because I showed that no change to the stdlib was needed to provide the functionality requested, and as I got no response about it from you, I decided to close the issue. Sometimes, people see a solution proposed which addresses their problem, but don't close the issue themselves. So, I would like to close this issue, because I have proposed a way you can do what you need without the need to add anything to the stdlib. If you feel the need to reopen the issue, please do so, but give me a good reason why the approach I suggested doesn't work for you. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 14:32:54 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 12 Nov 2012 13:32:54 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames In-Reply-To: <1352289523.88.0.908097963069.issue16416@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: macosx-2.patch patches _Py_wchar2char() and _Py_char2wchar() functions to use UTF-8/surrogateescape for any function using the locale encoding, not only file related functions of fileutils.h. The patch does also simplify the code, no more specific #ifdef __APPLE__ in python.c: -#ifdef __APPLE__ - argv_copy[i] = _Py_DecodeUTF8_surrogateescape(argv[i], strlen(argv[i])); -#else argv_copy[i] = _Py_char2wchar(argv[i], NULL); -#endif 2012/11/7 Andrew Svetlov > > Changes by Andrew Svetlov : > > > ---------- > nosy: +asvetlov > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file27969/macosx-2.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 6a6ad09faad2 Modules/python.c --- a/Modules/python.c Mon Nov 12 01:23:51 2012 +0100 +++ b/Modules/python.c Mon Nov 12 14:29:44 2012 +0100 @@ -15,10 +15,6 @@ wmain(int argc, wchar_t **argv) } #else -#ifdef __APPLE__ -extern wchar_t* _Py_DecodeUTF8_surrogateescape(const char *s, Py_ssize_t size); -#endif - int main(int argc, char **argv) { @@ -45,11 +41,7 @@ main(int argc, char **argv) oldloc = strdup(setlocale(LC_ALL, NULL)); setlocale(LC_ALL, ""); for (i = 0; i < argc; i++) { -#ifdef __APPLE__ - argv_copy[i] = _Py_DecodeUTF8_surrogateescape(argv[i], strlen(argv[i])); -#else argv_copy[i] = _Py_char2wchar(argv[i], NULL); -#endif if (!argv_copy[i]) { free(oldloc); fprintf(stderr, "Fatal Python error: " diff -r 6a6ad09faad2 Python/fileutils.c --- a/Python/fileutils.c Mon Nov 12 01:23:51 2012 +0100 +++ b/Python/fileutils.c Mon Nov 12 14:29:44 2012 +0100 @@ -7,6 +7,10 @@ #include #endif +#ifdef __APPLE__ +extern wchar_t* _Py_DecodeUTF8_surrogateescape(const char *s, Py_ssize_t size); +#endif + PyObject * _Py_device_encoding(int fd) { @@ -59,6 +63,15 @@ PyObject * wchar_t* _Py_char2wchar(const char* arg, size_t *size) { +#ifdef __APPLE__ + wchar_t *wstr; + wstr = _Py_DecodeUTF8_surrogateescape(arg, strlen(arg)); + if (wstr == NULL) + return NULL; + if (size != NULL) + *size = wcslen(wstr); + return wstr; +#else wchar_t *res; #ifdef HAVE_BROKEN_MBSTOWCS /* Some platforms have a broken implementation of @@ -144,7 +157,7 @@ wchar_t* argsize -= converted; out++; } -#else +#else /* HAVE_MBRTOWC */ /* Cannot use C locale for escaping; manually escape as if charset is ASCII (i.e. escape all bytes > 128. This will still roundtrip correctly in the locale's charset, which must be an ASCII superset. */ @@ -159,7 +172,7 @@ wchar_t* else *out++ = 0xdc00 + *in++; *out = 0; -#endif +#endif /* HAVE_MBRTOWC */ if (size != NULL) *size = out - res; return res; @@ -167,6 +180,7 @@ oom: if (size != NULL) *size = (size_t)-1; return NULL; +#endif /* __APPLE__ */ } /* Encode a (wide) character string to the locale encoding with the @@ -183,6 +197,34 @@ oom: char* _Py_wchar2char(const wchar_t *text, size_t *error_pos) { +#ifdef __APPLE__ + Py_ssize_t len; + PyObject *unicode, *bytes = NULL; + char *cpath; + + unicode = PyUnicode_FromWideChar(text, wcslen(text)); + if (unicode == NULL) { + Py_DECREF(unicode); + return NULL; + } + + bytes = _PyUnicode_AsUTF8String(unicode, "surrogateescape"); + Py_DECREF(unicode); + if (bytes == NULL) { + PyErr_Clear(); + return NULL; + } + + len = PyBytes_GET_SIZE(bytes); + cpath = PyMem_Malloc(len+1); + if (cpath == NULL) { + Py_DECREF(bytes); + return NULL; + } + memcpy(cpath, PyBytes_AsString(bytes), len + 1); + Py_DECREF(bytes); + return cpath; +#else /* __APPLE__ */ const size_t len = wcslen(text); char *result = NULL, *bytes = NULL; size_t i, size, converted; @@ -242,6 +284,7 @@ char* bytes = result; } return result; +#endif /* __APPLE__ */ } /* In principle, this should use HAVE__WSTAT, and _wstat From report at bugs.python.org Mon Nov 12 14:50:46 2012 From: report at bugs.python.org (Nikolay Bryskin) Date: Mon, 12 Nov 2012 13:50:46 +0000 Subject: [issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers In-Reply-To: <1351896425.99.0.911168182655.issue16391@psf.upfronthosting.co.za> Message-ID: <1352728246.64.0.325255756724.issue16391@psf.upfronthosting.co.za> Nikolay Bryskin added the comment: Actually, I'm using dictConfig to load config from json file. And yes, ext:// provides a way to load custom handler, but, as far as I see (https://github.com/jonashaag/cpython/blob/master/Lib/logging/config.py#L379-404), there is no possibility to specify custom parameters - terminator, for example. My proposal is to add this existing documented configurable parameter of standard logging handlers to constructors to make it configurable. Also, there is a demand for configurable errors handler for encoding/decoding strings, but I think it should be another issue. For now I'm just using derived classes in my project to achieve this functionality, is it really the right way (instead of patching stdlib)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 14:53:41 2012 From: report at bugs.python.org (Tom Pohl) Date: Mon, 12 Nov 2012 13:53:41 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352728421.95.0.44557665826.issue16460@psf.upfronthosting.co.za> Tom Pohl added the comment: Thanks for all the explanations why Python's floor division (FD) works as specified. And I agree, it does work as specified, but still, I think this is not the behavior that most people would expect and is therefore dangerous to provide/use. What do I expect from FD (x//y): 1. Perform a division (I don't care about the details here). 2. Return an integer value q (even if it's stored in a float). 3. The absolute difference between the mathematical division q'=x/y and the returned result q is less than 1, since it's just a floor operation, right? 1//0.1 = 9.0 violates my personal last expectation and I guess I'm not the only one. My use case: I need to perform a division, but the method only accepts integer values, so what I used to do is FD. Since today I'm using int(x/y) or floor(x/y). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 15:04:41 2012 From: report at bugs.python.org (Tom Pohl) Date: Mon, 12 Nov 2012 14:04:41 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352729081.47.0.0558593447442.issue16460@psf.upfronthosting.co.za> Tom Pohl added the comment: Martin: Ok, just as you suggested, I did the calculations on a sheet of paper: floor(1 mathematically-divided-by 0.1) = floor(10) = 10 qed ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 15:25:12 2012 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Nov 2012 14:25:12 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352730312.79.0.973937651072.issue16460@psf.upfronthosting.co.za> Stefan Krah added the comment: Any programming language that uses binary floats behaves like that and it is actually what people expect. If you want behavior that is closer to pencil and paper calculations, you need to use decimal: >>> Decimal(1) // Decimal("0.1") Decimal('10') Contrast with: >>> Decimal(1) // Decimal(0.1) Decimal('9') The reason: >>> Decimal("0.1") Decimal('0.1') >>> Decimal(0.1) Decimal('0.1000000000000000055511151231257827021181583404541015625') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 15:40:44 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 12 Nov 2012 14:40:44 +0000 Subject: [issue16455] sys.getfilesystemencoding() is not the locale encoding on FreeBSD and OpenSolaris when the locale is not set In-Reply-To: <1352678099.01.0.304537834188.issue16455@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Hijacking locale.getpreferredencoding() is maybe dangerous. I attached a new patch, force_ascii.patch, which uses a different approach: be more strict than mbstowcs(), force the ASCII encoding when: - the LC_CTYPE locale is C - nl_langinfo(CODESET) is ASCII or an alias of ASCII - mbstowcs() is able to decode non-ASCII characters 2012/11/12 STINNER Victor > > STINNER Victor added the comment: > > Some tests are failing with the patch: > > ====================================================================== > FAIL: test_undecodable_env (test.test_subprocess.POSIXProcessTestCase) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/home/haypo/prog/python/default/Lib/test/test_subprocess.py", > line 1606, in test_undecodable_env > self.assertEqual(stdout.decode('ascii'), ascii(value)) > AssertionError: "'abc\\xff'" != "'abc\\udcff'" > - 'abc\xff' > ? ^ > + 'abc\udcff' > ? ^^^ > > ====================================================================== > FAIL: test_strcoll_with_diacritic (test.test_locale.TestEnUSCollation) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/home/haypo/prog/python/default/Lib/test/test_locale.py", line > 364, in test_strcoll_with_diacritic > self.assertLess(locale.strcoll('\xe0', 'b'), 0) > AssertionError: 126 not less than 0 > > ====================================================================== > FAIL: test_strxfrm_with_diacritic (test.test_locale.TestEnUSCollation) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/home/haypo/prog/python/default/Lib/test/test_locale.py", line > 367, in test_strxfrm_with_diacritic > self.assertLess(locale.strxfrm('\xe0'), locale.strxfrm('b')) > AssertionError: '\xe0' not less than 'b' > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file27970/force_ascii.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 6a6ad09faad2 Python/fileutils.c --- a/Python/fileutils.c Mon Nov 12 01:23:51 2012 +0100 +++ b/Python/fileutils.c Mon Nov 12 15:33:24 2012 +0100 @@ -4,6 +4,7 @@ #endif #ifdef HAVE_LANGINFO_H +#include #include #endif @@ -39,6 +40,104 @@ PyObject * #ifdef HAVE_STAT +/* Workaround FreeBSD and OpenIndiana locale encoding issue. On these + operating systems, nl_langinfo(CODESET) announces an alias of the ASCII + encoding, whereas mbstowcs() and wcstombs() functions use the ISO-8859-1 + encoding. The problem is that os.fsencode() and os.fsdecode() use the + Python codec "ASCII". For example, if command line arguments are decoded + by mbstowcs() and encoded by os.fsencode(), we get a UnicodeEncodeError + instead of retrieving the original byte string. + + The workaround is enabled if setlocale(LC_CTYPE, NULL) returns "C" and + nl_langinfo(CODESET) returns "ascii". The workaround is not used if + setlocale(LC_CTYPE, NULL) failed, or if nl_langinfo() or CODESET is not + available. + + Values of locale_is_ascii: + + 1: the workaround is used, the ASCII codec is used instead of mbstowcs() + and wcstombs() functions + 0: the workaround is not used + -1: unknown, need to call check_locale_force_ascii() to known the value +*/ +static int locale_force_ascii = -1; + +extern char* _Py_GetLocaleEncoding(void); + +static int +check_locale_force_ascii(void) +{ +#ifdef MS_WINDOWS + return 0; +#else + char *encoding, *loc; + int i; + unsigned char ch; + wchar_t wch; + size_t res; + + return 1; + + loc = setlocale(LC_CTYPE, NULL); + if (loc == NULL || strcmp(loc, "C") != 0) { + /* Failed to get the LC_CTYPE locale or it is different than C: + * don't use the workaround. */ + return 0; + } + + encoding = _Py_GetLocaleEncoding(); + if (encoding == NULL) { + /* unknown encoding: consider that the encoding is not ASCII */ + PyErr_Clear(); + return 0; + } + + if (strcmp(encoding, "ascii") != 0) { + free(encoding); + return 0; + } + free(encoding); + + /* the locale is not set and nl_langinfo(CODESET) returns "ASCII" + (or an alias of the ASCII encoding). Check if the locale encoding + is really ASCII. */ + for (i=0x80; i<0xff; i++) { + ch = (unsigned char)i; + res = mbstowcs(&wch, (char*)&ch, 1); + if (res == (size_t)-1) { + /* decoding a non-ASCII character from the locale encoding failed: + the encoding is really ASCII */ + return 0; + } + } + return 1; +#endif +} + +static wchar_t* +locale_decode_ascii(const char *arg, size_t *size) +{ + wchar_t *res; + unsigned char *in; + wchar_t *out; + + res = PyMem_Malloc((strlen(arg)+1)*sizeof(wchar_t)); + if (!res) + return NULL; + + in = (unsigned char*)arg; + out = res; + while(*in) + if(*in < 128) + *out++ = *in++; + else + *out++ = 0xdc00 + *in++; + *out = 0; + if (size != NULL) + *size = out - res; + return res; +} + /* Decode a byte string from the locale encoding with the surrogateescape error handler (undecodable bytes are decoded as characters in range U+DC80..U+DCFF). If a byte sequence can be decoded as a surrogate @@ -60,20 +159,33 @@ wchar_t* _Py_char2wchar(const char* arg, size_t *size) { wchar_t *res; + size_t argsize; + size_t count; + unsigned char *in; + wchar_t *out; +#ifdef HAVE_MBRTOWC + mbstate_t mbs; +#endif + + if (locale_force_ascii == -1) + locale_force_ascii = check_locale_force_ascii(); + + if (locale_force_ascii) { + /* force ASCII encoding to workaround mbstowcs() issue */ + res = locale_decode_ascii(arg, size); + if (res == NULL) + goto oom; + return res; + } + #ifdef HAVE_BROKEN_MBSTOWCS /* Some platforms have a broken implementation of * mbstowcs which does not count the characters that * would result from conversion. Use an upper bound. */ - size_t argsize = strlen(arg); + argsize = strlen(arg); #else - size_t argsize = mbstowcs(NULL, arg, 0); -#endif - size_t count; - unsigned char *in; - wchar_t *out; -#ifdef HAVE_MBRTOWC - mbstate_t mbs; + argsize = mbstowcs(NULL, arg, 0); #endif if (argsize != (size_t)-1) { res = (wchar_t *)PyMem_Malloc((argsize+1)*sizeof(wchar_t)); @@ -144,24 +256,16 @@ wchar_t* argsize -= converted; out++; } + if (size != NULL) + *size = out - res; #else /* Cannot use C locale for escaping; manually escape as if charset is ASCII (i.e. escape all bytes > 128. This will still roundtrip correctly in the locale's charset, which must be an ASCII superset. */ - res = PyMem_Malloc((strlen(arg)+1)*sizeof(wchar_t)); - if (!res) + res = locale_decode_ascii(arg, size); + if (res == NULL) goto oom; - in = (unsigned char*)arg; - out = res; - while(*in) - if(*in < 128) - *out++ = *in++; - else - *out++ = 0xdc00 + *in++; - *out = 0; #endif - if (size != NULL) - *size = out - res; return res; oom: if (size != NULL) @@ -169,6 +273,45 @@ oom: return NULL; } +static char* +locale_encode_ascii(const wchar_t *text, size_t *error_pos) +{ + char *result = NULL, *out; + size_t len, i; + wchar_t ch; + + if (error_pos != NULL) + *error_pos = (size_t)-1; + + len = wcslen(text); + + result = PyMem_Malloc(len + 1); /* +1 for NUL byte */ + if (result == NULL) + return NULL; + + out = result; + for (i=0; i Message-ID: <1352731486.36.0.675550916759.issue2005@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think the patch will break on Unix systems that don't have uid_t or gid_t types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 15:49:40 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 12 Nov 2012 14:49:40 +0000 Subject: [issue16455] sys.getfilesystemencoding() is not the locale encoding on FreeBSD and OpenSolaris when the locale is not set In-Reply-To: <1352672055.11.0.23985291602.issue16455@psf.upfronthosting.co.za> Message-ID: <1352731780.15.0.296326117985.issue16455@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 15:57:13 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 12 Nov 2012 14:57:13 +0000 Subject: [issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long) In-Reply-To: <1202068724.99.0.704404319493.issue2005@psf.upfronthosting.co.za> Message-ID: <1352732233.69.0.873315166648.issue2005@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The patch should work on OSX, although I haven't actually tested it yet. I've verified that sizeof(uid_t) and sizeof(gid_t) are the same for x86_64 and i386, which means SIZEOF_UID_T doesn't have to be added to pymacconfig.h. A smal nit with the patch: it uses "long long" as a type instead of PY_LONG_LONG" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 16:01:53 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 12 Nov 2012 15:01:53 +0000 Subject: [issue16442] PATH_MAX vs MAXPATHLEN vs pathconf(..., _PC_PATH_MAX). In-Reply-To: <1352393326.63.0.0902907389394.issue16442@psf.upfronthosting.co.za> Message-ID: <1352732513.58.0.47091945939.issue16442@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't think that using pathconf is an important part of this issue. Instead, it is more important to deal with ENAMETOOLONG errors. To do so, we should get rid of all stack allocations of arrays with PATH_MAX/MAXPATHLEN size (also because they can consume quite a lot of stack). I agree that it important to scope this issue. You need to determine whether you want it to be a bug fix or a cleanup action. If the issue is "fails to build on HP-UX", then all other aspects not relevant to this issue need to be left out, in particular the introduction of new symbolic constants. If the objective is the code clean-up, all versions but 3.4 need to be left out. IOW, -1 on systematic introduction of PY_PATH_MAX to 2.7, 3.2, and 3.3. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 16:04:11 2012 From: report at bugs.python.org (Christian Kern) Date: Mon, 12 Nov 2012 15:04:11 +0000 Subject: [issue16461] wave module: wrong integer format Message-ID: <1352732651.92.0.893248719316.issue16461@psf.upfronthosting.co.za> New submission from Christian Kern: Writing .wav files is limited to a file size of 2 Gib, while the WAV file format itself supports up to 4 Gib. Trying to write a file beyond 2 Gib (e.g. 203 minutes at CD quality (i.e. 44.1 kHz, 2 channels, 16 bit)) will crash at the moment when self._datawritten exceeds 2^31-1 bytes. This is due to the fact that, in method "_patchheader", the variable "self._datawritten" is written with "struct.pack(' self._file.write(struct.pack(' self._file.write(struct.pack(' self._file.write(struct.pack(' _______________________________________ From report at bugs.python.org Mon Nov 12 16:08:11 2012 From: report at bugs.python.org (mike.a) Date: Mon, 12 Nov 2012 15:08:11 +0000 Subject: [issue16462] smtpd should return greeting Message-ID: <1352732891.73.0.549374987784.issue16462@psf.upfronthosting.co.za> New submission from mike.a: The greeting value is required by SPF, and should be returned by SMTPChannel. This would involve a simple fix by adding self.__greeting to the list of returned values in the status object ---------- messages: 175451 nosy: mike.a priority: normal severity: normal status: open title: smtpd should return greeting type: enhancement versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 16:24:23 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 12 Nov 2012 15:24:23 +0000 Subject: [issue16462] smtpd should return greeting In-Reply-To: <1352732891.73.0.549374987784.issue16462@psf.upfronthosting.co.za> Message-ID: <1352733863.89.0.285829510604.issue16462@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Mike, could you possibly elaborate more?. I don't understand your bug report. BTW, Python 2.6 is open only for security bugfixes. Python 2.7, 3.2 and 3.3 are currently open for regular bugfixes. ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 16:26:09 2012 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Nov 2012 15:26:09 +0000 Subject: [issue16442] PATH_MAX vs MAXPATHLEN vs pathconf(..., _PC_PATH_MAX). In-Reply-To: <1352393326.63.0.0902907389394.issue16442@psf.upfronthosting.co.za> Message-ID: <1352733969.63.0.622800244542.issue16442@psf.upfronthosting.co.za> Stefan Krah added the comment: #15835 has a patch specifically for HP-UX. Also see the link in msg171068 for evidence that PATH_MAX is quite a mess on HP-UX. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 16:36:51 2012 From: report at bugs.python.org (mike.a) Date: Mon, 12 Nov 2012 15:36:51 +0000 Subject: [issue16462] smtpd should return greeting In-Reply-To: <1352732891.73.0.549374987784.issue16462@psf.upfronthosting.co.za> Message-ID: <1352734611.09.0.158925629708.issue16462@psf.upfronthosting.co.za> mike.a added the comment: The greeting value is the HELO/EHLO identity. RFC 4408 (SPF) recommends checking both the mail from domain as well as the HELO identity, so this value is useful and could be passed to proc_message() function (API for "doing something useful with this message"). Later versions of the code pass the same values, so this is relevant for 2.7, 3.2, and 3.3. ---------- versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 16:43:35 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 12 Nov 2012 15:43:35 +0000 Subject: [issue15835] HP-UX build needs to be tweaked to pick up PATH_MAX In-Reply-To: <1346457153.04.0.0294174797728.issue15835@psf.upfronthosting.co.za> Message-ID: <1352735015.5.0.96317501496.issue15835@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch looks good, please apply. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 16:45:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 15:45:17 +0000 Subject: [issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long) In-Reply-To: <1202068724.99.0.704404319493.issue2005@psf.upfronthosting.co.za> Message-ID: <1352735117.34.0.187754559329.issue2005@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27926/posix_uid_gid_conv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 16:46:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 15:46:57 +0000 Subject: [issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long) In-Reply-To: <1202068724.99.0.704404319493.issue2005@psf.upfronthosting.co.za> Message-ID: <1352735217.27.0.0917217571653.issue2005@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I think the patch will break on Unix systems that don't have uid_t or gid_t types. I think defines to int will be used on such systems. As I understand the configure script. > A smal nit with the patch: it uses "long long" as a type instead of PY_LONG_LONG" Thank you. Fixed. ---------- Added file: http://bugs.python.org/file27972/posix_uid_gid_conv_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 16:50:18 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Nov 2012 15:50:18 +0000 Subject: [issue16462] smtpd should return greeting In-Reply-To: <1352732891.73.0.549374987784.issue16462@psf.upfronthosting.co.za> Message-ID: <1352735418.41.0.00482814019319.issue16462@psf.upfronthosting.co.za> R. David Murray added the comment: Are you asking to have seen_greeting passed in the server.process_message call? That is reasonable. ---------- components: +email nosy: +barry, r.david.murray versions: +Python 2.6 -Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 16:52:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 15:52:07 +0000 Subject: [issue16461] wave module: wrong integer format In-Reply-To: <1352732651.92.0.893248719316.issue16461@psf.upfronthosting.co.za> Message-ID: <1352735527.58.0.208685555495.issue16461@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Library (Lib) -Extension Modules stage: -> needs patch versions: +Python 3.2, Python 3.3, Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 16:53:58 2012 From: report at bugs.python.org (mike.a) Date: Mon, 12 Nov 2012 15:53:58 +0000 Subject: [issue16462] smtpd should return greeting In-Reply-To: <1352732891.73.0.549374987784.issue16462@psf.upfronthosting.co.za> Message-ID: <1352735638.26.0.955566101388.issue16462@psf.upfronthosting.co.za> mike.a added the comment: David, Yes, that is what I am asking. Thanks, -Mike ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 16:56:06 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 12 Nov 2012 15:56:06 +0000 Subject: [issue16461] wave module: wrong integer format In-Reply-To: <1352732651.92.0.893248719316.issue16461@psf.upfronthosting.co.za> Message-ID: <1352735765.99.0.607232053454.issue16461@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Python 3.x affected too. Python 2.6 is open only for security fixes. 4GB support confirmed: https://en.wikipedia.org/wiki/WAV#Limitations But trying to find a "canonical" description of the format, I see tons of inconsistencies. For instance http://web.archive.org/web/20080113195252/http://www.borg.com/~jglatt/tech/wave.htm defines "chunkSize" as "long". That is, signed. ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 17:06:02 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Nov 2012 16:06:02 +0000 Subject: [issue16462] smtpd should return greeting In-Reply-To: <1352732891.73.0.549374987784.issue16462@psf.upfronthosting.co.za> Message-ID: <1352736362.7.0.0356835519463.issue16462@psf.upfronthosting.co.za> R. David Murray added the comment: On the other hand, it would also be backward incompatible. Can anyone think of a backward compatible way to provide this info? Maybe we could use the new signature object support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 17:06:11 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Nov 2012 16:06:11 +0000 Subject: [issue16462] smtpd should return greeting In-Reply-To: <1352732891.73.0.549374987784.issue16462@psf.upfronthosting.co.za> Message-ID: <1352736371.35.0.374675377698.issue16462@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: +Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 17:24:06 2012 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 12 Nov 2012 16:24:06 +0000 Subject: [issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers In-Reply-To: <1351896425.99.0.911168182655.issue16391@psf.upfronthosting.co.za> Message-ID: <1352737446.04.0.991724633413.issue16391@psf.upfronthosting.co.za> Vinay Sajip added the comment: I don't understand what you mean. For example, defining def my_handler(*args, **kwargs): terminator = kwargs.pop('terminator', '!\n') h = logging.StreamHandler(*args, **kwargs) h.terminator = terminator return h you can use with a definition of the handler such as 'console': { '()': 'ext://__main__.my_handler', 'stream': 'ext://sys.stdout', 'terminator': '!\n', } or similar. And you can also do something this with your own subclass, instead of a function as per my example. ISTM that using subclasses is the right way to approach this problem; otherwise why would one *ever* use subclasses? I use them when the base class doesn't do exactly what I want, but offers extension points to change its behaviour via subclassing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 17:28:16 2012 From: report at bugs.python.org (Christian Kern) Date: Mon, 12 Nov 2012 16:28:16 +0000 Subject: [issue16461] wave module: wrong integer format In-Reply-To: <1352732651.92.0.893248719316.issue16461@psf.upfronthosting.co.za> Message-ID: <1352737696.18.0.572024817951.issue16461@psf.upfronthosting.co.za> Christian Kern added the comment: Addendum: 4 Gib file size can only be achieved with "unsigned long". Moreover, for numbers < 2^31, "signed long" and "unsigned long" seem to be the same, so there should arise no problem. (Tested on x86_64 linux) BTW: Writing .wav files could gain performance it there'd be an option for updating the header only at the end of writing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 17:42:24 2012 From: report at bugs.python.org (Tom Pohl) Date: Mon, 12 Nov 2012 16:42:24 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352738544.95.0.742346795206.issue16460@psf.upfronthosting.co.za> Tom Pohl added the comment: Since nobody seems to share my point of view, I give up. :-) Thanks for your support and for working on Python (the best programming language as we all know), Tom ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 19:47:49 2012 From: report at bugs.python.org (Chromatix) Date: Mon, 12 Nov 2012 18:47:49 +0000 Subject: [issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT In-Reply-To: <1305503118.99.0.0671211382341.issue12082@psf.upfronthosting.co.za> Message-ID: <1352746069.43.0.0845944486207.issue12082@psf.upfronthosting.co.za> Chromatix added the comment: Actually many people try to compile python on an environment with freestanding C library, so this can be a specific case of that. Is there any issue or thread where compiling python with freestanding headers is discussed? As this relates to that. Shall you remove the defines, please put instructions in the source code to let user know how they can provide their self-invented fstat function to the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 20:30:00 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Nov 2012 19:30:00 +0000 Subject: [issue15880] os.path.split() and long UNC names In-Reply-To: <1347036015.89.0.836232949292.issue15880@psf.upfronthosting.co.za> Message-ID: <1352748600.68.0.0769257026593.issue15880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree. Larry H.'s patch in #5799 was called an enhancement and is explicitly a replacement for splitunc. The latter was deprecated and may disappear in 3.4. ---------- resolution: -> wont fix stage: test needed -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 20:37:08 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 12 Nov 2012 19:37:08 +0000 Subject: [issue15835] HP-UX build needs to be tweaked to pick up PATH_MAX In-Reply-To: <1346457153.04.0.0294174797728.issue15835@psf.upfronthosting.co.za> Message-ID: <3Y0j0N0kJNzRFC@mail.python.org> Roundup Robot added the comment: New changeset 5db6d9ddf6e8 by Stefan Krah in branch '3.3': Issue #15835: Define PATH_MAX on HP-UX. http://hg.python.org/cpython/rev/5db6d9ddf6e8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 20:40:04 2012 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Nov 2012 19:40:04 +0000 Subject: [issue15835] HP-UX build needs to be tweaked to pick up PATH_MAX In-Reply-To: <1346457153.04.0.0294174797728.issue15835@psf.upfronthosting.co.za> Message-ID: <1352749204.1.0.0950282754346.issue15835@psf.upfronthosting.co.za> Stefan Krah added the comment: Thanks for reviewing! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 20:43:26 2012 From: report at bugs.python.org (Herc Silverstein) Date: Mon, 12 Nov 2012 19:43:26 +0000 Subject: [issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE In-Reply-To: <1352688567.58.0.199976634188.issue16458@psf.upfronthosting.co.za> Message-ID: <1352749406.72.0.564123222439.issue16458@psf.upfronthosting.co.za> Changes by Herc Silverstein : ---------- nosy: +hercs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 21:00:18 2012 From: report at bugs.python.org (Larry Hastings) Date: Mon, 12 Nov 2012 20:00:18 +0000 Subject: [issue15880] os.path.split() and long UNC names In-Reply-To: <1347036015.89.0.836232949292.issue15880@psf.upfronthosting.co.za> Message-ID: <1352750418.56.0.934872919512.issue15880@psf.upfronthosting.co.za> Larry Hastings added the comment: ISTM that fixing this for 3.x (3? 4?) is worthwhile though. Or did somebody already fix it in 3.x? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 21:11:44 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Nov 2012 20:11:44 +0000 Subject: [issue15880] os.path.split() and long UNC names In-Reply-To: <1347036015.89.0.836232949292.issue15880@psf.upfronthosting.co.za> Message-ID: <1352751104.32.0.195510942649.issue15880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Serhiy claims that the commit of Mark's version of your patch in #5799 fixed this in 3.1. Retesting in IDLE, 3.3, Win7: >>> import os >>> d = '//?/e:/python-test/dir' >>> d = os.path.split(d)[0] >>> d '//?/e:/python-test' >>> d = os.path.split(d)[0] >>> d '//?/e:/' >>> d = os.path.split(d)[0] >>> d '//?/e:/' So the splitting ends where Kalle agrees it should. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 21:37:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 20:37:13 +0000 Subject: [issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash. In-Reply-To: <1349390143.92.0.685174043431.issue16137@psf.upfronthosting.co.za> Message-ID: <1352752633.04.0.994836667225.issue16137@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Alexander, do you want to backport r87736 to 2.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 21:38:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 20:38:26 +0000 Subject: [issue9720] zipfile writes incorrect local file header for large files in zip64 In-Reply-To: <1283216540.17.0.624049939978.issue9720@psf.upfronthosting.co.za> Message-ID: <1352752706.07.0.594562101906.issue9720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please, review the patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 21:44:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 20:44:06 +0000 Subject: [issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16) Message-ID: <1352753046.01.0.814908070301.issue1470548@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If nobody has any objections, why not apply this patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 21:52:32 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Nov 2012 20:52:32 +0000 Subject: [issue16451] Remove duplication between slice_indices and compute_slice_indices In-Reply-To: <1352559451.13.0.963654733597.issue16451@psf.upfronthosting.co.za> Message-ID: <1352753552.99.0.546866338089.issue16451@psf.upfronthosting.co.za> Mark Dickinson added the comment: Patch attached. ---------- keywords: +patch Added file: http://bugs.python.org/file27973/issue16451.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 22:08:31 2012 From: report at bugs.python.org (Stefan Neufeind) Date: Mon, 12 Nov 2012 21:08:31 +0000 Subject: [issue11362] image/webp missing from mimetypes.py In-Reply-To: <1299002869.89.0.906487136823.issue11362@psf.upfronthosting.co.za> Message-ID: <1352754511.43.0.661623730464.issue11362@psf.upfronthosting.co.za> Changes by Stefan Neufeind : ---------- nosy: +neufeind _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 22:32:29 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Nov 2012 21:32:29 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <1352755949.32.0.566864440744.issue14631@psf.upfronthosting.co.za> Mark Dickinson added the comment: The patch looks okay to me. What does inheriting from 'ref' buy you? This feels a bit strange to me: the way I think of it, the WeakMethod *has* a weakref to the underlying object, rather than *being* a weakref to the underlying object. The __repr__ also seems a bit misleading as a result: >>> o = Object() >>> m = o.some_method >>> WeakMethod(m) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 22:34:38 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Nov 2012 21:34:38 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <1352756078.69.0.428151564965.issue14631@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > What does inheriting from 'ref' buy you? Hmm, I'm not sure. I thought I'd mimick KeyedRef's inheritance design, plus isinstance(..., weakref.ref) works, and composition would make the object slightly bigger. Other than that, probably nothing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 22:53:37 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Nov 2012 21:53:37 +0000 Subject: [issue16463] test_timeout failure on the RHEL buildbot Message-ID: <1352757217.25.0.912881014186.issue16463@psf.upfronthosting.co.za> New submission from Antoine Pitrou: The RHEL buildbot consistently fails on test_timeout: ====================================================================== FAIL: testConnectTimeout (test.test_timeout.TCPTimeoutTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/test/test_timeout.py", line 222, in testConnectTimeout self._sock_operation(1, 0.001, 'connect', self.addr_remote) File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/test/test_timeout.py", line 126, in _sock_operation self.assertLess(delta, timeout + self.fuzz) AssertionError: 5.0571630001068115 not less than 2.001 According to the build history, the failure appeared in http://buildbot.python.org/all/builders/x86%20RHEL%206%203.3/builds/133 , but the changes look unlikely to be related. Did the setup change? ---------- assignee: ncoghlan components: Tests keywords: buildbot messages: 175476 nosy: ncoghlan, pitrou priority: high severity: normal status: open title: test_timeout failure on the RHEL buildbot type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 23:03:44 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 12 Nov 2012 22:03:44 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames In-Reply-To: <1352153903.84.0.995057035576.issue16416@psf.upfronthosting.co.za> Message-ID: <3Y0mFW6JHyzQ8T@mail.python.org> Roundup Robot added the comment: New changeset 48fbdaf3a849 by Victor Stinner in branch 'default': Issue #16416: OS data are now always encoded/decoded to/from http://hg.python.org/cpython/rev/48fbdaf3a849 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 12 23:48:34 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 12 Nov 2012 22:48:34 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames In-Reply-To: <1352153903.84.0.995057035576.issue16416@psf.upfronthosting.co.za> Message-ID: <3Y0nFG2GDDzPtC@mail.python.org> Roundup Robot added the comment: New changeset f3e512b5ffb3 by Victor Stinner in branch 'default': Issue #16416: Fix error handling in _Py_wchar2char() _Py_char2wchar() functions http://hg.python.org/cpython/rev/f3e512b5ffb3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 00:06:18 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 12 Nov 2012 23:06:18 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames In-Reply-To: <1352153903.84.0.995057035576.issue16416@psf.upfronthosting.co.za> Message-ID: <3Y0ndj6NVzzQ2v@mail.python.org> Roundup Robot added the comment: New changeset 1b97cc71a05e by Victor Stinner in branch 'default': Issue #16416: Fix Misc/NEWS entry, mention Mac OS X http://hg.python.org/cpython/rev/1b97cc71a05e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 00:07:43 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 12 Nov 2012 23:07:43 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames In-Reply-To: <1352153903.84.0.995057035576.issue16416@psf.upfronthosting.co.za> Message-ID: <1352761663.88.0.326752698221.issue16416@psf.upfronthosting.co.za> STINNER Victor added the comment: @Serhiy: Thanks for your review, I missed it before my first commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 00:15:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Nov 2012 23:15:05 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames In-Reply-To: <1352153903.84.0.995057035576.issue16416@psf.upfronthosting.co.za> Message-ID: <1352762105.18.0.898999086549.issue16416@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Victor, are you going to backport this to 3.3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 00:18:23 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 12 Nov 2012 23:18:23 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames In-Reply-To: <1352153903.84.0.995057035576.issue16416@psf.upfronthosting.co.za> Message-ID: <1352762303.09.0.502075037467.issue16416@psf.upfronthosting.co.za> STINNER Victor added the comment: > Victor, are you going to backport this to 3.3? I'm waiting for the result of the buildbots, and maybe also the fix for the issue #16455 (which has an impact on tests on undecodable bytes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 01:18:05 2012 From: report at bugs.python.org (Rafik Draoui) Date: Tue, 13 Nov 2012 00:18:05 +0000 Subject: [issue10395] new os.path function to extract common prefix based on path components In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1352765885.1.0.940510639423.issue10395@psf.upfronthosting.co.za> Changes by Rafik Draoui : Added file: http://bugs.python.org/file27974/patch10395-3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 01:52:34 2012 From: report at bugs.python.org (Hobs) Date: Tue, 13 Nov 2012 00:52:34 +0000 Subject: [issue11076] Iterable argparse Namespace In-Reply-To: <1296461103.49.0.397676179483.issue11076@psf.upfronthosting.co.za> Message-ID: <1352767954.43.0.860416175407.issue11076@psf.upfronthosting.co.za> Hobs added the comment: Seems like a great idea. `foo(**dict(args))` is very useful. I tested `foo(**dict(iter(o.__dict__.items())))` on python 2.7 Mac OSX for my foo and it worked well. ---------- nosy: +Hobson.Lane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 02:21:50 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 01:21:50 +0000 Subject: [issue11076] Iterable argparse Namespace In-Reply-To: <1296461103.49.0.397676179483.issue11076@psf.upfronthosting.co.za> Message-ID: <1352769710.02.0.515065668048.issue11076@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 02:40:29 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 13 Nov 2012 01:40:29 +0000 Subject: [issue12455] urllib2 forces title() on header names, breaking some requests In-Reply-To: <1309461818.92.0.299415077626.issue12455@psf.upfronthosting.co.za> Message-ID: <1352770829.89.0.551690155648.issue12455@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The comment about urllib.request forcing .title() is consistent with 'Content-Length' and 'Content-Type' in the docs but puzzling and inconsistent given that in 3.3, header names are printed .capitalize()'ed and not .title()'ed and that has_header and get_header *require* the .capitalize() form and reject the .title() form. import urllib.request opener = urllib.request.build_opener() request = urllib.request.Request("http://example.com/", headers = {"Content-Type": "application/x-www-form-urlencoded"}) opener.open(request, "1".encode("us-ascii")) print(request.header_items(), request.has_header("Content-Type"), request.has_header("Content-type"), request.get_header("Content-Type"), request.get_header("Content-type"), sep='\n') >>> [('Content-type', 'application/x-www-form-urlencoded'), ('Content-length', '1'), ('User-agent', 'Python-urllib/3.3'), ('Host', 'example.com')] False True None application/x-www-form-urlencoded Did .title in 2.7 urllib2 request get changed to .capitalize in 3.x urllib.request (without the examples in the doc being changed) or is request inconsistent within itself? Cal did not the 2.7 code exhibiting the problme, but when I add this code in 3.3, the output start as shown. request.add_header('Content-MD5', 'xxx') print(request.header_items()) # [('Content-md5', 'xxx'), ... So is 3.3 sending 'Content-Md5' or 'Content-md5' My guess is the former, as urllib.request has the same single use of .title in .do_open as Cal quoted. The two files also have the same three uses of .capitalize in .add_header, .add_unredirected_header, and .do_request. So it seems that header names are normalized to .capitalize on entry and .title on sending, or something like that. Ugh. Is there any good justification for this? I do not see anything in the doc about headers names being normalized either way or about the requirements of has_/get_header. If the behavior were consistent and the same since forever, then I would say the current docs should be improved and a change would be an enhancement request. Since the behavior seems inconsistent, I am more inclined to think there is a bug. I realize that this message expands the scope of the issue, but it is all about the handing of header names in requests. ---------- nosy: +terry.reedy versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 02:57:33 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 13 Nov 2012 01:57:33 +0000 Subject: [issue16464] urllib.request: opener not resetting content-length Message-ID: <1352771853.32.0.535718799021.issue16464@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Code based on python-list post by a do-not-wish-to-register urllib user. import urllib.request opener = urllib.request.build_opener() request = urllib.request.Request("http://example.com/", headers = {"Content-Type": "application/x-www-form-urlencoded"}) print(request.data, '\n', request.header_items()) opener.open(request, "1".encode("us-ascii")) print(request.data, '\n', request.header_items()) opener.open(request, "123456789".encode("us-ascii")) print(request.data, '\n', request.header_items()) >>> None [('Content-type', 'application/x-www-form-urlencoded')] b'1' [('Content-length', '1'), ('Host', 'example.com'), ('User-agent', 'Python-urllib/3.3'), ('Content-type', 'application/x-www-form-urlencoded')] b'123456789' [('Content-length', '1'), ('Host', 'example.com'), ('User-agent', 'Python-urllib/3.3'), ('Content-type', 'application/x-www-form-urlencoded')] The first opener.open adds data and several headers to request, including content-length. The second changes the data but not the content-length. The docs do not say anything about this either way. ---------- messages: 175485 nosy: orsenthil, terry.reedy priority: normal severity: normal stage: needs patch status: open title: urllib.request: opener not resetting content-length type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 03:45:18 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 02:45:18 +0000 Subject: [issue812369] module shutdown procedure based on GC Message-ID: <1352774718.27.0.841990227027.issue812369@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 03:48:22 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 02:48:22 +0000 Subject: [issue6386] importing yields unexpected results when initial script is a symbolic link In-Reply-To: <1246356344.6.0.218965497612.issue6386@psf.upfronthosting.co.za> Message-ID: <1352774902.78.0.467003265094.issue6386@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 03:50:38 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 02:50:38 +0000 Subject: [issue15480] Drop TYPE_INT64 from marshal in Python 3.4 In-Reply-To: <1343497742.77.0.0142368260807.issue15480@psf.upfronthosting.co.za> Message-ID: <1352775038.28.0.478814163372.issue15480@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 03:51:59 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 02:51:59 +0000 Subject: [issue16163] Wrong name in Lib/pkgutil.py:iter_importers In-Reply-To: <1349697246.97.0.772309039282.issue16163@psf.upfronthosting.co.za> Message-ID: <1352775119.8.0.577181869291.issue16163@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 03:52:49 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 02:52:49 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1352775169.94.0.209771119393.issue16392@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 03:53:40 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 02:53:40 +0000 Subject: [issue5950] Make zipimport work with zipfile containing comments In-Reply-To: <1241628586.95.0.0801479384158.issue5950@psf.upfronthosting.co.za> Message-ID: <1352775220.83.0.470867695439.issue5950@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 03:59:27 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 02:59:27 +0000 Subject: [issue14228] It is impossible to catch sigint on startup in python code In-Reply-To: <1331197536.95.0.87995012042.issue14228@psf.upfronthosting.co.za> Message-ID: <1352775567.51.0.675450664112.issue14228@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 04:02:02 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 03:02:02 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1352775722.62.0.586334352981.issue16421@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 04:04:49 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 03:04:49 +0000 Subject: [issue14260] re.groupindex available for modification and continues to work, having incorrect data inside it In-Reply-To: <1331530103.22.0.0779581075646.issue14260@psf.upfronthosting.co.za> Message-ID: <1352775889.13.0.861740236395.issue14260@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 04:42:01 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 03:42:01 +0000 Subject: [issue14369] make __closure__ writable In-Reply-To: <1332179477.04.0.11685261564.issue14369@psf.upfronthosting.co.za> Message-ID: <1352778121.19.0.668192922456.issue14369@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 04:47:59 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 03:47:59 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1352778479.71.0.886011776506.issue14373@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 04:53:10 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 03:53:10 +0000 Subject: [issue14803] Add feature to allow code execution prior to __main__ invocation In-Reply-To: <1336981419.55.0.280530546632.issue14803@psf.upfronthosting.co.za> Message-ID: <1352778790.93.0.61079579743.issue14803@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 04:56:13 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 13 Nov 2012 03:56:13 +0000 Subject: [issue16457] Allow operator 'getter' methods to take a list and return a tuple In-Reply-To: <1352679459.02.0.414122398053.issue16457@psf.upfronthosting.co.za> Message-ID: <1352778973.41.0.808441513733.issue16457@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 05:17:54 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 13 Nov 2012 04:17:54 +0000 Subject: [issue16457] Allow operator 'getter' methods to take a list and return a tuple In-Reply-To: <1352679459.02.0.414122398053.issue16457@psf.upfronthosting.co.za> Message-ID: <1352780274.55.0.0546389449795.issue16457@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It's unfortunate that the automatic scalar/tuple switchover design doesn't play well with start-args. We have the same issue arising in a number of places (for example, min(*args) isn't happy when args is of length 1). While inconvenient for variable length argument lists, I don't think the proposed solution is clean. As it currently stands, the signature is reasonably simple, easy to explain, and doesn't depend on exact type checks (like %-formatting does with tuple/dict arguments). Instead of contorting the signature for itemgetter(), it would be better if the use case were to be addressed with the existing language features: >>> t = tuple('abcdefghi') >>> for columns in ([], [2], [2,4], [2,4,6]): print(tuple(t[i] for i in columns)) () ('c',) ('c', 'e') ('c', 'e', 'g') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 05:29:12 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 04:29:12 +0000 Subject: [issue15223] datetime instances lack __module__ attribute In-Reply-To: <1340985927.81.0.282972335734.issue15223@psf.upfronthosting.co.za> Message-ID: <1352780952.41.0.257929384988.issue15223@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 05:31:32 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 04:31:32 +0000 Subject: [issue12703] Improve error reporting for packaging.util.resolve_name In-Reply-To: <1312626935.87.0.525014153536.issue12703@psf.upfronthosting.co.za> Message-ID: <1352781092.32.0.41440264626.issue12703@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 05:56:37 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 04:56:37 +0000 Subject: [issue15272] pkgutil.find_loader accepts invalid module names In-Reply-To: <1341656387.47.0.245292094882.issue15272@psf.upfronthosting.co.za> Message-ID: <1352782597.9.0.519597979031.issue15272@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 05:59:33 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 04:59:33 +0000 Subject: [issue9325] Add an option to pdb/trace/profile to run library module as a script In-Reply-To: <1279743902.96.0.66207849175.issue9325@psf.upfronthosting.co.za> Message-ID: <1352782773.72.0.243443318878.issue9325@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 06:00:48 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 05:00:48 +0000 Subject: [issue9914] trace/profile conflict with the use of sys.modules[__name__] In-Reply-To: <1285093065.41.0.819526070425.issue9914@psf.upfronthosting.co.za> Message-ID: <1352782847.99.0.446269366909.issue9914@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 06:01:27 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 05:01:27 +0000 Subject: [issue15376] Refactor the test_runpy walk_package support code into a common location In-Reply-To: <1342509049.53.0.303616016829.issue15376@psf.upfronthosting.co.za> Message-ID: <1352782887.69.0.740480359884.issue15376@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 06:02:39 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 05:02:39 +0000 Subject: [issue15358] Test pkgutil.walk_packages in test_pkgutil instead of test_runpy In-Reply-To: <1342346071.33.0.869652246152.issue15358@psf.upfronthosting.co.za> Message-ID: <1352782959.63.0.0303763851057.issue15358@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 06:04:09 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 05:04:09 +0000 Subject: [issue15403] Refactor package creation support code into a common location In-Reply-To: <1342782793.3.0.140383152387.issue15403@psf.upfronthosting.co.za> Message-ID: <1352783049.03.0.0658902458654.issue15403@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 06:05:09 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 05:05:09 +0000 Subject: [issue15577] Real argc and argv in embedded interpreter In-Reply-To: <1344371910.44.0.262957922939.issue15577@psf.upfronthosting.co.za> Message-ID: <1352783109.62.0.935647395051.issue15577@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 06:12:09 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 13 Nov 2012 05:12:09 +0000 Subject: [issue16441] range usage in gzip module leads to excessive memory usage. In-Reply-To: <1352388383.51.0.371199818587.issue16441@psf.upfronthosting.co.za> Message-ID: <1352783529.79.0.543304277656.issue16441@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 06:12:22 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 05:12:22 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1352783542.05.0.203242508855.issue15031@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 06:13:09 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 13 Nov 2012 05:13:09 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1352783589.25.0.810275264263.issue14373@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> patch review versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 06:26:25 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 05:26:25 +0000 Subject: [issue15751] Support subinterpreters in the GIL state API In-Reply-To: <1345526301.75.0.455071650321.issue15751@psf.upfronthosting.co.za> Message-ID: <1352784385.06.0.936194008107.issue15751@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 06:47:29 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 05:47:29 +0000 Subject: [issue11776] Constructor signatures missing in types module documentation In-Reply-To: <1302036805.33.0.506634428921.issue11776@psf.upfronthosting.co.za> Message-ID: <1352785649.61.0.19431958136.issue11776@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:01:27 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:01:27 +0000 Subject: [issue15894] _PyImport_ReInitLock() doesn't check return value of PyThread_acquire_lock In-Reply-To: <1347229394.03.0.409721609393.issue15894@psf.upfronthosting.co.za> Message-ID: <1352786487.16.0.0630190181656.issue15894@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:02:22 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:02:22 +0000 Subject: [issue15892] _PyImport_GetDynLoadFunc() doesn't check return value of fstat() In-Reply-To: <1347227762.77.0.329908285172.issue15892@psf.upfronthosting.co.za> Message-ID: <1352786542.09.0.992949374679.issue15892@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:06:42 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:06:42 +0000 Subject: [issue15905] Copy to fixed size buffer w/o check in sys_update_path In-Reply-To: <1347293386.49.0.00561600810364.issue15905@psf.upfronthosting.co.za> Message-ID: <1352786802.85.0.380032709844.issue15905@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:13:00 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:13:00 +0000 Subject: [issue12680] cPickle.loads is not thread safe due to non-thread-safe imports In-Reply-To: <1312272969.55.0.673755441724.issue12680@psf.upfronthosting.co.za> Message-ID: <1352787180.35.0.135715021817.issue12680@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:21:33 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:21:33 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1352787693.52.0.672222554388.issue7559@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:22:36 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:22:36 +0000 Subject: [issue15415] Add temp_dir() and change_cwd() to test.support In-Reply-To: <1342905198.6.0.0438176504742.issue15415@psf.upfronthosting.co.za> Message-ID: <1352787756.08.0.734372107501.issue15415@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:27:34 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:27:34 +0000 Subject: [issue16027] pkgutil doesn't support frozen modules In-Reply-To: <1348506161.12.0.954547119673.issue16027@psf.upfronthosting.co.za> Message-ID: <1352788054.78.0.662698095035.issue16027@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:28:51 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:28:51 +0000 Subject: [issue16047] Tools/freeze no longer works in Python 3 In-Reply-To: <1348590480.55.0.440432620482.issue16047@psf.upfronthosting.co.za> Message-ID: <1352788131.55.0.725687841788.issue16047@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:30:56 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:30:56 +0000 Subject: [issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS In-Reply-To: <1327519681.79.0.252690630069.issue13863@psf.upfronthosting.co.za> Message-ID: <1352788256.76.0.934542609824.issue13863@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:31:51 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:31:51 +0000 Subject: [issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS In-Reply-To: <1327519681.79.0.252690630069.issue13863@psf.upfronthosting.co.za> Message-ID: <1352788311.57.0.750870312025.issue13863@psf.upfronthosting.co.za> Eric Snow added the comment: actually still valid for previous to 3.3 ---------- nosy: +eric.snow resolution: works for me -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:35:01 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:35:01 +0000 Subject: [issue13028] python wastes linux users time by checking for dylib on each dynamic library load In-Reply-To: <1316717807.43.0.635056141333.issue13028@psf.upfronthosting.co.za> Message-ID: <1352788501.28.0.880097998021.issue13028@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:37:58 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:37:58 +0000 Subject: [issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0 In-Reply-To: <1344473974.14.0.584788696764.issue15599@psf.upfronthosting.co.za> Message-ID: <1352788678.83.0.587536501708.issue15599@psf.upfronthosting.co.za> Eric Snow added the comment: Is this still an issue? ---------- nosy: +eric.snow status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:38:55 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:38:55 +0000 Subject: [issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__ In-Reply-To: <1348615231.16.0.514985949274.issue16049@psf.upfronthosting.co.za> Message-ID: <1352788735.68.0.941379657499.issue16049@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:39:30 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:39:30 +0000 Subject: [issue16101] Verify all imported modules at startup are needed In-Reply-To: <1349110028.76.0.413324569089.issue16101@psf.upfronthosting.co.za> Message-ID: <1352788770.51.0.816162333851.issue16101@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:42:44 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:42:44 +0000 Subject: [issue13290] get vars for object with __slots__ In-Reply-To: <1319871850.77.0.869546838833.issue13290@psf.upfronthosting.co.za> Message-ID: <1352788964.11.0.798443823539.issue13290@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:44:17 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:44:17 +0000 Subject: [issue8478] tokenize.untokenize first token missing failure case In-Reply-To: <1271816312.19.0.485614247328.issue8478@psf.upfronthosting.co.za> Message-ID: <1352789057.51.0.994610927424.issue8478@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:45:05 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:45:05 +0000 Subject: [issue16144] misleading sentence in reference/import In-Reply-To: <1349459459.97.0.290795741864.issue16144@psf.upfronthosting.co.za> Message-ID: <1352789105.4.0.886166489174.issue16144@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:49:21 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 06:49:21 +0000 Subject: [issue16213] Expose private functions in marshal used by importlib In-Reply-To: <1350054815.58.0.751298087125.issue16213@psf.upfronthosting.co.za> Message-ID: <1352789361.36.0.877130329934.issue16213@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 07:52:36 2012 From: report at bugs.python.org (Sean Ochoa) Date: Tue, 13 Nov 2012 06:52:36 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1352789556.43.0.750495675209.issue13349@psf.upfronthosting.co.za> Sean Ochoa added the comment: Lib/test/test_array.py -- Moved index test (for this issue) to test_index (existing test method). -- Added remove test (for this issue) to test_remove (existing test method) Lib/test/test_deque.py -- Moved remove test (for this issue) to test_index (existing test method). Lib/test/test_list.py -- Added test_remove instead of test_issue13349, and test_index as a new test method; both with positive tests and a negative test to for this issue. Lib/test/test_tuple.py -- Added test_remove instead of test_issue13349 as a new test method with a positive test and a negative test case for this issue to cover both items longer than 100chars and shorter items. Lib/test/test_xml_etree.py -- Added test_remove as a new test method to TreeBasicOperationTest testcase class instead of test_issue13349, with a positive test case and the negative test to cover this issue. ---------- Added file: http://bugs.python.org/file27975/issue13349.patch.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 08:01:24 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 07:01:24 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1352790084.39.0.609869962963.issue5128@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 08:02:53 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 07:02:53 +0000 Subject: [issue16217] Tracebacks are unnecessarily verbose when using 'python -m' In-Reply-To: <1350132701.04.0.542395484982.issue16217@psf.upfronthosting.co.za> Message-ID: <1352790173.68.0.978639973669.issue16217@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 08:05:49 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 07:05:49 +0000 Subject: [issue13028] python wastes linux users time by checking for dylib on each dynamic library load In-Reply-To: <1316717807.43.0.635056141333.issue13028@psf.upfronthosting.co.za> Message-ID: <1352790349.04.0.967471220549.issue13028@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 08:08:46 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 07:08:46 +0000 Subject: [issue10966] eliminate use of ImportError implicitly representing SkipTest In-Reply-To: <1295566830.75.0.786153857799.issue10966@psf.upfronthosting.co.za> Message-ID: <1352790526.69.0.556899424215.issue10966@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 08:14:15 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Nov 2012 07:14:15 +0000 Subject: [issue16047] Tools/freeze no longer works in Python 3 In-Reply-To: <1348590480.55.0.440432620482.issue16047@psf.upfronthosting.co.za> Message-ID: <1352790855.72.0.281766678137.issue16047@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +barry, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 08:14:37 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 07:14:37 +0000 Subject: [issue15104] Unclear language in __main__ description In-Reply-To: <1340092965.02.0.675870286607.issue15104@psf.upfronthosting.co.za> Message-ID: <1352790877.66.0.781539876298.issue15104@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 08:15:01 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 07:15:01 +0000 Subject: [issue16386] imp.find_module does not specify registry key it searches on windows In-Reply-To: <1351859767.89.0.815277454803.issue16386@psf.upfronthosting.co.za> Message-ID: <1352790901.12.0.134309461455.issue16386@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 08:16:37 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 07:16:37 +0000 Subject: [issue16384] import.c doesn't handle EOFError from PyMarshal_Read* In-Reply-To: <1351796179.35.0.165892579115.issue16384@psf.upfronthosting.co.za> Message-ID: <1352790997.02.0.626391348456.issue16384@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 08:22:02 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 07:22:02 +0000 Subject: [issue8745] zipimport is a bit slow In-Reply-To: <1274162892.24.0.612432614461.issue8745@psf.upfronthosting.co.za> Message-ID: <1352791322.14.0.694192263586.issue8745@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 08:23:28 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 07:23:28 +0000 Subject: [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1352791408.98.0.743107984218.issue16194@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 09:31:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 13 Nov 2012 08:31:27 +0000 Subject: [issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename In-Reply-To: <1343479745.83.0.410557070565.issue15478@psf.upfronthosting.co.za> Message-ID: <3Y129p2HznzRCr@mail.python.org> Roundup Robot added the comment: New changeset ee7b713fec71 by Victor Stinner in branch 'default': Issue #15478: os.lchflags() is not always available when os.chflags() is available http://hg.python.org/cpython/rev/ee7b713fec71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 09:35:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Nov 2012 08:35:09 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1352795709.88.0.490333612342.issue13349@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also my comments to previous patch about repr() and error message checking. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 10:03:20 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 13 Nov 2012 09:03:20 +0000 Subject: [issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2? In-Reply-To: <1351359067.41.0.359232821509.issue16339@psf.upfronthosting.co.za> Message-ID: <1352797400.51.0.986153505184.issue16339@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: docs at python -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 10:22:05 2012 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Tue, 13 Nov 2012 09:22:05 +0000 Subject: [issue16047] Tools/freeze no longer works in Python 3 In-Reply-To: <1348590480.55.0.440432620482.issue16047@psf.upfronthosting.co.za> Message-ID: <1352798525.49.0.853921166735.issue16047@psf.upfronthosting.co.za> Andreas St?hrk added the comment: See also issue #11824 for the ABI tags changes. ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 10:24:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Nov 2012 09:24:17 +0000 Subject: [issue10395] new os.path function to extract common prefix based on path components In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1352798657.28.0.546578580459.issue10395@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Some conclusions of discussion at Python-ideas (http://comments.gmane.org/gmane.comp.python.ideas/17719): 1. commonpath() should eat double slashes in input (['/usr/bin', '/usr//bin'] -> '/usr/bin'). In any case the current implementation eats slashes on output (['/usr//bin', '/usr//bin'] -> '/usr/bin', not '/usr//bin'). 2. commonpath() should raise an exception instead of returning None on incompatible input. 3. May be commonpath() should eat also '.' components and return '.' instead of '' when relative paths have no common prefix. I am not sure. In general the current patch looks good enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 11:14:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Nov 2012 10:14:55 +0000 Subject: [issue14260] re.groupindex available for modification and continues to work, having incorrect data inside it In-Reply-To: <1331530103.22.0.0779581075646.issue14260@psf.upfronthosting.co.za> Message-ID: <1352801695.97.0.304067413137.issue14260@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I fully agree with ?ric. Just don't do this. ---------- nosy: +serhiy.storchaka resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 11:18:49 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 13 Nov 2012 10:18:49 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352728421.95.0.44557665826.issue16460@psf.upfronthosting.co.za> Message-ID: <50A21E8D.3080608@v.loewis.de> Martin v. L?wis added the comment: Am 12.11.12 14:53, schrieb Tom Pohl: > What do I expect from FD (x//y): > 1. Perform a division (I don't care about the details here). > 2. Return an integer value q (even if it's stored in a float). > 3. The absolute difference between the mathematical division q'=x/y and the returned result q is less than 1, since it's just a floor operation, right? > > 1//0.1 = 9.0 violates my personal last expectation and I guess I'm not the only one. However, it matches *precisely* your description of what you expect: 1. 1 divided-by 0.1 gives 9.99999999999999944488848768742176060306327615036178207623262235371852234374499248... Please understand that the correct result of 1 divided-by 0.1 is *not* 10, because 0.1 is *not* 1/10. 2. returned is then the integer 9 3. the difference is .99999999999999944488848768742176060306327615036178207623262235371852234374499248... which is indeed smaller than 1. P.S. In case you want to get a more exact result of 1 divided-by 0.1, get the digits from int(1/fractions.Fraction(0.1)*10**180) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 11:47:28 2012 From: report at bugs.python.org (Stefan Krah) Date: Tue, 13 Nov 2012 10:47:28 +0000 Subject: [issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0 In-Reply-To: <1344473974.14.0.584788696764.issue15599@psf.upfronthosting.co.za> Message-ID: <1352803648.59.0.804385406205.issue15599@psf.upfronthosting.co.za> Stefan Krah added the comment: Well, there was a test_circular_imports() failure on (I think) the Windows-amd64 bot last week, but I can't access it any more. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 12:06:20 2012 From: report at bugs.python.org (Stefan Krah) Date: Tue, 13 Nov 2012 11:06:20 +0000 Subject: [issue14260] re.groupindex available for modification and continues to work, having incorrect data inside it In-Reply-To: <1331530103.22.0.0779581075646.issue14260@psf.upfronthosting.co.za> Message-ID: <1352804780.03.0.624099324197.issue14260@psf.upfronthosting.co.za> Stefan Krah added the comment: I'm not so sure. If dicts or classes are used for configuration or informational purposes, I prefer them to be locked down. An example of the first is the decimal context, where it was possible to write context.emax = 9 instead of context.Emax = 9 without getting an error. This is an easy mistake to make and can be hard to track down in a large program. The mistake here is maybe less likely, but I agree with Georg that it's a case for a read-only dict/dictproxy. ---------- nosy: +skrah status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 12:11:28 2012 From: report at bugs.python.org (Abel Farias) Date: Tue, 13 Nov 2012 11:11:28 +0000 Subject: [issue14260] re.grupindex available for modification and continues to work, having incorrect data inside it In-Reply-To: <1331530103.22.0.0779581075646.issue14260@psf.upfronthosting.co.za> Message-ID: <1352805088.24.0.775048839046.issue14260@psf.upfronthosting.co.za> Changes by Abel Farias : ---------- title: re.groupindex available for modification and continues to work, having incorrect data inside it -> re.grupindex available for modification and continues to work, having incorrect data inside it _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 12:12:13 2012 From: report at bugs.python.org (Abel Farias) Date: Tue, 13 Nov 2012 11:12:13 +0000 Subject: [issue14260] re.grupindex available for modification and continues to work, having incorrect data inside it In-Reply-To: <1331530103.22.0.0779581075646.issue14260@psf.upfronthosting.co.za> Message-ID: <1352805133.71.0.177918749908.issue14260@psf.upfronthosting.co.za> Changes by Abel Farias : ---------- nosy: +Abel.Farias _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 12:18:05 2012 From: report at bugs.python.org (Stefan Krah) Date: Tue, 13 Nov 2012 11:18:05 +0000 Subject: [issue14260] re.groupindex available for modification and continues to work, having incorrect data inside it In-Reply-To: <1331530103.22.0.0779581075646.issue14260@psf.upfronthosting.co.za> Message-ID: <1352805485.82.0.46936983422.issue14260@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- title: re.grupindex available for modification and continues to work, having incorrect data inside it -> re.groupindex available for modification and continues to work, having incorrect data inside it _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 13:39:34 2012 From: report at bugs.python.org (Ned Batchelder) Date: Tue, 13 Nov 2012 12:39:34 +0000 Subject: [issue7083] locals() behaviour differs when tracing is in effect In-Reply-To: <1255009798.45.0.553728595296.issue7083@psf.upfronthosting.co.za> Message-ID: <1352810374.44.0.194717901531.issue7083@psf.upfronthosting.co.za> Ned Batchelder added the comment: ITSM this could use more clarification. It is subtle and baffling. I'm struggling to come up with sentences to make it clearer, though. ---------- nosy: +nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 15:03:28 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 13 Nov 2012 14:03:28 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352815408.63.0.60817332787.issue16418@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Does argparse actually convert (x)range objects to a list or set (the help indicates the latter) for internal use? No, it leaves the provided choices argument as is. Here is what the documentation says argparse accepts: "Any object that supports the *in* operator can be passed as the choices value, so dict objects, set objects, custom containers, etc. are all supported." And here is the code for testing containment: http://hg.python.org/cpython/file/ee7b713fec71/Lib/argparse.py#l2284 Terry, are you okay with the proposed documentation patch? Special-casing the display of range values seems like an enhancement request to me rather than a bug. I would suggest that be handled as an enhancement request targeted initially for Python 3.4. I would be happy to create a new issue for that. Alternatively, it could be considered as a second patch on this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 16:14:30 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Nov 2012 15:14:30 +0000 Subject: [issue16457] Allow operator 'getter' methods to take a list and return a tuple In-Reply-To: <1352679459.02.0.414122398053.issue16457@psf.upfronthosting.co.za> Message-ID: <1352819670.54.0.643094992478.issue16457@psf.upfronthosting.co.za> R. David Murray added the comment: Given Nick's point about itemgetter, I agree this isn't worth doing. I wouldn't want the signatures of attrgetter and itemgetter to no longer be parallel. Min isn't a problem, by the way, since it accepts an iterator as a single argument. ---------- resolution: -> rejected stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 16:59:15 2012 From: report at bugs.python.org (Christian Schubert) Date: Tue, 13 Nov 2012 15:59:15 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1352822355.25.0.238262628921.issue8865@psf.upfronthosting.co.za> Christian Schubert added the comment: > Would you please submit a PSF contributor agreement form? FYI: did that yesterday 9:43 UTC, no reaction (yet) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 17:01:30 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 13 Nov 2012 16:01:30 +0000 Subject: [issue14260] re.groupindex available for modification and continues to work, having incorrect data inside it In-Reply-To: <1331530103.22.0.0779581075646.issue14260@psf.upfronthosting.co.za> Message-ID: <1352822490.37.0.359563149478.issue14260@psf.upfronthosting.co.za> ?ric Araujo added the comment: I propose using a MappingProxy type in 3.4 and add an example to the docs for stable versions. ---------- resolution: invalid -> stage: -> needs patch versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 17:19:04 2012 From: report at bugs.python.org (Philipp Hagemeister) Date: Tue, 13 Nov 2012 16:19:04 +0000 Subject: [issue16465] dict creation performance regression Message-ID: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> New submission from Philipp Hagemeister: On my system, {} has become significantly slower in 3.3: $ python3.2 -m timeit -n 1000000 '{}' 1000000 loops, best of 3: 0.0314 usec per loop $ python3.3 -m timeit -n 1000000 '{}' 1000000 loops, best of 3: 0.0892 usec per loop $ hg id -i ee7b713fec71+ $ ./python -m timeit -n 1000000 '{}' 1000000 loops, best of 3: 0.0976 usec per loop Is this because of the dict randomization? ---------- components: Interpreter Core messages: 175503 nosy: phihag priority: normal severity: normal status: open title: dict creation performance regression type: performance versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 17:43:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Nov 2012 16:43:59 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> Message-ID: <1352825039.32.0.48750121138.issue16465@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I confirm that. $ ./python -m timeit -n 1000000 '{};{};{};{};{};{};{};{};{};{}' 2.6: 0.62 usec 2.7: 0.57 usec 3.1: 0.55 usec 3.2: 0.48 usec 3.3: 1.5 usec Randomization is not affecting it. ---------- keywords: +3.3regression nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 17:48:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Nov 2012 16:48:56 +0000 Subject: [issue14260] re.groupindex available for modification and continues to work, having incorrect data inside it In-Reply-To: <1331530103.22.0.0779581075646.issue14260@psf.upfronthosting.co.za> Message-ID: <1352825336.02.0.315569606628.issue14260@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Copy or proxy may affect performance. We will need to make benchmarks to see how much. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 17:56:53 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 13 Nov 2012 16:56:53 +0000 Subject: [issue13615] setup.py register fails with -r argument In-Reply-To: <1324070497.95.0.248126770194.issue13615@psf.upfronthosting.co.za> Message-ID: <1352825812.99.0.502318391935.issue13615@psf.upfronthosting.co.za> anatoly techtonik added the comment: Tested on Windows. Test is attached. ---------- keywords: +patch Added file: http://bugs.python.org/file27976/test_register.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 18:03:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Nov 2012 17:03:28 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> Message-ID: <1352826208.82.0.233283068131.issue16465@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, this is an effect of PEP 412. The difference exists only for creating dicts up to 5 items (inclusive). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 18:06:48 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 13 Nov 2012 17:06:48 +0000 Subject: [issue13615] setup.py register fails with -r argument In-Reply-To: <1324070497.95.0.248126770194.issue13615@psf.upfronthosting.co.za> Message-ID: <1352826408.63.0.41666764063.issue13615@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks, this helps. ---------- stage: test needed -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 18:19:18 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 13 Nov 2012 17:19:18 +0000 Subject: [issue13615] setup.py register fails with -r argument In-Reply-To: <1324070497.95.0.248126770194.issue13615@psf.upfronthosting.co.za> Message-ID: <1352827158.92.0.509908821931.issue13615@psf.upfronthosting.co.za> anatoly techtonik added the comment: Better test case. ---------- Added file: http://bugs.python.org/file27977/test_register.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 18:19:31 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 13 Nov 2012 17:19:31 +0000 Subject: [issue13615] setup.py register fails with -r argument In-Reply-To: <1324070497.95.0.248126770194.issue13615@psf.upfronthosting.co.za> Message-ID: <1352827171.24.0.623037557086.issue13615@psf.upfronthosting.co.za> anatoly techtonik added the comment: Fix. ---------- Added file: http://bugs.python.org/file27978/register.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 18:34:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Nov 2012 17:34:45 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> Message-ID: <1352828085.08.0.390592987252.issue16465@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: May be using the free list for keys will restore performance. ---------- nosy: +benjamin.peterson, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 19:02:39 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 13 Nov 2012 18:02:39 +0000 Subject: [issue16466] register command forgets password if no config file is created Message-ID: <1352829759.7.0.8937255807.issue16466@psf.upfronthosting.co.za> New submission from anatoly techtonik: Given: 1. there is no .pypirc 2. users enters credentials to register command 3. user refuses to create .pypirc Outcome: password is not being stored and subsequent (upload) command doesn't get it. Attached is the test case. ---------- assignee: eric.araujo components: Distutils files: test_register.py.2.diff keywords: patch messages: 175512 nosy: eric.araujo, tarek, techtonik priority: normal severity: normal status: open title: register command forgets password if no config file is created versions: Python 2.7 Added file: http://bugs.python.org/file27979/test_register.py.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 19:05:15 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 13 Nov 2012 18:05:15 +0000 Subject: [issue16466] register command forgets password if no config file is created In-Reply-To: <1352829759.7.0.8937255807.issue16466@psf.upfronthosting.co.za> Message-ID: <1352829915.55.0.224420108296.issue16466@psf.upfronthosting.co.za> anatoly techtonik added the comment: Fix is attached. ---------- Added file: http://bugs.python.org/file27980/register.py.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 19:15:48 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 13 Nov 2012 18:15:48 +0000 Subject: [issue11473] upload command no longer accepts repository by section name In-Reply-To: <1299882717.19.0.490703720004.issue11473@psf.upfronthosting.co.za> Message-ID: <1352830548.82.0.96769147888.issue11473@psf.upfronthosting.co.za> anatoly techtonik added the comment: So, if upload command never accepted repository by section name I am +1 for closing this issue (and opening a new one if symlink workaround is required). ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 19:33:14 2012 From: report at bugs.python.org (Anthony Tuininga) Date: Tue, 13 Nov 2012 18:33:14 +0000 Subject: [issue16467] frozen importlib required for extending Python interpreter not public Message-ID: <1352831594.42.0.797931332936.issue16467@psf.upfronthosting.co.za> New submission from Anthony Tuininga: With Python 3.3, the ability to create a Python interpreter independent of a Python installation (as is done with cx_Freeze and other such freezing tools) has become more difficult to accomplish. Py_Initialize() requires the presence of a frozen importlib module which is found in importlib.h, but that include file is not available in the public include files section of a Python distribution. I have copied it for my use but that seems wrong. Please advise on how this should take place now. Thanks. ---------- components: None messages: 175515 nosy: atuining priority: normal severity: normal status: open title: frozen importlib required for extending Python interpreter not public type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 19:38:43 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Nov 2012 18:38:43 +0000 Subject: [issue16467] frozen importlib required for extending Python interpreter not public In-Reply-To: <1352831594.42.0.797931332936.issue16467@psf.upfronthosting.co.za> Message-ID: <1352831923.06.0.528352735231.issue16467@psf.upfronthosting.co.za> R. David Murray added the comment: The file certainly exists, since Python requires it to run. It sounds like cx_Freeze just doesn't support Python3.3 yet. I don't see that this is a Python bug. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 19:39:10 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 13 Nov 2012 18:39:10 +0000 Subject: [issue16157] Irrelevant references to Misc/News In-Reply-To: <1349628852.45.0.324394497616.issue16157@psf.upfronthosting.co.za> Message-ID: <1352831950.02.0.611114795372.issue16157@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 19:50:31 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 13 Nov 2012 18:50:31 +0000 Subject: [issue11473] upload command no longer accepts repository by section name In-Reply-To: <1299882717.19.0.490703720004.issue11473@psf.upfronthosting.co.za> Message-ID: <1352832631.11.0.0517077499987.issue11473@psf.upfronthosting.co.za> ?ric Araujo added the comment: If you read the first message again, or the docs, you can see that -r repo-name was indeed supported. ---------- title: upload command no longer accepts repository by section name -> upload command no longer accepts repository by section name versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 19:52:00 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 13 Nov 2012 18:52:00 +0000 Subject: [issue16466] register command forgets password if no config file is created In-Reply-To: <1352829759.7.0.8937255807.issue16466@psf.upfronthosting.co.za> Message-ID: <1352832720.98.0.701335175948.issue16466@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks. I remember previous discussion about this (mailing list or bug), I?ll look for it before applying. ---------- stage: -> patch review type: -> behavior versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 20:03:37 2012 From: report at bugs.python.org (Anthony Tuininga) Date: Tue, 13 Nov 2012 19:03:37 +0000 Subject: [issue16467] frozen importlib required for extending Python interpreter not public In-Reply-To: <1352831594.42.0.797931332936.issue16467@psf.upfronthosting.co.za> Message-ID: <1352833417.84.0.207185645437.issue16467@psf.upfronthosting.co.za> Anthony Tuininga added the comment: The file importlib.h is used when building the Python interpreter but it is *not* available in a standard (non-source) distribution of Python. I have copied the file from a source distribution of Python and that does in fact work, but I don`t want to make use of what is intended to be a private implementation detail. I am the author of cx_Freeze and trying to make it work correctly with Python 3.3. What I am looking for here is what I should be doing instead or asking for API that I can use. I hope that explains things better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 20:32:45 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 13 Nov 2012 19:32:45 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352835165.22.0.00473803487316.issue16418@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I do not agree with the patch. A summary of my view: Range objects support the 'in' operator and they are an intended option for choices, and, as I said before, are exactly the right option for arithmetic sequences with more than a few items. The problem is that they are now, in effect, special-cased relative to other builtins by having their compact representation replaced by an expanded tuple display. Moreover, the iteration required to do this introduces a discrepancy relative to the doc. This bug might be better fixed by a code change. (The OP did not pass a (x)range object but a list. That was unnecessary and easily fixed in itself. But such a fix leaves the issue above. Condensing long sequences is a somewhat separate issue.) As to intent: "The choices keyword argument may be more convenient for type checkers that simply check against a range of values: >>> >>> parser = argparse.ArgumentParser(prog='PROG') >>> parser.add_argument('foo', type=int, choices=range(5, 10)) >>> parser.parse_args('7'.split()) Namespace(foo=7) >>> parser.parse_args('11'.split()) usage: PROG [-h] {5,6,7,8,9} PROG: error: argument foo: invalid choice: 11 (choose from 5, 6, 7, 8, 9)" Note the expansion instead of the normal representation. It is not a big deal here, but obviously can be. ">>> parser.add_argument( ... 'integers', metavar='int', type=int, choices=range(10), ... nargs='+', help='an integer in the range 0..9')" As to tuple display expansion: the link points to 2284 def _check_value(self, action, value): 2285 # converted value must be one of the choices (if specified) 2286 if action.choices is not None and value not in action.choices: 2287 args = {'value': value, 2288 'choices': ', '.join(map(repr, action.choices))} 2289 msg = _('invalid choice: %(value)r (choose from %(choices)s)') 2290 raise ArgumentError(action, msg % args) In 2288 "', '.join(map(repr, action.choices))" produces a tuple display without parentheses. It essentially reproduced str/repr for tuples, lists, frozensets, sets, dicts, dict views, etc., leaving off the irrelevant fence characters. In doing so, by iteration, it introduces a bug --see below. For range objects, the tuple representation is a drastic change from the normal representation. In that sense, it special cases range among built-ins, and in a bad way when the range represents many values. (Help messages apparently do the same.) I consider this to be something of a bug. So the code as it is would have to special case range objects to avoid special-casing them in the sense above. The same would apply to any custom objects that have a succinct description for a large, possible infinite set. Here are two examples: "a word containing no 'e's" and "a 'word' containing only the letters a, b, c, d, e". Objects representing such infinite sets of strings could easily have a __contains__ method but not an __iter__ method. The code above requires the choices object to be iterable as well as supporting 'in'. This contradicts the doc statement "Any object that supports the in operator can be passed as the choices value,". That discrepancy is a bug. It should be fixed by either adding the restriction to the doc or removing it from the code. I recommend the latter. The code could simply use the str or repr of the choice object without trying to be fancy with a custom, fence-stripped, representation that does not work correctly or at all for all possible choice objects. In other words if action.choices is not None and value not in action.choices: msg = "invalid choice: %r (choose from %r)" % (value, action.choices) raise ArgumentError(action, msg) If the custom representation for non-range builtins is desired, then they are the ones that should be special-cased to not use their default representation. ---------- assignee: docs at python -> keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 20:36:09 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 13 Nov 2012 19:36:09 +0000 Subject: [issue13615] setup.py register fails with -r argument In-Reply-To: <1324070497.95.0.248126770194.issue13615@psf.upfronthosting.co.za> Message-ID: <1352835369.22.0.0187139171143.issue13615@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: -terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 21:09:05 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 13 Nov 2012 20:09:05 +0000 Subject: [issue16467] frozen importlib required for extending Python interpreter not public In-Reply-To: <1352831594.42.0.797931332936.issue16467@psf.upfronthosting.co.za> Message-ID: <1352837345.41.0.0851468713157.issue16467@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I tried to remove all references to "#include importlib.h" and _Py_M__importlib, and added the lines in _AddBaseModules(): self.AddAlias("_frozen_importlib", "importlib._bootstrap") self.IncludeModule("_frozen_importlib") Even if it's not optimal (the content importlib.h is recomputed by cx_Freeze), it's much better... The resulting binary I made fails with: Fatal Python error: Py_Initialize: Unable to get the locale encoding ImportError: No module named 'encodings' But it's probably because my Python3 is not "installed" properly. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 21:10:15 2012 From: report at bugs.python.org (Shivaram Lingamneni) Date: Tue, 13 Nov 2012 20:10:15 +0000 Subject: [issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever In-Reply-To: <1350905552.38.0.183421910215.issue16298@psf.upfronthosting.co.za> Message-ID: <1352837415.94.0.426582166946.issue16298@psf.upfronthosting.co.za> Changes by Shivaram Lingamneni : ---------- nosy: +slingamn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 21:29:24 2012 From: report at bugs.python.org (Tim Golden) Date: Tue, 13 Nov 2012 20:29:24 +0000 Subject: [issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE In-Reply-To: <1352688567.58.0.199976634188.issue16458@psf.upfronthosting.co.za> Message-ID: <1352838564.89.0.236148870708.issue16458@psf.upfronthosting.co.za> Tim Golden added the comment: I'm sorry, but I genuinely can't see what you're trying to say here. If you believe that there's a bug in Python's standard library, can you show a reproducible *Python* testcase for it, please (using the pywin32 modules if that helps) and state clearly what you think is wrong. ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 21:37:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 13 Nov 2012 20:37:10 +0000 Subject: [issue12428] functools test coverage In-Reply-To: <1309255638.21.0.342456839611.issue12428@psf.upfronthosting.co.za> Message-ID: <3Y1LH91YDszRKM@mail.python.org> Roundup Robot added the comment: New changeset fcfaca024160 by Antoine Pitrou in branch 'default': Issue #12428: Add a pure Python implementation of functools.partial(). http://hg.python.org/cpython/rev/fcfaca024160 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 21:37:48 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Nov 2012 20:37:48 +0000 Subject: [issue12428] functools test coverage In-Reply-To: <1309255638.21.0.342456839611.issue12428@psf.upfronthosting.co.za> Message-ID: <1352839068.08.0.410553710022.issue12428@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sorry for the delay. I have now committed the patch to 3.4 (default). Thank you! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 21:45:30 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Nov 2012 20:45:30 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1352822355.25.0.238262628921.issue8865@psf.upfronthosting.co.za> Message-ID: <1352839486.3320.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > > Would you please submit a PSF contributor agreement form? > > FYI: did that yesterday 9:43 UTC, no reaction (yet) Don't worry, it can take some time to process. We can still apply your patch, though, since you said you sent a contributor agreement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 21:57:50 2012 From: report at bugs.python.org (Karthk Rajagopalan) Date: Tue, 13 Nov 2012 20:57:50 +0000 Subject: [issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE In-Reply-To: <1352688567.58.0.199976634188.issue16458@psf.upfronthosting.co.za> Message-ID: <1352840270.41.0.84863390681.issue16458@psf.upfronthosting.co.za> Karthk Rajagopalan added the comment: Hi Tim, Thanks for your reply. I added test case using perl and python since it was easy to reproduce using perl socket module and show the issue happening with python's subprocess.py. There is definitely an action required in subprocess.py to catch 'invalid handle error' and my attached patch handle this situation. I can come up with a test case like perl does to create a listening socket and map the socket handle to a file descriptor. You will see this issue *only* when the open_osfhandle(..) is used to map the handle to a file descriptor. -Karthik ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 22:03:40 2012 From: report at bugs.python.org (=?utf-8?q?Te-j=C3=A9_Rodgers?=) Date: Tue, 13 Nov 2012 21:03:40 +0000 Subject: [issue8400] zipimporter find_module fullname mis-documented In-Reply-To: <1271258442.34.0.660774695694.issue8400@psf.upfronthosting.co.za> Message-ID: <1352840620.78.0.932048995778.issue8400@psf.upfronthosting.co.za> Te-j? Rodgers added the comment: I have also just been bitten by this. Is there anyway that this can be updated to support the dotted notation? ---------- nosy: +tjd.rodgers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 22:17:42 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 13 Nov 2012 21:17:42 +0000 Subject: [issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename In-Reply-To: <1343479745.83.0.410557070565.issue15478@psf.upfronthosting.co.za> Message-ID: <1352841462.81.0.951001805187.issue15478@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 23:03:11 2012 From: report at bugs.python.org (py.user) Date: Tue, 13 Nov 2012 22:03:11 +0000 Subject: [issue14260] re.groupindex is available for modification and continues to work, having incorrect data inside it In-Reply-To: <1331530103.22.0.0779581075646.issue14260@psf.upfronthosting.co.za> Message-ID: <1352844191.9.0.936740275758.issue14260@psf.upfronthosting.co.za> Changes by py.user : ---------- title: re.groupindex available for modification and continues to work, having incorrect data inside it -> re.groupindex is available for modification and continues to work, having incorrect data inside it _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 23:23:14 2012 From: report at bugs.python.org (Thomas Kluyver) Date: Tue, 13 Nov 2012 22:23:14 +0000 Subject: [issue16467] frozen importlib required for extending Python interpreter not public In-Reply-To: <1352831594.42.0.797931332936.issue16467@psf.upfronthosting.co.za> Message-ID: <1352845394.69.0.0024589119696.issue16467@psf.upfronthosting.co.za> Changes by Thomas Kluyver : ---------- nosy: +takluyver _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 13 23:32:28 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Nov 2012 22:32:28 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> Message-ID: <1352845948.28.0.537787905582.issue16465@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Does this regression impact any real-world program? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 00:48:20 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 13 Nov 2012 23:48:20 +0000 Subject: [issue12428] functools test coverage In-Reply-To: <1309255638.21.0.342456839611.issue12428@psf.upfronthosting.co.za> Message-ID: <1352850500.03.0.69135934184.issue12428@psf.upfronthosting.co.za> Eric Snow added the comment: The following from the changeset left me with questions: -from _functools import partial, reduce +try: + from _functools import reduce +except ImportError: + pass * Why the try block when there wasn't one before? * Should reduce be added to __all__ only conditionally? * Should the pure Python partial only be used if _functools.partial is not available? * Should _functools.partial be removed? ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 01:05:39 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 14 Nov 2012 00:05:39 +0000 Subject: [issue8400] zipimporter find_module fullname mis-documented In-Reply-To: <1271258442.34.0.660774695694.issue8400@psf.upfronthosting.co.za> Message-ID: <1352851539.42.0.123325087616.issue8400@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 01:11:22 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 14 Nov 2012 00:11:22 +0000 Subject: [issue16467] frozen importlib required for extending Python interpreter not public In-Reply-To: <1352831594.42.0.797931332936.issue16467@psf.upfronthosting.co.za> Message-ID: <1352851882.79.0.533371768217.issue16467@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +brett.cannon, eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 01:14:29 2012 From: report at bugs.python.org (Brian Thorne) Date: Wed, 14 Nov 2012 00:14:29 +0000 Subject: [issue12428] functools test coverage In-Reply-To: <1309255638.21.0.342456839611.issue12428@psf.upfronthosting.co.za> Message-ID: <1352852069.67.0.262201698934.issue12428@psf.upfronthosting.co.za> Brian Thorne added the comment: > * Why the try block when there wasn't one before? > * Should reduce be added to __all__ only conditionally? My mistake, the try block should have just covered the import of partial - that is after all the exceptional circumstance we can deal with by using the pure python implementation. Possibly reduce could be handled in a similar way with a fallback python implementation? Otherwise your suggestion of conditionally adding it to __all__ makes sense to me. > * Should the pure Python partial only be used if _functools.partial is not available? > * Should _functools.partial be removed? What are the main considerations to properly answer these last questions? Performance comparison between the implementations, maintainability? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 02:23:33 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 14 Nov 2012 01:23:33 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> Message-ID: <1352856213.42.0.462497404497.issue16465@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Does this regression impact any real-world program? That is a blow-off response. A huge swath of the language is affected by dictionary performance (keyword args, module lookups, attribute lookup, etc). Most programs will be affected to some degree -- computationally bound programs will notice more and i/o bound programs won't notice at all. ---------- nosy: +rhettinger priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 04:51:05 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 14 Nov 2012 03:51:05 +0000 Subject: [issue12428] functools test coverage In-Reply-To: <1309255638.21.0.342456839611.issue12428@psf.upfronthosting.co.za> Message-ID: <1352865065.61.0.586605726674.issue12428@psf.upfronthosting.co.za> Eric Snow added the comment: > Possibly reduce could be handled in a similar way with a fallback python > implementation? Otherwise your suggestion of conditionally adding it to __all__ > makes sense to me. In the meantime I'd expect the import of _functools.reduce to not be wrapped in a try block. Does that have an impact on coverage? >> * Should the pure Python partial only be used if _functools.partial is not available? >> * Should _functools.partial be removed? > > What are the main considerations to properly answer these last questions? Performance > comparison between the implementations, maintainability? Sorry, the first time through I missed the part of the patch that tries to import _functools.partial _after_ the pure Python version is defined. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 05:16:12 2012 From: report at bugs.python.org (Matt Joiner) Date: Wed, 14 Nov 2012 04:16:12 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1352866572.41.0.861456108052.issue14373@psf.upfronthosting.co.za> Matt Joiner added the comment: I look forward to your feedback Ezio. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 05:32:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 14 Nov 2012 04:32:19 +0000 Subject: [issue16468] argparse only supports iterable choices Message-ID: <1352867539.71.0.970228461518.issue16468@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to ensure that argparse.ArgumentParser() accepts objects that support the "in" operator for the "choices" argument to ArgumentParser.add_argument(). As observed by Terry in the comments to issue 16418: http://bugs.python.org/issue16418#msg175520 the argparse module does not in general support "choices" values that support the "in" operator, even though the argparse documentation says it does: "Any object that supports the in operator can be passed as the choices value, so dict objects, set objects, custom containers, etc. are all supported." (from http://docs.python.org/2/library/argparse.html#choices ) For example, passing a user-defined type that implements only self.__contains__() yields the following error message when calling ArgumentParser.parse_args(): File ".../Lib/argparse.py", line 1293, in add_argument raise ValueError("length of metavar tuple does not match nargs") (The error message also gives the wrong reason for failure. The swallowed exception is "TypeError: '' object is not iterable.") ---------- components: Library (Lib) messages: 175534 nosy: chris.jerdonek, terry.reedy priority: normal severity: normal status: open title: argparse only supports iterable choices type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 06:31:54 2012 From: report at bugs.python.org (Anthony Tuininga) Date: Wed, 14 Nov 2012 05:31:54 +0000 Subject: [issue16467] frozen importlib required for extending Python interpreter not public In-Reply-To: <1352831594.42.0.797931332936.issue16467@psf.upfronthosting.co.za> Message-ID: <1352871114.74.0.534058628154.issue16467@psf.upfronthosting.co.za> Anthony Tuininga added the comment: Thanks to Amaury for his suggestion. It resolves the problem completely and answers the question I had about how to proceed. For others who may come across this, the key was to generate the importlib._bootstrap module (which is what is found in importlib.h) directly, rather than by including the private generated file. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 07:30:20 2012 From: report at bugs.python.org (Case Van Horsen) Date: Wed, 14 Nov 2012 06:30:20 +0000 Subject: [issue16469] Exceptions raised by Fraction() from those raised by int() Message-ID: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> New submission from Case Van Horsen: When attempting to convert a float("nan"), float("inf"), or float("-inf"), fractions.Fraction() raises different exceptions than int() >>> int(float("nan")) Traceback (most recent call last): File "", line 1, in ValueError: cannot convert float NaN to integer >>> fractions.Fraction(float("nan")) Traceback (most recent call last): File "", line 1, in File "/opt/local/lib/python3.2/fractions.py", line 114, in __new__ value = Fraction.from_float(numerator) File "/opt/local/lib/python3.2/fractions.py", line 186, in from_float raise TypeError("Cannot convert %r to %s." % (f, cls.__name__)) TypeError: Cannot convert nan to Fraction. >>> int(float("inf")) Traceback (most recent call last): File "", line 1, in OverflowError: cannot convert float infinity to integer >>> fractions.Fraction(float("inf")) Traceback (most recent call last): File "", line 1, in File "/opt/local/lib/python3.2/fractions.py", line 114, in __new__ value = Fraction.from_float(numerator) File "/opt/local/lib/python3.2/fractions.py", line 186, in from_float raise TypeError("Cannot convert %r to %s." % (f, cls.__name__)) TypeError: Cannot convert inf to Fraction. >>> int(float("-inf")) Traceback (most recent call last): File "", line 1, in OverflowError: cannot convert float infinity to integer >>> fractions.Fraction(float("-inf")) Traceback (most recent call last): File "", line 1, in File "/opt/local/lib/python3.2/fractions.py", line 114, in __new__ value = Fraction.from_float(numerator) File "/opt/local/lib/python3.2/fractions.py", line 186, in from_float raise TypeError("Cannot convert %r to %s." % (f, cls.__name__)) TypeError: Cannot convert -inf to Fraction. Should the exceptions be changed to ValueError and OverflowError? ---------- components: Library (Lib) messages: 175536 nosy: casevh priority: normal severity: normal status: open title: Exceptions raised by Fraction() from those raised by int() versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 07:35:44 2012 From: report at bugs.python.org (Tom Pohl) Date: Wed, 14 Nov 2012 06:35:44 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352874944.24.0.44675041245.issue16460@psf.upfronthosting.co.za> Tom Pohl added the comment: You still get me wrong. Thanks to your explanations and to my personal knowledge about this topic (programming for 28 years now; PhD in CS/numerics/HPC) I now fully understand the technical details about the current implementation of FD. The problem I see is that the average Python user does and should not care about such details. I talked to a bunch of people (n=7) here at the company where I also give Python courses from time to time. I asked them two questions: 1. Is this behavior of FD what you would expect? 2. Given the current behavior of FD, what use cases do you see? The answers were always the same (and I tend to agree): 1. No. 2. No idea. All of you seem to answer the first questions with yes, but what's your answer to the second question? What would you recommend your 10-year-old son or your 62-year-old mother to do with the current FD operator? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 07:53:47 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 14 Nov 2012 06:53:47 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352876027.71.0.0902697616241.issue16460@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, I agree with this being closed. The current behavior is a fact-of-life for anyone using binary floating point. The decimal module is provided people who want more intuitive behaviors when dividing by numbers like 0.1 which are exactly representable as a decimal fraction but not as a binary fraction. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 07:56:46 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Wed, 14 Nov 2012 06:56:46 +0000 Subject: [issue2333] Backport set and dict comprehensions In-Reply-To: <1205775453.72.0.387864116054.issue2333@psf.upfronthosting.co.za> Message-ID: <1352876206.52.0.0204122095635.issue2333@psf.upfronthosting.co.za> Yongzhi Pan added the comment: Great they are backported to 2.7. Dictionary and set comprehensions are not documented in the tutorial of 2.7, though they are in the language reference. Is it OK to add these to the tutorial? I've uploaded a patch. ---------- nosy: +fossilet Added file: http://bugs.python.org/file27981/set_and_dict_comprehensions.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 08:06:12 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 14 Nov 2012 07:06:12 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1352876772.01.0.636306161084.issue14373@psf.upfronthosting.co.za> Ezio Melotti added the comment: I wonder if we should keep the original Python implementation alongside the new C version. If we do, it would be nice to see a 100% coverage of the Python version and have the tests check both the implementations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 08:07:52 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 14 Nov 2012 07:07:52 +0000 Subject: [issue2333] Backport set and dict comprehensions In-Reply-To: <1205775453.72.0.387864116054.issue2333@psf.upfronthosting.co.za> Message-ID: <1352876872.64.0.204290630552.issue2333@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Is it OK to add these to the tutorial? I've uploaded a patch. Yes, but please create a new issue. > How about fixing set.__repr__ ? Is it broken? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 08:11:45 2012 From: report at bugs.python.org (Tom Pohl) Date: Wed, 14 Nov 2012 07:11:45 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352877105.77.0.592768091669.issue16460@psf.upfronthosting.co.za> Tom Pohl added the comment: This is "a fact-of-life for anyone using binary floating point": x = 0.0 while x != 1.0: print(x); x += 0.1 # so long This is not: 1 // 0.1 = 9.0 because math.floor(1/0.1) is able to come up with the result that is expected from an operator called "floor division". Aynway, I'm curios, what's your use case for FD? Since all of you are so strongly in favor of the current behavior you must be using it all the time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 08:12:02 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 14 Nov 2012 07:12:02 +0000 Subject: [issue16469] Exceptions raised by Fraction() from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1352877122.11.0.370208566788.issue16469@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, mark.dickinson, rhettinger, skrah type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 08:16:36 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Nov 2012 07:16:36 +0000 Subject: [issue12428] functools test coverage In-Reply-To: <1352865065.61.0.586605726674.issue12428@psf.upfronthosting.co.za> Message-ID: <1352877352.3372.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > > Possibly reduce could be handled in a similar way with a fallback python > > implementation? Otherwise your suggestion of conditionally adding it to __all__ > > makes sense to me. > > In the meantime I'd expect the import of _functools.reduce to not be > wrapped in a try block. Does that have an impact on coverage? I tried to remove the try block, but when making the import unconditional the tests fail with an ImportError (because reduce doesn't have a pure Python implementation). I haven't investigated further, since the try block doesn't look like a real issue to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 08:19:19 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 14 Nov 2012 07:19:19 +0000 Subject: [issue16157] Irrelevant references to Misc/News In-Reply-To: <1349628852.45.0.324394497616.issue16157@psf.upfronthosting.co.za> Message-ID: <1352877559.4.0.374215076449.issue16157@psf.upfronthosting.co.za> Ezio Melotti added the comment: Even better would be to link to the changelog page instead, but that's only available for Python 3.3/3.4 (does this issue affect 2.7/3.2?). http://docs.python.org/3.3/whatsnew/changelog.html ---------- nosy: +ezio.melotti, georg.brandl stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 08:20:34 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 14 Nov 2012 07:20:34 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1352877634.49.0.417157179571.issue14373@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #12428. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 08:20:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Nov 2012 07:20:56 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352856213.42.0.462497404497.issue16465@psf.upfronthosting.co.za> Message-ID: <1352877612.3372.5.camel@localhost.localdomain> Antoine Pitrou added the comment: > > Does this regression impact any real-world program? > > That is a blow-off response. A huge swath of the language is affected > by dictionary performance (keyword args, module lookups, attribute > lookup, etc). I was merely suggesting to report actual (non-micro) benchmark numbers. This issue is about dict creation, not dict lookups. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 08:43:37 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Wed, 14 Nov 2012 07:43:37 +0000 Subject: [issue16470] Backport set and dictionary comprehensions in tutorial to 2.7 Message-ID: <1352879017.7.0.397020464451.issue16470@psf.upfronthosting.co.za> New submission from Yongzhi Pan: Dictionary and set comprehensions are backported to 2.7 in issue #2333. The are not documented in the tutorial of 2.7, though they are in the language reference. Is it OK to add these to the tutorial? I've uploaded a patch. ---------- assignee: docs at python components: Documentation files: set_and_dict_comprehensions.diff keywords: patch messages: 175547 nosy: docs at python, fossilet priority: normal severity: normal status: open title: Backport set and dictionary comprehensions in tutorial to 2.7 type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file27982/set_and_dict_comprehensions.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 08:45:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 14 Nov 2012 07:45:42 +0000 Subject: [issue16470] Backport set and dictionary comprehensions in tutorial to 2.7 In-Reply-To: <1352879017.7.0.397020464451.issue16470@psf.upfronthosting.co.za> Message-ID: <1352879142.69.0.227171949937.issue16470@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 09:23:17 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 14 Nov 2012 08:23:17 +0000 Subject: [issue16469] Exceptions raised by Fraction() from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1352881397.73.0.200476813421.issue16469@psf.upfronthosting.co.za> Mark Dickinson added the comment: Certainly TypeError seems inappropriate here, and using ValueError for conversions from NaN sounds good to me. I'm not a big fan of the OverflowError for converting infinities to an integer: nothing's actually overflowed here. I think that should have been ValueError, too. So either of ValueError or OverflowError works for me there. I'd suggest fixing this for >= 3.4 only. ---------- stage: -> needs patch versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 09:23:50 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 14 Nov 2012 08:23:50 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1352881430.78.0.658709103179.issue16469@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- title: Exceptions raised by Fraction() from those raised by int() -> Exceptions raised by Fraction() different from those raised by int() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 09:24:21 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 14 Nov 2012 08:24:21 +0000 Subject: [issue16157] Irrelevant references to Misc/News In-Reply-To: <1349628852.45.0.324394497616.issue16157@psf.upfronthosting.co.za> Message-ID: <1352881461.39.0.682363409211.issue16157@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This issue affects only 3.3+ (see links above). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 09:43:51 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 14 Nov 2012 08:43:51 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1352882631.43.0.485519333587.issue16469@psf.upfronthosting.co.za> Mark Dickinson added the comment: The from_decimal method should be changed as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 09:46:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 14 Nov 2012 08:46:54 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> Message-ID: <1352882814.69.0.584438986385.issue16465@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As I understand, the new dict created on every call of function with keyword arguments. This slow down every such call about 0.1 ?sec. This is about 10%?of int('42', base=16). In the sum, some programs can slow down to a few percents. Direct comparison of 3.2 and 3.3 is meaningless because of the influence of other factors (first of all PEP 393). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 09:48:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 14 Nov 2012 08:48:35 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1352882915.91.0.679900763048.issue14373@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 09:51:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 14 Nov 2012 08:51:31 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352883091.73.0.0238903581059.issue16418@psf.upfronthosting.co.za> Chris Jerdonek added the comment: To simplify the discussion and for issue resolution purposes, I propose that the discussion about "large" choices containers be divided into separate discussions for (1) changes that should be applied to all maintenance releases (i.e. bug fix changes), and (2) changes that should be applied only to the in-development branch (i.e. enhancements). I propose that the current issue be used for the former. 3.4-only enhancements can be dealt with as part of a separate issue. I also created issue 16468 for the bug that Terry observed above that ArgumentParser does not in general support "choices" values that support the "in" operator. That issue exists and can be resolved independent of whether the choices collection is large. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 09:58:32 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 14 Nov 2012 08:58:32 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352883512.92.0.381576631172.issue16418@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > (1) changes that should be applied to all maintenance releases (i.e. bug fix changes) This should instead read, "(1) changes that should be applied to all maintenance releases (e.g. bug fix and/or documentation changes)." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 10:00:10 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Wed, 14 Nov 2012 09:00:10 +0000 Subject: [issue2333] Backport set and dict comprehensions In-Reply-To: <1205775453.72.0.387864116054.issue2333@psf.upfronthosting.co.za> Message-ID: <1352883610.74.0.336868666259.issue2333@psf.upfronthosting.co.za> Yongzhi Pan added the comment: I think metal means that the different ways set is repr'd in 2.7 and 3. In 2.7: In [9]: a = {x for x in 'abracadabra' if x not in 'abc'} In [10]: repr(a) Out[10]: "set(['r', 'd'])" In 3.2? In [6]: a = {x for x in 'abracadabra' if x not in 'abc'} In [7]: repr(a) Out[7]: "{'r', 'd'}" We were saying not changing __repr__ in #2335. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 10:15:57 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 14 Nov 2012 09:15:57 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1352884557.64.0.517732163281.issue16469@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 10:38:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 14 Nov 2012 09:38:27 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352885907.07.0.0721329345291.issue16418@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > The code could simply use the str or repr of the choice object It seems to me that this would result in less user-friendly behavior in many cases. It would also require the end-user to understand Python (e.g. xrange and dictionaries), which I don't think should be necessary for the user of a command-line script. For example, in Python 2.7 the containers xrange(5, 10), xrange(2, 10, 2), and {1: "foo", 2: "bar"} currently yield the following user-friendly messages for choice 0: invalid choice: 0 (choose from 5, 6, 7, 8, 9) invalid choice: 0 (choose from 2, 4, 6, 8) invalid choice: 0 (choose from 1, 2) With the proposed change, these messages would be as follows, which seem unnecessarily obfuscated: invalid choice: 0 (choose from xrange(5, 10)) invalid choice: 0 (choose from xrange(2, 10, 2)) invalid choice: 0 (choose from {1: 'foo', 2: 'bar'}) Thus, I think the proposal above would be a regression if applied. I think any changes to maintenance releases should preserve the current user-friendly messages (when those messages are user-friendly, e.g. when the containers are small). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 10:54:26 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 14 Nov 2012 09:54:26 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352874944.24.0.44675041245.issue16460@psf.upfronthosting.co.za> Message-ID: <20121114105425.Horde.yAZRD0lCcOxQo2pRbahVycA@webmail.df.eu> Martin v. L?wis added the comment: > I talked to a bunch of people (n=7) here at the company where I also > give Python courses from time to time. I asked them two questions: > 1. Is this behavior of FD what you would expect? > 2. Given the current behavior of FD, what use cases do you see? > > The answers were always the same (and I tend to agree): > 1. No. > 2. No idea. > > All of you seem to answer the first questions with yes, but what's > your answer to the second question? It's not that I had expected that answer, and I certainly agree that it is confusing. However, I also believe that it is the correct answer. > What would you recommend your 10-year-old son or your 62-year-old > mother to do with the current FD operator? The most obvious use case for FD is integer division. Neither my son nor my mom should use it for floating point (nor should they use floating-point in the first place). It's floating point. *Of course* it misbehaves. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 11:01:06 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 14 Nov 2012 10:01:06 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352877105.77.0.592768091669.issue16460@psf.upfronthosting.co.za> Message-ID: <20121114110105.Horde.C7ORc0lCcOxQo2vhjV3V4xA@webmail.df.eu> Martin v. L?wis added the comment: Zitat von Tom Pohl : > This is not: 1 // 0.1 = 9.0 because math.floor(1/0.1) is able to > come up with the result that is expected from an operator called > "floor division". You apparently assume that it is possible to give a definition to FD for floating point that is less confusing. I do not think that this is possible; in particular, I believe that definining x//y as math.floor(x/y) is also confusing, in other cases (without being able to construct such cases right away). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 11:11:41 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 14 Nov 2012 10:11:41 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352887901.1.0.28801402202.issue16460@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I believe that definining x//y as math.floor(x/y) is also confusing > in other cases (without being able to construct such cases right away). In addition, defining x//y as math.floor(x / y) would break its connection with %: a key invariant is that (x // y) * y + x % y should be (approximately in the case of floats) equal to y. The connection between // and % is more fundamental than the connection between // and /, so in cases where the two disagree, the %-related one wins. For applications: it's true that they're not common, but they do exist. One such is argument reduction: e.g., for a toy case, suppose that you're implementing a function that computes and returns sin and cos. The computation can be reduced to computing for angles between 0 and pi / 4: def sincos(x): """ Compute and return sin(x) and cos(x). """ q, r = divmod(x, pi / 4) This is an example where if the relationship between % and // were broken, we'd get wrong results---not simply inaccurate, but completely wrong. It's also worth noting that // and % are special in that they're the only basic arithmetic operations that can be computed *exactly*, with no numeric error, for a wide range of inputs: e.g., if x and y are positive and x / y < 2**53, then both x // y and x % y return exact results. Modifying them to return inexact results instead would be ... surprising. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 11:27:26 2012 From: report at bugs.python.org (Tom Pohl) Date: Wed, 14 Nov 2012 10:27:26 +0000 Subject: [issue16460] Strange results for floor division ("//") with non-integer divisors In-Reply-To: <1352708705.94.0.0678979335127.issue16460@psf.upfronthosting.co.za> Message-ID: <1352888846.55.0.0845176295253.issue16460@psf.upfronthosting.co.za> Tom Pohl added the comment: Mark, thanks for explaining the connection of // and %. Finally, I can see why somebody would want to stick to the current behavior of FD. It renders FD useless for all of my use cases, but there are simple alternatives. Thanks for your time, Tom ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 11:27:50 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 14 Nov 2012 10:27:50 +0000 Subject: [issue16471] upgrade to sphinx 1.1 Message-ID: <1352888870.05.0.523269386726.issue16471@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to upgrade Python's Sphinx from version 1.0 to 1.1. I don't already see an issue for this, and I'm not sure what upgrading entails. Personally, I'm interested in the enhanced indexing capabilities, e.g. the "see" and "seealso" entry types, as well as marking main index entries: http://sphinx-doc.org/markup/misc.html#directive-index I'm sure other reasons for upgrading have been floated, though I don't know what they are. ---------- assignee: docs at python components: Documentation messages: 175560 nosy: chris.jerdonek, docs at python priority: normal severity: normal status: open title: upgrade to sphinx 1.1 type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 11:44:25 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 14 Nov 2012 10:44:25 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1352889865.49.0.493687770323.issue16469@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 11:45:09 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 14 Nov 2012 10:45:09 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1352889909.72.0.25084017696.issue14373@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 12:06:06 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 14 Nov 2012 11:06:06 +0000 Subject: [issue16471] upgrade to sphinx 1.1 In-Reply-To: <1352888870.05.0.523269386726.issue16471@psf.upfronthosting.co.za> Message-ID: <1352891166.27.0.375092236531.issue16471@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +eric.araujo, ezio.melotti, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 12:13:32 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Nov 2012 11:13:32 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352882814.69.0.584438986385.issue16465@psf.upfronthosting.co.za> Message-ID: <14880963.235425722.1352891605375.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > As I understand, the new dict created on every call of function with > keyword arguments. This slow down every such call about 0.1 ?sec. > This is about 10%?of int('42', base=16). Ok, but `int('42', base=16)` is about the fastest function call with keyword arguments one can think about :-) In other words, the overhead will probably not be noticeable for most function calls. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 12:19:58 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 14 Nov 2012 11:19:58 +0000 Subject: [issue16378] venv.EnvBuilder docstring inconsistencies In-Reply-To: <1351743024.49.0.854763959686.issue16378@psf.upfronthosting.co.za> Message-ID: <3Y1jsn6j0ZzRPy@mail.python.org> Roundup Robot added the comment: New changeset afb476dc202f by Vinay Sajip in branch '3.3': Issue #16378: Updated docstrings to reflect the defaults present in the code. http://hg.python.org/cpython/rev/afb476dc202f New changeset 6f0e49ed0589 by Vinay Sajip in branch 'default': Closes #16378: Merged docstring changes from 3.3. http://hg.python.org/cpython/rev/6f0e49ed0589 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 12:20:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 14 Nov 2012 11:20:07 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> Message-ID: <1352892007.41.0.0094813221936.issue16465@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Ok, but `int('42', base=16)` is about the fastest function call with > keyword arguments one can think about :-) Not as fast as a call without keywords, `int('42', 16)`. :-( But this is a different issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 13:23:08 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 14 Nov 2012 12:23:08 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352895788.96.0.372618071671.issue16418@psf.upfronthosting.co.za> R. David Murray added the comment: I agree with Chris that using the repr in the general case would be a regression in usability for the end user (and certainly not suitable for a maintenance release). Here is some brainstorming: We could "special case" this via duck typing. If the object that represents the choices has 'start' and 'stop' attributes, use those to generate a message. ("from {start} up to but not including {stop}"). [*] If it doesn't, or it also has a 'step' that is not 1, check the len, generate the list if it is less than, say, 50, and if it is more give up and use the repr. If there is no len, do the expansion (which is what happens now) and throw it away in favor of the repr if there are more than 50 elements. If there is no iter, use the repr. Then as an enhancement we can also look for a special attribute (values_description?) that gives the entire text to use in the parenthesis in the help phrase to provide a way to customize the help text in 3.4+. [*] Or, at the risk of being too clever, if there is a 'step' use the message above and if there isn't a step attribute at all use "between {start} and {stop}. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 14:05:14 2012 From: report at bugs.python.org (=?utf-8?q?Te-j=C3=A9_Rodgers?=) Date: Wed, 14 Nov 2012 13:05:14 +0000 Subject: [issue8400] zipimporter find_module fullname mis-documented In-Reply-To: <1271258442.34.0.660774695694.issue8400@psf.upfronthosting.co.za> Message-ID: <1352898314.12.0.131747049841.issue8400@psf.upfronthosting.co.za> Te-j? Rodgers added the comment: It gets worse. Even though find_module works with the path separator, load_module fails. >>> zi.find_module("lib\\ui") >>> zi.load_module("lib\\ui") Traceback (most recent call last): File "", line 1, in File "dist/Test_Editor-1.0-py3.2.zip\lib\ui\__init__.py", line 9, in File "dist\Test_Editor-1.0-py3.2.zip\lib\ui\texteditorwindow.py", line 5, in File "dist\Test_Editor-1.0-py3.2.zip\lib\ui\designer\__init__.py", line 5, in ValueError: Attempted relative import beyond toplevel package ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 14:06:25 2012 From: report at bugs.python.org (=?utf-8?q?Te-j=C3=A9_Rodgers?=) Date: Wed, 14 Nov 2012 13:06:25 +0000 Subject: [issue8400] zipimporter find_module fullname mis-documented In-Reply-To: <1271258442.34.0.660774695694.issue8400@psf.upfronthosting.co.za> Message-ID: <1352898385.99.0.194191207295.issue8400@psf.upfronthosting.co.za> Te-j? Rodgers added the comment: Disregard the last...error on my part (so embarrassing!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 14:13:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 14 Nov 2012 13:13:23 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> Message-ID: <1352898803.22.0.805565517014.issue16465@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a really simple patch. It speed up to 1.9x an empty dict creation (still 1.6x slower than 3.2). Make your measurements of real-world programs. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file27983/dict_free_key_list.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 14:17:31 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Wed, 14 Nov 2012 13:17:31 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1352899051.84.0.85611373464.issue11566@psf.upfronthosting.co.za> V?clav ?milauer added the comment: Martin, I know it is not a proper fix. OTOH, Python is not the only project which "recommends" its header be included as first. I don't know if it is an issue for Python 3.x; will try to test that. This bug, though, is clearly reported about Python 2.7, which IS in bug-fix mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 14:34:01 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Wed, 14 Nov 2012 13:34:01 +0000 Subject: [issue16472] Distutils+mingw links agains msvcr90, while python27.dll is linked agains msvcrt Message-ID: <1352900041.91.0.554679168644.issue16472@psf.upfronthosting.co.za> New submission from V?clav ?milauer: Compiling an extension with --compiler=mingw32 with official python 2.7.3 distribution on Windows (64bit) leads to unusable result - crash on module load ("invalid access to memory"). The reasons is that Lib/distutils/cygwincompiler.py#l62 links the resulting .pyd file against msvcr90.dll (version is determined by version of MSVC used to build python itself), while python27.dll is linked against msvcrt.dll (shows the Dependency Walker). Based on my own experience (above) and MSDN docs http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx, http://msdn.microsoft.com/en-us/library/ms235460.aspx), loading 2 different runtimes is asking for trouble. I raised this topic on distutils-sig, hoping for an explanation. Judging by the reaction, it is quite possibly historical relict which is no longer needed. This is also hinted at by comments at the beginning of Lib/distutils/cygwincompiler.py "if you use a msvc compiled python version (1.5.2)" "mingw gcc 3.2/ld 2.13 works" I am aware of distutils being frozen for new features (unless you want to call bugfix a new feature). ---------- assignee: eric.araujo components: Distutils messages: 175569 nosy: eric.araujo, eudoxos, tarek priority: normal severity: normal status: open title: Distutils+mingw links agains msvcr90, while python27.dll is linked agains msvcrt versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 14:42:02 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Wed, 14 Nov 2012 13:42:02 +0000 Subject: [issue16472] Distutils+mingw links agains msvcr90, while python27.dll is linked agains msvcrt In-Reply-To: <1352900041.91.0.554679168644.issue16472@psf.upfronthosting.co.za> Message-ID: <1352900522.15.0.734693896866.issue16472@psf.upfronthosting.co.za> Changes by Ralf Schmitt : ---------- nosy: +schmir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 16:09:39 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 14 Nov 2012 15:09:39 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1352905779.21.0.818574653621.issue16469@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The description of OverflowError is that is is "raised when the result of an arithmetic operation is too large to be represented", so it doesn't actually need to overflow. Still, I see that ? actually isn't too large to be represented (and the documentation points out that integer operations will raise MemoryError instead of OverflowError). So yes, ValueError seems more appropriate. +1 for fixing this in 3.4, only. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 16:20:01 2012 From: report at bugs.python.org (Tim Golden) Date: Wed, 14 Nov 2012 15:20:01 +0000 Subject: [issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE In-Reply-To: <1352840270.41.0.84863390681.issue16458@psf.upfronthosting.co.za> Message-ID: <50A3B69E.2040407@timgolden.me.uk> Tim Golden added the comment: On 13/11/2012 20:57, Karthk Rajagopalan wrote: > I added test case using perl and python since it was easy to > reproduce using perl socket module and show the issue happening with > python's subprocess.py. There is definitely an action required in > subprocess.py to catch 'invalid handle error' and my attached patch > handle this situation. So, because subprocess.call includes a call to DuplicateHandle(stdin), that call will fail if stdin is currently a handle to a socket. Is that right? Your patch fails to apply cleanly to the hg tip, because Gregory P. Smith has been making changes in this very piece of code over the last few days. I'll add him as interested to the call as someone who can make a call as to the suitability of your patch. > I can come up with a test case like perl does to create a listening > socket and map the socket handle to a file descriptor. You will see > this issue *only* when the open_osfhandle(..) is used to map the > handle to a file descriptor. If this is to go ahead, we will need a test case which can run as part of the Python stdlib tests, and perl is not part of that stdlib! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 16:20:32 2012 From: report at bugs.python.org (Tim Golden) Date: Wed, 14 Nov 2012 15:20:32 +0000 Subject: [issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE In-Reply-To: <1352688567.58.0.199976634188.issue16458@psf.upfronthosting.co.za> Message-ID: <1352906432.04.0.596590293.issue16458@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 16:34:35 2012 From: report at bugs.python.org (Karthk Rajagopalan) Date: Wed, 14 Nov 2012 15:34:35 +0000 Subject: [issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE In-Reply-To: <1352688567.58.0.199976634188.issue16458@psf.upfronthosting.co.za> Message-ID: <1352907275.83.0.463721925758.issue16458@psf.upfronthosting.co.za> Karthk Rajagopalan added the comment: Hi Tim, Thanks for your reply. Yes, DuplicateHandle(..) seem to fail if the handle is to a socket under XP SP3. Can you point me to the guidelines about submitting patch so I can merge my change in main branch and upload it? We build python from source and doesn't use pywin32 as of now. So I downloaded them yesterday to come up with a test case in python which you can use in your test bed. -Karthik ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 16:37:38 2012 From: report at bugs.python.org (Tim Golden) Date: Wed, 14 Nov 2012 15:37:38 +0000 Subject: [issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE In-Reply-To: <1352907275.83.0.463721925758.issue16458@psf.upfronthosting.co.za> Message-ID: <50A3BAC0.8010501@timgolden.me.uk> Tim Golden added the comment: Start here: http://docs.python.org/devguide/ In particular: http://docs.python.org/devguide/patch.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 17:25:44 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 14 Nov 2012 16:25:44 +0000 Subject: [issue16468] argparse only supports iterable choices In-Reply-To: <1352867539.71.0.970228461518.issue16468@psf.upfronthosting.co.za> Message-ID: <1352910344.11.0.950095920957.issue16468@psf.upfronthosting.co.za> Chris Jerdonek added the comment: For the record, choices types implementing only __contains__ never worked in any cases. (I should have said ArgumentParser.add_argument() raises a ValueError in the above.) So I wonder if we should classify this as an enhancement and simply document the restriction in maintenance releases to iterable types. Clearly the module was written under the assumption (in multiple places) that choices are iterable. Also, if we do change this, perhaps we should fall back to displaying the metavar in help messages when naming the container rather than using repr(). A message like the following, for example, wouldn't be very helpful or look very good: invalid choice: 0 (choose from <__main__.Container object at 0x10555efb0>) I think we should avoid letting Python creep into help and usage text. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 17:59:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 14 Nov 2012 16:59:36 +0000 Subject: [issue16400] update default PyPI behavior in docs re: listing versions In-Reply-To: <1352023055.39.0.262942434831.issue16400@psf.upfronthosting.co.za> Message-ID: <1352912376.01.0.98746623118.issue16400@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Martin, can you confirm that PyPI's behavior is as described in the patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 18:08:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 14 Nov 2012 17:08:49 +0000 Subject: [issue16290] PyComplex_AsCComplex should allow __complex__ to return float. In-Reply-To: <1350725979.91.0.694424373202.issue16290@psf.upfronthosting.co.za> Message-ID: <3Y1scJ4C14zRQj@mail.python.org> Roundup Robot added the comment: New changeset 399e59ad0a70 by Mark Dickinson in branch 'default': Issue #16290: __complex__ must now always return an instance of complex. http://hg.python.org/cpython/rev/399e59ad0a70 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 18:09:03 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 14 Nov 2012 17:09:03 +0000 Subject: [issue16290] PyComplex_AsCComplex should allow __complex__ to return float. In-Reply-To: <1350725979.91.0.694424373202.issue16290@psf.upfronthosting.co.za> Message-ID: <1352912943.03.0.630502564666.issue16290@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 18:13:59 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 14 Nov 2012 17:13:59 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352913239.92.0.228955714328.issue16418@psf.upfronthosting.co.za> Chris Jerdonek added the comment: For maintenance releases, I think I would favor abbreviating the list only if it is "lossless" (e.g. for xrange objects). I think I would also be okay with abbreviating for arbitrary xranges -- in particular for arbitrary steps. For example, for xrange(0, 50, 3), I think something like the following might be better: "0, 3, 6, 9, ... 45, 48" (we could also include a difference hint). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 18:21:09 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 14 Nov 2012 17:21:09 +0000 Subject: [issue16400] update default PyPI behavior in docs re: listing versions In-Reply-To: <1352023055.39.0.262942434831.issue16400@psf.upfronthosting.co.za> Message-ID: <1352913669.17.0.724218976221.issue16400@psf.upfronthosting.co.za> Martin v. L?wis added the comment: +1, that's all correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 18:40:03 2012 From: report at bugs.python.org (Case Van Horsen) Date: Wed, 14 Nov 2012 17:40:03 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1352914803.19.0.788078439525.issue16469@psf.upfronthosting.co.za> Case Van Horsen added the comment: Do we also want to change int(infinity) to return ValueError? I think consistent behavior between int() and Fraction() is valuable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 18:42:59 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 14 Nov 2012 17:42:59 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> Message-ID: <1352914979.63.0.511648823112.issue16465@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 19:22:11 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 14 Nov 2012 18:22:11 +0000 Subject: [issue16468] argparse only supports iterable choices In-Reply-To: <1352867539.71.0.970228461518.issue16468@psf.upfronthosting.co.za> Message-ID: <1352917331.61.0.421467090307.issue16468@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +bethard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 19:31:44 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 14 Nov 2012 18:31:44 +0000 Subject: [issue12907] Update test coverage devguide page In-Reply-To: <1315284413.51.0.757189280849.issue12907@psf.upfronthosting.co.za> Message-ID: <1352917904.95.0.445501017178.issue12907@psf.upfronthosting.co.za> Brett Cannon added the comment: Committed in dac396a730e4 ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 19:56:33 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Nov 2012 18:56:33 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> Message-ID: <1352919393.64.0.560405573049.issue16465@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, here are some benchmark results with your patch: ### call_method ### Min: 0.313816 -> 0.305150: 1.03x faster Avg: 0.316292 -> 0.305678: 1.03x faster Significant (t=21.07) Stddev: 0.00188 -> 0.00050: 3.7398x smaller Timeline: http://tinyurl.com/couzwbe ### call_method_unknown ### Min: 0.323125 -> 0.312034: 1.04x faster Avg: 0.325697 -> 0.313115: 1.04x faster Significant (t=17.62) Stddev: 0.00258 -> 0.00099: 2.6059x smaller Timeline: http://tinyurl.com/clwacj3 ### call_simple ### Min: 0.215008 -> 0.220773: 1.03x slower Avg: 0.215666 -> 0.221657: 1.03x slower Significant (t=-23.28) Stddev: 0.00062 -> 0.00078: 1.2721x larger Timeline: http://tinyurl.com/cv6gxft ### fastpickle ### Min: 0.554353 -> 0.569768: 1.03x slower Avg: 0.558192 -> 0.574705: 1.03x slower Significant (t=-6.90) Stddev: 0.00363 -> 0.00393: 1.0829x larger Timeline: http://tinyurl.com/c8s2dqk ### float ### Min: 0.292259 -> 0.279563: 1.05x faster Avg: 0.296011 -> 0.286154: 1.03x faster Significant (t=2.99) Stddev: 0.00417 -> 0.00609: 1.4585x larger Timeline: http://tinyurl.com/c34ofe5 ### iterative_count ### Min: 0.115091 -> 0.118527: 1.03x slower Avg: 0.116174 -> 0.119266: 1.03x slower Significant (t=-6.82) Stddev: 0.00068 -> 0.00075: 1.1148x larger Timeline: http://tinyurl.com/bsmuuso ### json_dump_v2 ### Min: 2.591838 -> 2.652666: 1.02x slower Avg: 2.599335 -> 2.687225: 1.03x slower Significant (t=-8.09) Stddev: 0.00715 -> 0.02322: 3.2450x larger Timeline: http://tinyurl.com/clxutkt ### json_load ### Min: 0.378329 -> 0.370132: 1.02x faster Avg: 0.379840 -> 0.371222: 1.02x faster Significant (t=13.68) Stddev: 0.00112 -> 0.00085: 1.3237x smaller Timeline: http://tinyurl.com/c7ycte2 ### nbody ### Min: 0.259945 -> 0.251294: 1.03x faster Avg: 0.261186 -> 0.251843: 1.04x faster Significant (t=14.95) Stddev: 0.00125 -> 0.00062: 2.0274x smaller Timeline: http://tinyurl.com/cg8z6yg ### nqueens ### Min: 0.295304 -> 0.275767: 1.07x faster Avg: 0.298382 -> 0.278839: 1.07x faster Significant (t=10.19) Stddev: 0.00244 -> 0.00353: 1.4429x larger Timeline: http://tinyurl.com/bo2dn4x ### pathlib ### Min: 0.100494 -> 0.102371: 1.02x slower Avg: 0.101787 -> 0.104876: 1.03x slower Significant (t=-8.15) Stddev: 0.00103 -> 0.00159: 1.5432x larger Timeline: http://tinyurl.com/cb9w79t ### richards ### Min: 0.166939 -> 0.172828: 1.04x slower Avg: 0.167945 -> 0.174199: 1.04x slower Significant (t=-9.65) Stddev: 0.00092 -> 0.00112: 1.2241x larger Timeline: http://tinyurl.com/cdros5x ### silent_logging ### Min: 0.070485 -> 0.066857: 1.05x faster Avg: 0.070538 -> 0.067041: 1.05x faster Significant (t=44.64) Stddev: 0.00003 -> 0.00017: 5.4036x larger Timeline: http://tinyurl.com/buz5h9j ### 2to3 ### 0.490925 -> 0.478927: 1.03x faster ### chameleon ### Min: 0.050694 -> 0.049364: 1.03x faster Avg: 0.051030 -> 0.049759: 1.03x faster Significant (t=8.45) Stddev: 0.00041 -> 0.00041: 1.0036x larger Timeline: b'http://tinyurl.com/d5czdjt' ### mako ### Min: 0.183295 -> 0.177191: 1.03x faster Avg: 0.184944 -> 0.179300: 1.03x faster Significant (t=15.54) Stddev: 0.00119 -> 0.00137: 1.1555x larger Timeline: b'http://tinyurl.com/dx6xrvx' In the end, it's mostly a wash. ---------- priority: high -> normal versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 20:38:07 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 14 Nov 2012 19:38:07 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352921887.44.0.27554750719.issue16418@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree that my extreme, strawman-ish, proposal, was, well, too extreme. Here is a more realistic proposal similar to David's. if isinstance(choices, range) and len(choices) > 50: choice_txt = range_rep(choices) # details to be determined try: choice_txt = except TypeError: # because choices not iterable choice_txt = repr(choices) # can be anything for custom class Then display help or error message. If someone passes a non-(x)range iterable with 1000s of choices, I am willing to say they deserve what they asked for, once that the docs make clearer that such collections will be displayed in full. Any iterable container too large to display in full can be wrapped as a non-iterable container. ('Container' means that 'in' works.) class NonIterableContainer: def __init__(self, container, description): self.container = container self.description = description def __repr__(self): return self.description def __contains__(self, item): return item in self.container The description could point one to a file or doc that has an explicit list. If such a listing enumerates the items, the program arg could instead be an int in the appropriate range. Then the program would look up the actual arg. Ranges *are* special because items from any finite enumerated collection can be replaced, for input, by the corresponding int in the enumerated range. They are therefore worth special attention in help and error displays. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 20:44:33 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 14 Nov 2012 19:44:33 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> Message-ID: <1352922273.12.0.984848816873.issue16465@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Antoine, I would consider this a performance regression to solve for 3.3.1. Small dictionary creation is everywhere in CPython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 20:50:16 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 14 Nov 2012 19:50:16 +0000 Subject: [issue16468] argparse only supports iterable choices In-Reply-To: <1352867539.71.0.970228461518.issue16468@psf.upfronthosting.co.za> Message-ID: <1352922616.45.0.561546870252.issue16468@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If the assumption of iterability is in more than just the help and error messages, then I can see the point of calling this an enhancement. I suspect that now, if a custom subset of ints or strings is the actual domain, people just skip choices and add custom checks after argparse processing. I am curious what Steven thinks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 20:50:35 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 14 Nov 2012 19:50:35 +0000 Subject: [issue16418] argparse with many choices can generate absurdly long usage message In-Reply-To: <1352157111.52.0.432994430995.issue16418@psf.upfronthosting.co.za> Message-ID: <1352922635.89.0.860199129422.issue16418@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I see that in #16468, Chris proposes that existing versions should let the TypeError propagate, possibly with an improved error message, and call the use of repr for non-iterables a new feature (partly on the basis that more fixes than this are needed to use them). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 21:13:21 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Nov 2012 20:13:21 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352922273.12.0.984848816873.issue16465@psf.upfronthosting.co.za> Message-ID: <1352923957.3335.2.camel@localhost.localdomain> Antoine Pitrou added the comment: > Antoine, I would consider this a performance regression to solve for > 3.3.1. Small dictionary creation is everywhere in CPython. Again, feel free to provide real-world benchmark numbers proving the regression. I've already posted some figures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 21:22:01 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 14 Nov 2012 20:22:01 +0000 Subject: [issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE In-Reply-To: <1352688567.58.0.199976634188.issue16458@psf.upfronthosting.co.za> Message-ID: <1352924521.88.0.0586120911491.issue16458@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Sorry I can't help on the windows side of things. I don't have access to any windows systems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 21:32:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 14 Nov 2012 20:32:49 +0000 Subject: [issue16400] update default PyPI behavior in docs re: listing versions In-Reply-To: <1352023055.39.0.262942434831.issue16400@psf.upfronthosting.co.za> Message-ID: <3Y1y7h6gHbzRYD@mail.python.org> Roundup Robot added the comment: New changeset 2d266ce80712 by Chris Jerdonek in branch '3.2': Update the description of which package versions PyPI displays (issue #16400). http://hg.python.org/cpython/rev/2d266ce80712 New changeset ec037316a445 by Chris Jerdonek in branch '3.3': Merge from 3.2: update the PyPI docs regarding listing versions (issue #16400). http://hg.python.org/cpython/rev/ec037316a445 New changeset e4175daac740 by Chris Jerdonek in branch 'default': Merge from 3.3: update the PyPI docs regarding listing versions (issue #16400). http://hg.python.org/cpython/rev/e4175daac740 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 21:39:07 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 14 Nov 2012 20:39:07 +0000 Subject: [issue16400] update default PyPI behavior in docs re: listing versions In-Reply-To: <1352023055.39.0.262942434831.issue16400@psf.upfronthosting.co.za> Message-ID: <3Y1yGy3dL7zRYb@mail.python.org> Roundup Robot added the comment: New changeset 7db2a27c07be by Chris Jerdonek in branch '2.7': Backport from 3.2: update PyPI docs regarding listing versions (issue #16400). http://hg.python.org/cpython/rev/7db2a27c07be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 21:44:29 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 14 Nov 2012 20:44:29 +0000 Subject: [issue16400] update default PyPI behavior in docs re: listing versions In-Reply-To: <1352023055.39.0.262942434831.issue16400@psf.upfronthosting.co.za> Message-ID: <1352925869.91.0.617446978678.issue16400@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 21:48:07 2012 From: report at bugs.python.org (Piotr Dobrogost) Date: Wed, 14 Nov 2012 20:48:07 +0000 Subject: [issue16312] New command line option supported by unittest.main() for running initialization code before tests In-Reply-To: <1351108715.95.0.725545714985.issue16312@psf.upfronthosting.co.za> Message-ID: <1352926087.83.0.85064824789.issue16312@psf.upfronthosting.co.za> Piotr Dobrogost added the comment: > But I think Piotr's use case is when you download some new library (...) Yes, indeed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 21:52:09 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 14 Nov 2012 20:52:09 +0000 Subject: [issue10966] eliminate use of ImportError implicitly representing SkipTest In-Reply-To: <1295566830.75.0.786153857799.issue10966@psf.upfronthosting.co.za> Message-ID: <1352926329.68.0.725798440439.issue10966@psf.upfronthosting.co.za> Brett Cannon added the comment: Here is a new patch which removes the expected skips stuff and adds a required_on argument to test.support.import_module() for those cases where missing a module is an error (in the patch it's _winreg on Windows). If people are fine with this cleanup then the question is whether there are other tests that should be required to exist on certain platforms. E.g. should test_epoll and test_kqueue be required on Linux and BSD, respectively? Any other modules people can think of that should be required on a specific platform? If not then perhaps required_on doesn't need to be an iterable or the whole argument is pointless because there are so few use-cases there is no point in adding the support. I will improve the message as to why a test was failed in a separate patch since regrtest is messy and it's going to take some work. ---------- Added file: http://bugs.python.org/file27984/remove_unexpected_skips.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 22:21:14 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 14 Nov 2012 21:21:14 +0000 Subject: [issue992389] attribute error due to circular import Message-ID: <1352928074.18.0.517633089953.issue992389@psf.upfronthosting.co.za> Richard Oudkerk added the comment: In Torsten's example from . import moduleX can be replaced with moduleX = importlib.import_module('.moduleX', __package__) (*) or moduleX = importlib.import_module('package.moduleX') If that is not pretty enough then perhaps the new syntax import .moduleX could be introduced and made equivalent to (*). ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 22:22:06 2012 From: report at bugs.python.org (=?utf-8?q?Alejandro_Javier_Peralta_Fr=C3=ADas?=) Date: Wed, 14 Nov 2012 21:22:06 +0000 Subject: [issue16473] Minor difference in decoding quoted-printable text Message-ID: <1352928126.09.0.115783436578.issue16473@psf.upfronthosting.co.za> New submission from Alejandro Javier Peralta Fr?as: New to python-dev; I grab a beginner tasks "increase test coverage" and I decided to add coverage to this bit of code in the quopri module: # quopri.py L138 while n > 0 and line[n-1:n] in b" \t\r": L139 n = n-1 As far as I understand to get into that while-loop the line to decode should end in " \t\r\n". So the I added the following test: def test_decodestring_badly_enconded(self): e = b"hello \t\r\n" p = b"hello\n" s = self.module.decodestring(e) self.assertEqual(s, p) but that only passes when the module doesn't use binascii. In fact I change test_quopri to use support.import_fresh_module to disable binascii and removed a decorator that was used. The decode text when binascci is used is: >>> quopri.decodestring("hello \t\r\n") 'hello \t\r\n' which differs from >>> quopri.a2b_qp = None >>> quopri.b2a_qp = None >>> quopri.decodestring("hello \t\r\n") 'hello\n And what's the deal with: >>> import quopri >>> quopri.encodestring("hello \t\r") 'hello \t\r' >>> "hello \t\r".encode("quopri") 'hello=20=09\r' ---------- components: Tests files: test_quopri.diff keywords: patch messages: 175593 nosy: aleperalta priority: normal severity: normal status: open title: Minor difference in decoding quoted-printable text versions: Python 3.3 Added file: http://bugs.python.org/file27985/test_quopri.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 22:22:57 2012 From: report at bugs.python.org (=?utf-8?q?Alejandro_Javier_Peralta_Fr=C3=ADas?=) Date: Wed, 14 Nov 2012 21:22:57 +0000 Subject: [issue16473] Minor difference in decoding quoted-printable text In-Reply-To: <1352928126.09.0.115783436578.issue16473@psf.upfronthosting.co.za> Message-ID: <1352928177.92.0.682705001658.issue16473@psf.upfronthosting.co.za> Changes by Alejandro Javier Peralta Fr?as : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 22:32:36 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 14 Nov 2012 21:32:36 +0000 Subject: [issue16473] Minor difference in decoding quoted-printable text In-Reply-To: <1352928126.09.0.115783436578.issue16473@psf.upfronthosting.co.za> Message-ID: <1352928756.4.0.499762255052.issue16473@psf.upfronthosting.co.za> R. David Murray added the comment: I think I can answer your last question. There are two quopri algorithms, one where spaces are allowed (message body) and one where they aren't (email headers). For the rest, I'd have to take a closer look than I have time for right now. ---------- components: +email nosy: +barry, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 22:35:10 2012 From: report at bugs.python.org (=?utf-8?q?Alejandro_Javier_Peralta_Fr=C3=ADas?=) Date: Wed, 14 Nov 2012 21:35:10 +0000 Subject: [issue16473] Minor difference in decoding quoted-printable text In-Reply-To: <1352928756.4.0.499762255052.issue16473@psf.upfronthosting.co.za> Message-ID: Alejandro Javier Peralta Fr?as added the comment: I think I can answer your last question. There are two quopri algorithms, > one where spaces are allowed (message body) and one where they aren't > (email headers). > > OK, thank you. Good to know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 23:00:37 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 14 Nov 2012 22:00:37 +0000 Subject: [issue16473] Minor difference in decoding quoted-printable text In-Reply-To: <1352928126.09.0.115783436578.issue16473@psf.upfronthosting.co.za> Message-ID: <1352930437.76.0.609877989854.issue16473@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 14 23:45:45 2012 From: report at bugs.python.org (Ned Batchelder) Date: Wed, 14 Nov 2012 22:45:45 +0000 Subject: [issue7083] locals() behaviour differs when tracing is in effect In-Reply-To: <1255009798.45.0.553728595296.issue7083@psf.upfronthosting.co.za> Message-ID: <1352933145.62.0.571903947857.issue7083@psf.upfronthosting.co.za> Ned Batchelder added the comment: I wrote about this here: http://nedbatchelder.com/blog/201211/tricky_locals.html A reader suggested this addition to the docs, which I like: "Multiple invocations within the scope update and return the same dictionary instance. When a trace function is in effect, this dictionary is updated after every statement." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 01:14:30 2012 From: report at bugs.python.org (alejandro david weil) Date: Thu, 15 Nov 2012 00:14:30 +0000 Subject: [issue16474] More code coverage for imp module Message-ID: <1352938470.43.0.179582544246.issue16474@psf.upfronthosting.co.za> New submission from alejandro david weil: Add some 5% more code-coverage for imp module in tests. ---------- components: Tests files: imp_test_patch.diff keywords: patch messages: 175597 nosy: brett.cannon, tenuki priority: normal severity: normal status: open title: More code coverage for imp module versions: Python 3.3 Added file: http://bugs.python.org/file27986/imp_test_patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 02:14:18 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 15 Nov 2012 01:14:18 +0000 Subject: [issue16474] More code coverage for imp module In-Reply-To: <1352938470.43.0.179582544246.issue16474@psf.upfronthosting.co.za> Message-ID: <1352942058.52.0.054543416164.issue16474@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Not sure increasing test coverage would be tolerated in 3.3.1. I would be +1 to it. ---------- nosy: +jcea versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 05:45:35 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 15 Nov 2012 04:45:35 +0000 Subject: [issue16472] Distutils+mingw links agains msvcr90, while python27.dll is linked agains msvcrt In-Reply-To: <1352900041.91.0.554679168644.issue16472@psf.upfronthosting.co.za> Message-ID: <1352954735.47.0.0467770390492.issue16472@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +brian.curtin, loewis, mhammond, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 05:52:14 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 15 Nov 2012 04:52:14 +0000 Subject: [issue16470] Backport set and dictionary comprehensions in tutorial to 2.7 In-Reply-To: <1352879017.7.0.397020464451.issue16470@psf.upfronthosting.co.za> Message-ID: <1352955134.54.0.943920073256.issue16470@psf.upfronthosting.co.za> ?ric Araujo added the comment: Good idea. Could you add a note that this is new in 2.7? (Either using versionadded Sphinx directives or just remarks in plain English, not sure which one would be best.) ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 07:10:44 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 15 Nov 2012 06:10:44 +0000 Subject: [issue16470] Backport set and dictionary comprehensions in tutorial to 2.7 In-Reply-To: <1352879017.7.0.397020464451.issue16470@psf.upfronthosting.co.za> Message-ID: <1352959844.59.0.0591163531405.issue16470@psf.upfronthosting.co.za> Georg Brandl added the comment: We don't use versionadded/changed directives in the tutorial. (There was only one until 2 minutes ago, which was misplaced in any case.) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 08:35:31 2012 From: report at bugs.python.org (Eric Snow) Date: Thu, 15 Nov 2012 07:35:31 +0000 Subject: [issue16474] More code coverage for imp module In-Reply-To: <1352938470.43.0.179582544246.issue16474@psf.upfronthosting.co.za> Message-ID: <1352964931.46.0.483677326631.issue16474@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 09:02:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 15 Nov 2012 08:02:49 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1352966569.72.0.372945782754.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: testing the new version of irker ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 09:05:37 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 15 Nov 2012 08:05:37 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1352966737.02.0.492417237311.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: another test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 09:54:39 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 15 Nov 2012 08:54:39 +0000 Subject: [issue16475] Support object instancing and recursion in marshal Message-ID: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson: The format used by the marshal module does not support instancing. This precludes certain data optimizations, such as sharing string constants, common tuples, even common code objects. Since the marshal format is used to write compiled code, this makes it impossible to do data optimization on code prior to writing it out. This patch adds proper instancing support for all the supported types and increases the default version to three. (A separate defect/regression is that interned strings are no longer preserved as was implemented in version 1 of the original 2.x branch. This also negates any interning done at compile time. That is a separate defect.) ---------- components: Interpreter Core files: marshalinstance.patch keywords: patch messages: 175603 nosy: kristjan.jonsson priority: normal severity: normal status: open title: Support object instancing and recursion in marshal type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27987/marshalinstance.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 10:06:41 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 15 Nov 2012 09:06:41 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1352970401.06.0.365104633032.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 10:30:55 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 15 Nov 2012 09:30:55 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1352971855.95.0.937690887119.issue16469@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I think consistent behavior between int() and Fraction() is valuable. Agreed. If no-one objects I'll fix the Decimal -> Fraction and float -> Fraction conversions to match what Decimal -> int and float -> int currently do (ValueError and OverflowError). Then we can open a new issue to discuss having infinities give ValueError versus OverflowError for all four cases of {float, Decimal} -> {int, Fraction}. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 11:37:36 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 15 Nov 2012 10:37:36 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1352975856.37.0.0272324565798.issue16475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Second patch which adds the missing internment support for strings, including unittests. ---------- Added file: http://bugs.python.org/file27988/marshalinstance.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 12:15:36 2012 From: report at bugs.python.org (Leo Liu) Date: Thu, 15 Nov 2012 11:15:36 +0000 Subject: [issue16476] Trailing spaces in pretty-printed JSON Message-ID: <1352978136.54.0.595211017134.issue16476@psf.upfronthosting.co.za> New submission from Leo Liu: python -mjson.tool some_file.json > x.json x.json will have trailing white spaces. Also reported here: http://thread.gmane.org/gmane.comp.python.devel/135311 ---------- messages: 175607 nosy: leoliu priority: normal severity: normal status: open title: Trailing spaces in pretty-printed JSON type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 12:25:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 15 Nov 2012 11:25:35 +0000 Subject: [issue16476] Trailing spaces in pretty-printed JSON In-Reply-To: <1352978136.54.0.595211017134.issue16476@psf.upfronthosting.co.za> Message-ID: <1352978735.53.0.240533565351.issue16476@psf.upfronthosting.co.za> Ezio Melotti added the comment: This is a duplicate of #16333. ---------- nosy: +ezio.melotti resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Trailing whitespace in json dump when using indent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 12:42:38 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 15 Nov 2012 11:42:38 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1352979758.32.0.984049327169.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 12:52:56 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 15 Nov 2012 11:52:56 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1352980376.03.0.285199601307.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: another test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 12:54:06 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 15 Nov 2012 11:54:06 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1352980446.66.0.413590018284.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: another test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 12:56:03 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 15 Nov 2012 11:56:03 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1352980563.32.0.256916981826.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 12:56:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 15 Nov 2012 11:56:55 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1352980615.34.0.556997158479.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: another test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 13:04:15 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 15 Nov 2012 12:04:15 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1352981055.67.0.382203677497.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: final test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 13:07:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 15 Nov 2012 12:07:28 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> Message-ID: <1352981248.14.0.0876333017789.issue16465@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > In the end, it's mostly a wash. Yes, it's predictable. The gain is too small and undistinguished on a background of random noise. May be more long-running benchmark will show more reliable results, but in any case, the gain is small. My long-running hard-optimized simulation is about 5% faster on 3.2 or patched 3.4 comparing to 3.3. But this is not a typical program. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 13:49:47 2012 From: report at bugs.python.org (Sam Thursfield) Date: Thu, 15 Nov 2012 12:49:47 +0000 Subject: [issue16477] tarfile fails to close file handles in case of exception Message-ID: <1352983787.27.0.404679122442.issue16477@psf.upfronthosting.co.za> New submission from Sam Thursfield: Exceptions such as disk full during extraction cause tarfile to leak file handles. Besides being messy, it causes real problems if, for example, the target file is on a mount that should be unmounted before the program exits - in this case, the unmount will fail as there are still open file handles. Simplest solution I can see is to change: def makefile(self, tarinfo, targetpath): """Make a file called targetpath. """ source = self.extractfile(tarinfo) target = bltn_open(targetpath, "wb") copyfileobj(source, target) source.close() target.close() to this: def makefile(self, tarinfo, targetpath): """Make a file called targetpath. """ source = self.extractfile(tarinfo) try: with open(targetpath, "wb") as target: shutil.copyfileobj(source, target) finally: source.close() ---------- components: Library (Lib) messages: 175616 nosy: ssam priority: normal severity: normal status: open title: tarfile fails to close file handles in case of exception type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 13:53:31 2012 From: report at bugs.python.org (Sam Thursfield) Date: Thu, 15 Nov 2012 12:53:31 +0000 Subject: [issue16477] tarfile fails to close file handles in case of exception In-Reply-To: <1352983787.27.0.404679122442.issue16477@psf.upfronthosting.co.za> Message-ID: <1352984011.63.0.250325774851.issue16477@psf.upfronthosting.co.za> Sam Thursfield added the comment: sorry, replace 'open' with 'bltn_open' in the above comment - no need to change it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 15:26:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 15 Nov 2012 14:26:54 +0000 Subject: [issue16477] tarfile fails to close file handles in case of exception In-Reply-To: <1352983787.27.0.404679122442.issue16477@psf.upfronthosting.co.za> Message-ID: <1352989614.93.0.945500919248.issue16477@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Issue16408 is similar issue for zipfile. ---------- keywords: +easy nosy: +lars.gustaebel, serhiy.storchaka stage: -> needs patch type: behavior -> resource usage versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 15:28:07 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 15 Nov 2012 14:28:07 +0000 Subject: [issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers In-Reply-To: <1351896425.99.0.911168182655.issue16391@psf.upfronthosting.co.za> Message-ID: <1352989687.89.0.917782879445.issue16391@psf.upfronthosting.co.za> Vinay Sajip added the comment: I've added the ability to set handler properties via configuration slightly more easily, see the code in changeset a81ae412174a (the unit test shows how the configuration looks in practice). This enhancement cannot be added to earlier Python versions (no feature additions are allowed on point releases), but will be present in Python 3.4 onwards. ---------- versions: -Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 15:38:17 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 14:38:17 +0000 Subject: [issue16144] misleading sentence in reference/import In-Reply-To: <1349459459.97.0.290795741864.issue16144@psf.upfronthosting.co.za> Message-ID: <1352990297.98.0.301178563023.issue16144@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed in a8ca14983ab1 and 9961a0dafcc7. Thanks, Manuel. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 15:38:38 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 14:38:38 +0000 Subject: [issue16144] misleading sentence in reference/import In-Reply-To: <1349459459.97.0.290795741864.issue16144@psf.upfronthosting.co.za> Message-ID: <1352990318.28.0.0419710489969.issue16144@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 16:29:11 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 15:29:11 +0000 Subject: [issue16470] Backport set and dictionary comprehensions in tutorial to 2.7 In-Reply-To: <1352879017.7.0.397020464451.issue16470@psf.upfronthosting.co.za> Message-ID: <1352993351.47.0.188346152484.issue16470@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 16:35:24 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 15:35:24 +0000 Subject: [issue16386] imp.find_module does not specify registry key it searches on windows In-Reply-To: <1351859767.89.0.815277454803.issue16386@psf.upfronthosting.co.za> Message-ID: <1352993724.69.0.656870904645.issue16386@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I think much more important to mention registry key in http://docs.python.org/3/library/importlib.html#importlib.machinery.WindowsRegistryFinder ``imp`` is private module to access implementation internals but ``importlib`` is public interface to import system ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 16:39:34 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 15:39:34 +0000 Subject: [issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers In-Reply-To: <1351896425.99.0.911168182655.issue16391@psf.upfronthosting.co.za> Message-ID: <1352993974.44.0.797907635994.issue16391@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 16:39:53 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 15:39:53 +0000 Subject: [issue16392] import crashes on circular imports in ext modules In-Reply-To: <1351946554.54.0.101006341814.issue16392@psf.upfronthosting.co.za> Message-ID: <1352993993.16.0.527087794498.issue16392@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 16:46:01 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 15:46:01 +0000 Subject: [issue16404] Uses of PyLong_FromLong that don't check for errors In-Reply-To: <1352041027.23.0.922968343734.issue16404@psf.upfronthosting.co.za> Message-ID: <1352994361.44.0.0817175642341.issue16404@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 16:46:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 15 Nov 2012 15:46:58 +0000 Subject: [issue16478] Fix division in tabnanny Message-ID: <1352994418.48.0.449467913759.issue16478@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Tabnanny should use floor division in calculation, the comment says about this. But in the current Python 3 code "/" was not changed to "//". ---------- components: Demos and Tools, Library (Lib) files: tabnanny_div.patch keywords: easy, patch messages: 175622 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Fix division in tabnanny type: behavior versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27989/tabnanny_div.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 16:48:34 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 15:48:34 +0000 Subject: [issue16422] Decimal constants should be the same for py & c module versions In-Reply-To: <1352243072.7.0.172202427654.issue16422@psf.upfronthosting.co.za> Message-ID: <1352994514.95.0.806632891587.issue16422@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 16:51:27 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 15:51:27 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1352994687.12.0.329187831153.issue16427@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 16:52:03 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 15:52:03 +0000 Subject: [issue16429] Emit SyntaxWarning for code that risks UnboundLocalError In-Reply-To: <1352300366.42.0.384864300614.issue16429@psf.upfronthosting.co.za> Message-ID: <1352994723.51.0.242761814228.issue16429@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 16:52:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 15:52:19 +0000 Subject: [issue16434] SocketServer call shutdown in the wrong way In-Reply-To: <1352377990.43.0.148428023395.issue16434@psf.upfronthosting.co.za> Message-ID: <1352994739.84.0.320285680746.issue16434@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 16:53:18 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 15:53:18 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1352994798.72.0.248557509284.issue16444@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 16:53:42 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 15:53:42 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <1352994822.48.0.236005864861.issue16447@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 16:54:01 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 15:54:01 +0000 Subject: [issue16446] pdb raises BdbQuit on 'quit' when started with set_trace In-Reply-To: <1352416193.43.0.475440625813.issue16446@psf.upfronthosting.co.za> Message-ID: <1352994841.16.0.868567991881.issue16446@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 17:29:20 2012 From: report at bugs.python.org (Stephen) Date: Thu, 15 Nov 2012 16:29:20 +0000 Subject: [issue16479] Can't install Python 3 on Redhat Linux, make failed Message-ID: <1352996960.31.0.378819423594.issue16479@psf.upfronthosting.co.za> New submission from Stephen: Machine is Redhat Linux 6.2. Tried to install Python3.3 build failed in the make step. ----------------------- [sliu at wtl-build-1 Python-3.3.0]$ uname -a Linux wtl-build-1 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux [sliu at wtl-build-1 Python-3.3.0]$ pwd /tmp/Python-3.3.0 [snip] config.status: pyconfig.h is unchanged creating Modules/Setup creating Modules/Setup.local creating Makefile [sliu at wtl-build-1 Python-3.3.0]$ make Wrapping make for user sliu on hostname wtl-build-1... gcc: Parser/acceler.o: No such file or directory gcc: Parser/grammar1.o: No such file or directory gcc: Parser/listnode.o: No such file or directory gcc: Parser/node.o: No such file or directory gcc: Parser/parser.o: No such file or directory gcc: Parser/bitset.o: No such file or directory gcc: Parser/metagrammar.o: No such file or directory gcc: Parser/firstsets.o: No such file or directory gcc: Parser/grammar.o: No such file or directory gcc: Parser/pgen.o: No such file or directory gcc: Objects/obmalloc.o: No such file or directory gcc: Python/dynamic_annotations.o: No such file or directory gcc: Python/mysnprintf.o: No such file or directory gcc: Python/pyctype.o: No such file or directory gcc: Parser/tokenizer_pgen.o: No such file or directory gcc: Parser/printgrammar.o: No such file or directory gcc: Parser/parsetok_pgen.o: No such file or directory gcc: Parser/pgenmain.o: No such file or directory make[1]: *** [Parser/pgen] Error 1 make: *** [Include/graminit.h] Error 2 Build with args "" took 0 seconds, status complete [sliu at wtl-build-1 Python-3.3.0]$ ----------------------- Tried different Linux machines, same error. Tried Python 3.3, 3.1 and 3.0, same error. Any idea? Stephen ---------- components: Installation messages: 175623 nosy: stephenlqn at gmail.com priority: normal severity: normal status: open title: Can't install Python 3 on Redhat Linux, make failed type: compile error versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 17:34:07 2012 From: report at bugs.python.org (Stephen) Date: Thu, 15 Nov 2012 16:34:07 +0000 Subject: [issue16479] Can't install Python 3 on Redhat Linux, make failed In-Reply-To: <1352996960.31.0.378819423594.issue16479@psf.upfronthosting.co.za> Message-ID: <1352997247.43.0.545925698273.issue16479@psf.upfronthosting.co.za> Stephen added the comment: Sorry, missed the configure command in the previous message. It should have been: ----------------------- [sliu at wtl-build-1 Python-3.3.0]$ uname -a Linux wtl-build-1 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux [sliu at wtl-build-1 Python-3.3.0]$ pwd /tmp/Python-3.3.0 [sliu at wtl-build-1 Python-3.3.0]$ ./configure checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for --enable-universalsdk... no checking for --with-universal-archs... 32-bit checking MACHDEP... linux checking for --without-gcc... no checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for --with-cxx-main=... no checking for g++... no configure: WARNING: By default, distutils will build C++ extension modules with "g++". If this is not intended, then set CXX on the configure command line. checking for -Wl,--no-as-needed... yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E [snip] config.status: pyconfig.h is unchanged creating Modules/Setup creating Modules/Setup.local creating Makefile [sliu at wtl-build-1 Python-3.3.0]$ make Wrapping make for user sliu on hostname wtl-build-1... gcc: Parser/acceler.o: No such file or directory gcc: Parser/grammar1.o: No such file or directory gcc: Parser/listnode.o: No such file or directory gcc: Parser/node.o: No such file or directory gcc: Parser/parser.o: No such file or directory gcc: Parser/bitset.o: No such file or directory gcc: Parser/metagrammar.o: No such file or directory gcc: Parser/firstsets.o: No such file or directory gcc: Parser/grammar.o: No such file or directory gcc: Parser/pgen.o: No such file or directory gcc: Objects/obmalloc.o: No such file or directory gcc: Python/dynamic_annotations.o: No such file or directory gcc: Python/mysnprintf.o: No such file or directory gcc: Python/pyctype.o: No such file or directory gcc: Parser/tokenizer_pgen.o: No such file or directory gcc: Parser/printgrammar.o: No such file or directory gcc: Parser/parsetok_pgen.o: No such file or directory gcc: Parser/pgenmain.o: No such file or directory make[1]: *** [Parser/pgen] Error 1 make: *** [Include/graminit.h] Error 2 Build with args "" took 0 seconds, status complete [sliu at wtl-build-1 Python-3.3.0]$ ----------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 17:42:11 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Thu, 15 Nov 2012 16:42:11 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1352997731.47.0.238532954174.issue16469@psf.upfronthosting.co.za> Alexey Kachayev added the comment: Patch is attached for {float, Decimal} -> {int, Fraction} consistency (with ValueError and OverflowError). Test cases are changed as well. I can also change OverflowError to ValueError for all cases, but I'm not sure should I open for this separated issue or continue to work with this one. ---------- keywords: +patch nosy: +kachayev Added file: http://bugs.python.org/file27990/issue16469.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 17:55:28 2012 From: report at bugs.python.org (Marco Amadori) Date: Thu, 15 Nov 2012 16:55:28 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} Message-ID: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> New submission from Marco Amadori: The solution to work around the bug is there: http://ipoveraviancarriers.blogspot.it/2012/11/python-33-and-pyvenv-hackish-solution.html But probably pyvenv should be patched in order to create symlinks. Thanks! ---------- components: None messages: 175626 nosy: Marco.Amadori priority: normal severity: normal status: open title: pyvenv 3.3 fails to create symlinks for /local/{bin,lib} to /{bin,lib} type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 18:00:43 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 15 Nov 2012 17:00:43 +0000 Subject: [issue15783] decimal.localcontext(None) fails when using the C accelerator module In-Reply-To: <1345904683.65.0.863127291798.issue15783@psf.upfronthosting.co.za> Message-ID: <1352998843.5.0.906580938841.issue15783@psf.upfronthosting.co.za> Stefan Krah added the comment: Should we go ahead with this? If so, then I think it only makes sense to change *all* undocumented cases of None default args. Here's a case that used rounding=None in quantize(): https://bitbucket.org/simplecodes/wtforms/issue/117/test-failure-with-python-33 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 18:03:00 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 15 Nov 2012 17:03:00 +0000 Subject: [issue15783] decimal.localcontext(None) fails when using the C accelerator module In-Reply-To: <1345904683.65.0.863127291798.issue15783@psf.upfronthosting.co.za> Message-ID: <1352998980.51.0.563468858603.issue15783@psf.upfronthosting.co.za> Stefan Krah added the comment: By "all cases" I mean the ones listed in msg169144, not the Number methods. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 18:10:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 15 Nov 2012 17:10:39 +0000 Subject: [issue16446] pdb raises BdbQuit on 'quit' when started with set_trace In-Reply-To: <1352416193.43.0.475440625813.issue16446@psf.upfronthosting.co.za> Message-ID: <1352999439.66.0.767379326084.issue16446@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 18:44:09 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 15 Nov 2012 17:44:09 +0000 Subject: [issue16481] process handle leak on windows in multiprocessing Message-ID: <1353001449.15.0.429236544802.issue16481@psf.upfronthosting.co.za> New submission from Richard Oudkerk: On Windows the handle for a child process is not closed when the popen/process object is garbage collected. ---------- messages: 175629 nosy: sbt priority: normal severity: normal stage: needs patch status: open title: process handle leak on windows in multiprocessing type: resource usage versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 18:55:25 2012 From: report at bugs.python.org (A Kaptur) Date: Thu, 15 Nov 2012 17:55:25 +0000 Subject: [issue16482] pdb.set_trace() clobbering traceback on error Message-ID: <1353002125.56.0.265106335805.issue16482@psf.upfronthosting.co.za> New submission from A Kaptur: pdb.set_trace() is overwriting the actual traceback when exiting with an error. See minimal recreation here: https://gist.github.com/4079971 ---------- messages: 175630 nosy: akaptur priority: normal severity: normal status: open title: pdb.set_trace() clobbering traceback on error type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 19:10:56 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 15 Nov 2012 18:10:56 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1353003056.14.0.416190897319.issue16469@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 19:23:37 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Thu, 15 Nov 2012 18:23:37 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1353003817.13.0.212249362674.issue16469@psf.upfronthosting.co.za> Alexey Kachayev added the comment: I also attached "full_issue" patch: change OverflowError to ValueError for all cases. ---------- Added file: http://bugs.python.org/file27991/full_issues16469.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 19:33:46 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 15 Nov 2012 18:33:46 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353004426.02.0.490788405108.issue16475@psf.upfronthosting.co.za> Antoine Pitrou added the comment: marshal is only supposed to be used to serialize code objects, not arbitrary user data. Why don't you use pickle? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 19:47:35 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Thu, 15 Nov 2012 18:47:35 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1353005255.96.0.719630164684.issue16469@psf.upfronthosting.co.za> Changes by Alexey Kachayev : Added file: http://bugs.python.org/file27992/full_issues16469_fixed.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 20:40:48 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 15 Nov 2012 19:40:48 +0000 Subject: [issue12908] Update dev-in-a-box for new coverage steps In-Reply-To: <1315284663.33.0.542797190768.issue12908@psf.upfronthosting.co.za> Message-ID: <1353008448.61.0.94648166365.issue12908@psf.upfronthosting.co.za> Brett Cannon added the comment: Fixed in various commits. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 20:42:44 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Nov 2012 19:42:44 +0000 Subject: [issue16434] SocketServer call shutdown in the wrong way In-Reply-To: <1352377990.43.0.148428023395.issue16434@psf.upfronthosting.co.za> Message-ID: <1353008564.28.0.866243347583.issue16434@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 20:57:00 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 15 Nov 2012 19:57:00 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1353009420.26.0.66493143858.issue15031@psf.upfronthosting.co.za> Brett Cannon added the comment: Here is my current plan:: parse_bytecode_file(data, source_stats, source_path) -> code This will take in the bytes from the bytecode file and a stats dict from SourceLoader.path_stats(). The method will parse the bytecode file, verify the magic number, timestamp, and file size. If all of that passes, then the bytecode will be compiled into a code object (with its source path fixed if necessary based on source_path) and returned. All arguments are required as you should explicitly state you want to skip sanity checks of the bytecode and that you don't want to fix the file path. ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 20:57:27 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 15 Nov 2012 19:57:27 +0000 Subject: [issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object In-Reply-To: <1344732276.83.0.543554641885.issue15627@psf.upfronthosting.co.za> Message-ID: <1353009447.63.0.74165882855.issue15627@psf.upfronthosting.co.za> Brett Cannon added the comment: Might name this compile_source() instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 20:58:08 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 15 Nov 2012 19:58:08 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1353009488.48.0.505885427162.issue15031@psf.upfronthosting.co.za> Brett Cannon added the comment: Might name it compile_bytecode_file() instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 21:29:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 15 Nov 2012 20:29:14 +0000 Subject: [issue16281] TODO in tailmatch(): it does not support backward in all cases In-Reply-To: <1350607883.61.0.918476063498.issue16281@psf.upfronthosting.co.za> Message-ID: <1353011354.09.0.459062912841.issue16281@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Interpreter Core stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 21:31:01 2012 From: report at bugs.python.org (Tim Golden) Date: Thu, 15 Nov 2012 20:31:01 +0000 Subject: [issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE In-Reply-To: <1352688567.58.0.199976634188.issue16458@psf.upfronthosting.co.za> Message-ID: <1353011461.19.0.785508300894.issue16458@psf.upfronthosting.co.za> Tim Golden added the comment: Karthk, if you can run up an up-to-date patch and a test I'm willing to review and commit it, otherwise this one will lie quiet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 21:40:27 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 15 Nov 2012 20:40:27 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1353012027.12.0.428229499215.issue15767@psf.upfronthosting.co.za> Brett Cannon added the comment: Should it be ModuleNotFoundError or ModuleNotFound? It's not necessarily an error if a module doesn't exist, so failing to find it isn't quite that negative. It also acts somewhat like StopIteration/GeneratorExit which also don't have the common "Error" suffix of exception names. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 21:40:42 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 15 Nov 2012 20:40:42 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1353012042.32.0.828706822962.issue16469@psf.upfronthosting.co.za> Mark Dickinson added the comment: The first patch looks great (modulo a stray extra line in test_int). Thank you! Let's just apply that for now; I'll open a new issue for the suggested OverflowError / ValueError switch. (Getting rid of the TypeError seems a clear win to me; switching the OverflowError to ValueError may be more controversial.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 21:40:47 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 15 Nov 2012 20:40:47 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1353012047.03.0.0598672277109.issue15767@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: needs patch -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 22:01:50 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 15 Nov 2012 21:01:50 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1353013310.52.0.168303244601.issue16469@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in http://hg.python.org/cpython/rev/a2b54b6d9759. Thanks for the report and patch. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 22:03:58 2012 From: report at bugs.python.org (Nikolay Bryskin) Date: Thu, 15 Nov 2012 21:03:58 +0000 Subject: [issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers In-Reply-To: <1351896425.99.0.911168182655.issue16391@psf.upfronthosting.co.za> Message-ID: <1353013438.77.0.264871969369.issue16391@psf.upfronthosting.co.za> Nikolay Bryskin added the comment: Great, thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 22:17:12 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 15 Nov 2012 21:17:12 +0000 Subject: [issue16483] Make int(float('inf')) raise ValueError rather than OverflowError. Message-ID: <1353014232.58.0.902552345028.issue16483@psf.upfronthosting.co.za> New submission from Mark Dickinson: [Broken out of the issue 16469 discussion about infinity -> Fraction and nan -> Fraction conversions.] Conversions from float('inf') or Decimal('inf') to int (or Fraction) currently generate an OverflowError, while conversions from nan give a ValueError. I'm of the opinion that it would make more sense for both conversions to generate ValueError, and I'm opening this issue to track discussion for that. There's also a reasonable case that the behaviour is fine as it is, and there's little to be gained by changing it. ---------- messages: 175642 nosy: mark.dickinson priority: normal severity: normal status: open title: Make int(float('inf')) raise ValueError rather than OverflowError. type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 22:17:56 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 15 Nov 2012 21:17:56 +0000 Subject: [issue9893] Removing the Misc/Vim/ files In-Reply-To: <1284827686.39.0.471855984875.issue9893@psf.upfronthosting.co.za> Message-ID: <1353014276.99.0.469067128209.issue9893@psf.upfronthosting.co.za> Brett Cannon added the comment: Files removed in 7e37a6c76e36. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 22:18:32 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 15 Nov 2012 21:18:32 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1353014312.84.0.118608595198.issue16469@psf.upfronthosting.co.za> Mark Dickinson added the comment: See issue #16483 for the ValueError / OverflowError switch. To be honest, while I would have preferred ValueError to OverflowError for int(float('inf')) if we were doing this from scratch, I'm not convinced that it's actually worth switching. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 22:20:12 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 15 Nov 2012 21:20:12 +0000 Subject: [issue7620] Vim syntax highlight In-Reply-To: <1262445013.64.0.818540648921.issue7620@psf.upfronthosting.co.za> Message-ID: <1353014412.06.0.706997610438.issue7620@psf.upfronthosting.co.za> Brett Cannon added the comment: 7e37a6c76e36 removed the Misc/Vim files since we just were not staying on top of them. Thanks for the patch regardless, July. If the syntax file in Vim itself is off I would submit those as I have found the Vim maintainers very willing to accept fixes. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 22:21:20 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 15 Nov 2012 21:21:20 +0000 Subject: [issue9084] vimrc: use matchall() instead of ":match" to allow multiple matches In-Reply-To: <1277520193.82.0.447342355027.issue9084@psf.upfronthosting.co.za> Message-ID: <1353014480.64.0.988266895878.issue9084@psf.upfronthosting.co.za> Brett Cannon added the comment: 7e37a6c76e36 removes the files in Misc/Vim. Thanks for the patch regardless, Daniel. If the syntax file in Vim is out of date then I would suggest trying to submit a patch. I have found the Vim maintainer quite willing to take fixes. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 22:24:29 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 15 Nov 2012 21:24:29 +0000 Subject: [issue15783] decimal.localcontext(None) fails when using the C accelerator module In-Reply-To: <1345904683.65.0.863127291798.issue15783@psf.upfronthosting.co.za> Message-ID: <1353014669.14.0.823183486239.issue15783@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Should we go ahead with this? Sure: if you're willing to write the patch, go for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 22:46:54 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 15 Nov 2012 21:46:54 +0000 Subject: [issue9893] Removing the Misc/Vim/ files In-Reply-To: <1284827686.39.0.471855984875.issue9893@psf.upfronthosting.co.za> Message-ID: <1353016014.93.0.750067411103.issue9893@psf.upfronthosting.co.za> ?ric Araujo added the comment: Did you decide against including README.vim after all or just forgot that part? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 22:55:30 2012 From: report at bugs.python.org (Stephen) Date: Thu, 15 Nov 2012 21:55:30 +0000 Subject: [issue16479] Can't install Python 3 on Redhat Linux, make failed In-Reply-To: <1352996960.31.0.378819423594.issue16479@psf.upfronthosting.co.za> Message-ID: <1353016530.8.0.41081111364.issue16479@psf.upfronthosting.co.za> Stephen added the comment: Please ignore this. I have figured out it was caused by our company's make wrapper. Using native "make" works like a charm. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 23:02:29 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 15 Nov 2012 22:02:29 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1353016949.51.0.865646357506.issue15767@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Since it subclasses ImportError, it seems like we're already considering it to be an error? StopIteration and GeneratorExit don't inherit from an "Error" exception type unlike, say, the OSError exception types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 23:03:24 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 15 Nov 2012 22:03:24 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1353017004.07.0.704178688621.issue15767@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I meant to include this link for convenience: http://docs.python.org/dev/library/exceptions.html#exception-hierarchy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 23:12:25 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 15 Nov 2012 22:12:25 +0000 Subject: [issue16479] Can't install Python 3 on Redhat Linux, make failed In-Reply-To: <1352996960.31.0.378819423594.issue16479@psf.upfronthosting.co.za> Message-ID: <1353017545.36.0.331411416561.issue16479@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, closing then. ---------- nosy: +pitrou resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 23:13:28 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 15 Nov 2012 22:13:28 +0000 Subject: [issue16478] Fix division in tabnanny In-Reply-To: <1352994418.48.0.449467913759.issue16478@psf.upfronthosting.co.za> Message-ID: <1353017608.7.0.0429214265802.issue16478@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 23:17:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 15 Nov 2012 22:17:16 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <1353017836.41.0.616835279118.issue12848@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The C implementation writes and reads BINBYTES and BINUNICODE up to 4G (on 64-bit platform). The Python implementation writes and reads BINBYTES and BINUNICODE up to 2G. What should be compatible fix? Allow the Python implementation to write and read up to 4G? Then Python can pickle a large data which can't be unpickled on non-patched Python (and on 2.7). Limit size to 2G? Then non-patched Python (including 3.1) can pickle a data which can't be unpickled on patched Python. Also there is an unpleasant fact that 64-bit Python can pickle data which can't unpickle 32-bit Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 23:19:33 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Thu, 15 Nov 2012 22:19:33 +0000 Subject: [issue16483] Make int(float('inf')) raise ValueError rather than OverflowError. In-Reply-To: <1353014232.58.0.902552345028.issue16483@psf.upfronthosting.co.za> Message-ID: <1353017973.61.0.15926995319.issue16483@psf.upfronthosting.co.za> Alexey Kachayev added the comment: Patch is attached (ported from full issue patch for issue 16469). ---------- keywords: +patch nosy: +kachayev Added file: http://bugs.python.org/file27993/issue16483.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 15 23:20:47 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Thu, 15 Nov 2012 22:20:47 +0000 Subject: [issue16469] Exceptions raised by Fraction() different from those raised by int() In-Reply-To: <1352874620.08.0.771603502235.issue16469@psf.upfronthosting.co.za> Message-ID: <1353018047.71.0.200337054552.issue16469@psf.upfronthosting.co.za> Alexey Kachayev added the comment: Ok, I think that ValueError is more appropriate and I have already attached adopted patch for issue 16483. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 00:23:47 2012 From: report at bugs.python.org (Dwayne Litzenberger) Date: Thu, 15 Nov 2012 23:23:47 +0000 Subject: [issue10049] Add a "no-op" (null) context manager to contextlib In-Reply-To: <1286536426.03.0.247784217987.issue10049@psf.upfronthosting.co.za> Message-ID: <1353021827.02.0.729037555595.issue10049@psf.upfronthosting.co.za> Dwayne Litzenberger added the comment: After seeing a context manager named like "TempfileIfNeeded(..., cond)", whole sole purpose is to handle the conditional case, I'm firmly +1 on this proposal. It's much easier to just read "with Tempfile() if cond else nullcontext():" than to read through another level of indirection every time someone wanted some conditional logic on a context manager. Is there any chance that this issue could be reopened? Perhaps a more elegant solution would be to modify the "with" statement so that any object can be given to it (then we could just use None directly), but I suspect that would be a tad more controversial. ;) ---------- nosy: +DLitz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 00:49:51 2012 From: report at bugs.python.org (Eric Snow) Date: Thu, 15 Nov 2012 23:49:51 +0000 Subject: [issue16386] imp.find_module does not specify registry key it searches on windows In-Reply-To: <1351859767.89.0.815277454803.issue16386@psf.upfronthosting.co.za> Message-ID: <1353023391.6.0.661781157106.issue16386@psf.upfronthosting.co.za> Eric Snow added the comment: I agree with Andrew. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 00:53:03 2012 From: report at bugs.python.org (Eric Snow) Date: Thu, 15 Nov 2012 23:53:03 +0000 Subject: [issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object In-Reply-To: <1344732276.83.0.543554641885.issue15627@psf.upfronthosting.co.za> Message-ID: <1353023583.84.0.755375966249.issue15627@psf.upfronthosting.co.za> Eric Snow added the comment: Though I haven't been able to get to this, I do have a demo of sorts that I've been using elsewhere: https://bitbucket.org/ericsnowcurrently/pylt/src/default/pylt/_importing.py?at=default#cl-225 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 01:03:29 2012 From: report at bugs.python.org (Eric Snow) Date: Fri, 16 Nov 2012 00:03:29 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1353024209.1.0.384146793656.issue15767@psf.upfronthosting.co.za> Eric Snow added the comment: I'd say ModuleNotFoundError. You could argue that other exception types aren't really errors in certain circumstances. I'd think that generally this would be an error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 01:03:56 2012 From: report at bugs.python.org (Eric Snow) Date: Fri, 16 Nov 2012 00:03:56 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1353024236.67.0.00703118877805.issue15767@psf.upfronthosting.co.za> Eric Snow added the comment: Effectively the exception indicates that the import system had an error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 01:27:39 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 16 Nov 2012 00:27:39 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1353025659.01.0.388443684253.issue15031@psf.upfronthosting.co.za> Nick Coghlan added the comment: Perhaps go a bit more generic and call it something like "load_cached_data"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 01:34:26 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 16 Nov 2012 00:34:26 +0000 Subject: [issue10049] Add a "no-op" (null) context manager to contextlib In-Reply-To: <1286536426.03.0.247784217987.issue10049@psf.upfronthosting.co.za> Message-ID: <1353026066.33.0.791753205293.issue10049@psf.upfronthosting.co.za> Nick Coghlan added the comment: No, an empty ExitStack() instance already works fine as a no-op context manager in 3.3: http://docs.python.org/3/library/contextlib#simplifying-support-for-single-optional-context-managers We're not going to add a dedicated one under a different name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 03:27:11 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 Nov 2012 02:27:11 +0000 Subject: [issue9893] Removing the Misc/Vim/ files In-Reply-To: <1284827686.39.0.471855984875.issue9893@psf.upfronthosting.co.za> Message-ID: <1353032831.98.0.155797314598.issue9893@psf.upfronthosting.co.za> Brett Cannon added the comment: I decided against it. If Emacs doesn't already have one I figured Vim shouldn't either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 03:30:00 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 Nov 2012 02:30:00 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1353033000.43.0.249159634899.issue15031@psf.upfronthosting.co.za> Brett Cannon added the comment: You can't use "data" as there are connotations for that word thanks to get_data(). Same goes for "load" since this is something that get_code() would use more directly than load_module(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 03:41:30 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 Nov 2012 02:41:30 +0000 Subject: [issue15894] _PyImport_ReInitLock() doesn't check return value of PyThread_acquire_lock In-Reply-To: <1347229394.03.0.409721609393.issue15894@psf.upfronthosting.co.za> Message-ID: <1353033690.86.0.732750963677.issue15894@psf.upfronthosting.co.za> Brett Cannon added the comment: The chances of this being a problem is REALLY small and the single function that calls this is a public void function so there is no way for an exception to propagate short of a fatal error which seems a bit much. I did change to using NOWAIT_LOCK, though. ---------- resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 03:42:53 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 Nov 2012 02:42:53 +0000 Subject: [issue10966] eliminate use of ImportError implicitly representing SkipTest In-Reply-To: <1295566830.75.0.786153857799.issue10966@psf.upfronthosting.co.za> Message-ID: <1353033773.61.0.359712246766.issue10966@psf.upfronthosting.co.za> Brett Cannon added the comment: I'm at PyCon Argentina Friday and Saturday, so I have a rare opportunity to get stuff done. If anyone has issues or comments, please get them in over the next day or so, else I'm going to check this in as-is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 04:45:11 2012 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Fri, 16 Nov 2012 03:45:11 +0000 Subject: [issue16423] urllib data URL recipe In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <1353037511.11.0.221623647517.issue16423@psf.upfronthosting.co.za> Mathias Panzenb?ck added the comment: New patch. Instead of adding the data URL support to the doc as a recipe I added it to urllib.request directly. I think this is better and justified, because the old legacy URLopener had (some kind) of support for data URLs. OT: I think that the legacy URLopener has bugs. It only unquotes the data if it's base64 encoded, but it should be unquoted in any case. Also it returns a StringIO and decodes the content as latin-1. This is wrong, the content is a binary string. It could be text encoded in any kind of charset or not text at all (e.g. an image). ---------- Added file: http://bugs.python.org/file27994/urllib.request-data-url.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 04:50:36 2012 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Fri, 16 Nov 2012 03:50:36 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <1353037836.15.0.612589732531.issue16423@psf.upfronthosting.co.za> Changes by Mathias Panzenb?ck : ---------- components: +Library (Lib) -Documentation title: urllib data URL recipe -> urllib data URL type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 06:16:59 2012 From: report at bugs.python.org (Case Van Horsen) Date: Fri, 16 Nov 2012 05:16:59 +0000 Subject: [issue16483] Make int(float('inf')) raise ValueError rather than OverflowError. In-Reply-To: <1353014232.58.0.902552345028.issue16483@psf.upfronthosting.co.za> Message-ID: <1353043019.44.0.829014525316.issue16483@psf.upfronthosting.co.za> Case Van Horsen added the comment: I agree that ValueError is a more "correct" exception but I also don't think OverflowError is all that wrong. I don't think the change is worth the risk of breaking existing code. I'd be fine with either option. ---------- nosy: +casevh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 08:30:20 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 Nov 2012 07:30:20 +0000 Subject: [issue16478] Fix division in tabnanny In-Reply-To: <1352994418.48.0.449467913759.issue16478@psf.upfronthosting.co.za> Message-ID: <1353051020.0.0.339620113047.issue16478@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, sounds reasonable since we're working with an integer number of spaces :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 09:19:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 08:19:04 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <1353053944.33.0.321085402081.issue16423@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> patch review versions: -Python 3.1, Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 09:41:23 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Fri, 16 Nov 2012 08:41:23 +0000 Subject: [issue16470] Backport set and dictionary comprehensions in tutorial to 2.7 In-Reply-To: <1352879017.7.0.397020464451.issue16470@psf.upfronthosting.co.za> Message-ID: <1353055283.04.0.953363573716.issue16470@psf.upfronthosting.co.za> Yongzhi Pan added the comment: I updated the patch according to the code review. Hope now it is OK. ---------- Added file: http://bugs.python.org/file27995/set_and_dict_comprehensions_1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 10:05:21 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 16 Nov 2012 09:05:21 +0000 Subject: [issue16483] Make int(float('inf')) raise ValueError rather than OverflowError. In-Reply-To: <1353014232.58.0.902552345028.issue16483@psf.upfronthosting.co.za> Message-ID: <1353056721.91.0.00441958225745.issue16483@psf.upfronthosting.co.za> Mark Dickinson added the comment: I guess the feeling of wrongness for me mostly comes from the floating-point world, where the IEEE 754 'overflow' floating-point exception is only appropriate for cases where the result is *finite* but so large that it falls outside the representable range for a float. Regarding conversions from floating-point formats to integer formats, IEEE 754 says: "When a NaN or infinite operand cannot be represented in the destination format and this cannot otherwise be indicated, the invalid operation exception shall be signaled." To the extent that there's a convention at all, we typically map 'invalid operation exceptions' to ValueError. (See the comments at the top of Modules/mathmodule.c.) There's also the minor practical inconvenience of having to remember to catch OverflowError *and* ValueError in try: .. except: constructs. On the other side, there's a very real possibility of breaking code with this change. I'll leave this open for a week or so, but unless there's a strong consensus that this should be changed, I propose to close as "won't fix". ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 10:48:37 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 16 Nov 2012 09:48:37 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353059317.5.0.189776338269.issue16475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: This change is specifically aimed at code objects. As it is, it is impossible to produce code objects that share common data (e.g. filename strings, common tuples, name strings, etc) that don't unserialize to separate objects. Also, separately but related (see second patch) the effort spent in interning names when compiling, is lost when code objects are loaded back from disk. This change is based on work done at CCP to reduce the size of compiled code in memory. Simple preprocessing of code objects prior to writing them to disk can result in important memory savings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 10:53:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 09:53:58 +0000 Subject: [issue16483] Make int(float('inf')) raise ValueError rather than OverflowError. In-Reply-To: <1353014232.58.0.902552345028.issue16483@psf.upfronthosting.co.za> Message-ID: <1353059638.64.0.802484666311.issue16483@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > There's also the minor practical inconvenience of having to remember to catch OverflowError *and* ValueError in try: .. except: constructs. And MemoryError (for big decimals). Might be the best solution would be raising an exception which subclasses both ValueError and OverflowError. Or make OverflowError to be subclass of ValueError. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 11:13:58 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 16 Nov 2012 10:13:58 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1353060838.21.0.169102896657.issue15767@psf.upfronthosting.co.za> Ezio Melotti added the comment: I prefer ModuleNotFound. Its meaning is already clear enough, even without the Error suffix. OTOH we now have FileNotFoundError, but all the other OSError subclasses have that suffix. In general I think the suffix is necessary when it's not already clear from the name that we are dealing with an exception, otherwise it can be dropped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 11:15:56 2012 From: report at bugs.python.org (Christoph Gohlke) Date: Fri, 16 Nov 2012 10:15:56 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 In-Reply-To: <1350842175.59.0.919553926658.issue16296@psf.upfronthosting.co.za> Message-ID: <1353060956.94.0.8965603597.issue16296@psf.upfronthosting.co.za> Changes by Christoph Gohlke : ---------- nosy: +cgohlke _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 11:46:29 2012 From: report at bugs.python.org (Marius Gedminas) Date: Fri, 16 Nov 2012 10:46:29 +0000 Subject: [issue16484] Missing/broken documentation redirect for http://docs.python.org/library/xml.etree.ElementTree Message-ID: <1353062789.06.0.457819088795.issue16484@psf.upfronthosting.co.za> New submission from Marius Gedminas: Do this: pydoc2.7 xml.etree.ElementTree then click on the MODULE DOCS link, which is http://docs.python.org/library/xml.etree.ElementTree You're redirected to http://docs.python.org/2/library/xml.etree.ElementTree which is a 404 page. ---------- assignee: docs at python components: Documentation messages: 175675 nosy: docs at python, mgedmin priority: normal severity: normal status: open title: Missing/broken documentation redirect for http://docs.python.org/library/xml.etree.ElementTree versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 11:48:57 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 16 Nov 2012 10:48:57 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 In-Reply-To: <1350842175.59.0.919553926658.issue16296@psf.upfronthosting.co.za> Message-ID: <1353062937.25.0.664940753458.issue16296@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Why did you put 3.2 into the version list? 3.2 doesn't use VS 2010. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 11:49:56 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 16 Nov 2012 10:49:56 +0000 Subject: [issue16478] Fix division in tabnanny In-Reply-To: <1352994418.48.0.449467913759.issue16478@psf.upfronthosting.co.za> Message-ID: <1353062996.8.0.953980820267.issue16478@psf.upfronthosting.co.za> Ezio Melotti added the comment: The patch looks OK, buy can you provide a way to reproduce the error (if you get any)? Should we add tests for tabnanny? I tried to get an error from tabnanny but the only thing I got was a ResourceWarning (that can be easily fixed by a finally: f.close() near the end of the check() method). I also noticed that tabnanny doesn't detect any problem with: if 0: \t\t\t\t\t\t\tprint(1) else: print(2) if 1: print() else: \t \t print() ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 12:07:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 11:07:17 +0000 Subject: [issue16478] Fix division in tabnanny In-Reply-To: <1352994418.48.0.449467913759.issue16478@psf.upfronthosting.co.za> Message-ID: <1353064036.99.0.24139295359.issue16478@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The patch looks OK, buy can you provide a way to reproduce the error (if you get any)? No, I have not any. I am even not sure tabnanny works at all. But this bug is obvious. So, let's fix it and go on. > Should we add tests for tabnanny? This will be good, but it is a different issue. I'm not ready to write a test. > I tried to get an error from tabnanny but the only thing I got was a ResourceWarning (that can be easily fixed by a finally: f.close() near the end of the check() method). I?can't see a ResourceWarning. A "finally: f.close()" already exists near the end of the check() method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 12:11:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 16 Nov 2012 11:11:22 +0000 Subject: [issue16478] Fix division in tabnanny In-Reply-To: <1352994418.48.0.449467913759.issue16478@psf.upfronthosting.co.za> Message-ID: <1353064282.56.0.882933987039.issue16478@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I can't see a ResourceWarning. A "finally: f.close()" already > exists near the end of the check() method. Looks like it was added in 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 12:18:11 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 16 Nov 2012 11:18:11 +0000 Subject: [issue16478] Fix division in tabnanny In-Reply-To: <1352994418.48.0.449467913759.issue16478@psf.upfronthosting.co.za> Message-ID: <3Y2xkp4Vy0zRP5@mail.python.org> Roundup Robot added the comment: New changeset fc17fdd42c66 by Ezio Melotti in branch '3.2': #16478: use floor division in tabnanny and fix a ResourceWarning. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/fc17fdd42c66 New changeset d7558e4015a4 by Ezio Melotti in branch '3.3': #16478: merge with 3.2. http://hg.python.org/cpython/rev/d7558e4015a4 New changeset 377a50f8cb8b by Ezio Melotti in branch 'default': #16478: merge with 3.3. http://hg.python.org/cpython/rev/377a50f8cb8b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 12:19:41 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 16 Nov 2012 11:19:41 +0000 Subject: [issue16478] Fix division in tabnanny In-Reply-To: <1352994418.48.0.449467913759.issue16478@psf.upfronthosting.co.za> Message-ID: <1353064781.77.0.833386947674.issue16478@psf.upfronthosting.co.za> Ezio Melotti added the comment: Applied the patch on all 3 branches and fixed the resource warning in 3.2. Thanks for the report and the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 12:50:11 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 16 Nov 2012 11:50:11 +0000 Subject: [issue16481] process handle leak on windows in multiprocessing In-Reply-To: <1353001449.15.0.429236544802.issue16481@psf.upfronthosting.co.za> Message-ID: <1353066611.22.0.756180217287.issue16481@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Fixed in c574ce78cd61 and cb612c5f30cb. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 13:49:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 12:49:33 +0000 Subject: [issue16485] FD leaks in aifc module Message-ID: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Aifc_write.close() can raise exception and left the internal file object not closed. The patch closes the file object even in case of error and reset _file to None even in case of the file object close() raises an exception, so that Aifc_write.close() can be called repeatedly. ---------- components: Library (Lib) files: aifc_close.patch keywords: patch messages: 175683 nosy: serhiy.storchaka priority: normal severity: normal status: open title: FD leaks in aifc module type: resource usage versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27996/aifc_close.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 13:53:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 12:53:26 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <1353070406.75.0.727729734056.issue16485@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27996/aifc_close.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 13:54:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 12:54:02 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <1353070442.66.0.295018851272.issue16485@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +r.david.murray Added file: http://bugs.python.org/file27997/aifc_close.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 13:54:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 12:54:33 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <1353070473.7.0.868641337491.issue16485@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file27998/aifc_close-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 13:56:02 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 16 Nov 2012 12:56:02 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <1353070562.77.0.324362776097.issue16485@psf.upfronthosting.co.za> Ezio Melotti added the comment: Adding "with" support to Aifc_write looks like a new feature, but Aifc_write doesn't seem to be part of the public API. Does this change (indirectly) add "with" support to any part of the public API? ---------- nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 13:59:31 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 16 Nov 2012 12:59:31 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <1353070771.5.0.715780886254.issue16485@psf.upfronthosting.co.za> Ezio Melotti added the comment: Adding "with" support to Aifc_write looks like a new feature, but Aifc_write doesn't seem to be part of the public API. Does this change (indirectly) add "with" support to any part of the public API? ---------- nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 14:32:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 13:32:50 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <1353072770.19.0.655719843178.issue16485@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27998/aifc_close-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 14:32:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 13:32:54 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <1353072774.73.0.862681651843.issue16485@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27997/aifc_close.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 14:35:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 13:35:16 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <201211161534.44932.storchaka@gmail.com> Serhiy Storchaka added the comment: Sorry, I miss that test_close() already exists. Merged. ---------- Added file: http://bugs.python.org/file27999/aifc_close.patch Added file: http://bugs.python.org/file28000/aifc_close-2.7.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r cb612c5f30cb Lib/aifc.py --- a/Lib/aifc.py Thu Nov 15 18:22:23 2012 +0000 +++ b/Lib/aifc.py Fri Nov 16 15:22:51 2012 +0200 @@ -692,7 +692,9 @@ self._patchheader() def close(self): - if self._file: + if self._file is None: + return + try: self._ensure_header_written(0) if self._datawritten & 1: # quick pad to even size @@ -700,13 +702,15 @@ self._datawritten = self._datawritten + 1 self._writemarkers() if self._nframeswritten != self._nframes or \ - self._datalength != self._datawritten or \ - self._marklength: + self._datalength != self._datawritten or \ + self._marklength: self._patchheader() + finally: # Prevent ref cycles self._convert = None - self._file.close() + f = self._file self._file = None + f.close() # # Internal methods. diff -r cb612c5f30cb Lib/test/test_aifc.py --- a/Lib/test/test_aifc.py Thu Nov 15 18:22:23 2012 +0000 +++ b/Lib/test/test_aifc.py Fri Nov 16 15:22:51 2012 +0200 @@ -112,6 +112,13 @@ self.assertEqual(testfile.closed, False) f.close() self.assertEqual(testfile.closed, True) + testfile = open(TESTFN, 'wb') + fout = aifc.open(testfile, 'wb') + self.assertFalse(testfile.closed) + with self.assertRaises(aifc.Error): + fout.close() + self.assertTrue(testfile.closed) + fout.close() # do nothing def test_write_header_comptype_sampwidth(self): for comptype in (b'ULAW', b'ulaw', b'ALAW', b'alaw', b'G722'): @@ -286,11 +293,13 @@ def test_write_header_raises(self): fout = aifc.open(io.BytesIO(), 'wb') self.assertRaises(aifc.Error, fout.close) + fout = aifc.open(io.BytesIO(), 'wb') fout.setnchannels(1) self.assertRaises(aifc.Error, fout.close) + fout = aifc.open(io.BytesIO(), 'wb') + fout.setnchannels(1) fout.setsampwidth(1) self.assertRaises(aifc.Error, fout.close) - fout.initfp(None) def test_write_header_comptype_raises(self): for comptype in (b'ULAW', b'ulaw', b'ALAW', b'alaw', b'G722'): -------------- next part -------------- diff -r 457c0c9c7893 Lib/aifc.py --- a/Lib/aifc.py Thu Nov 15 07:10:27 2012 +0100 +++ b/Lib/aifc.py Fri Nov 16 15:25:05 2012 +0200 @@ -732,22 +732,28 @@ self._patchheader() def close(self): - self._ensure_header_written(0) - if self._datawritten & 1: - # quick pad to even size - self._file.write(chr(0)) - self._datawritten = self._datawritten + 1 - self._writemarkers() - if self._nframeswritten != self._nframes or \ - self._datalength != self._datawritten or \ - self._marklength: - self._patchheader() - if self._comp: - self._comp.CloseCompressor() - self._comp = None - # Prevent ref cycles - self._convert = None - self._file.close() + if self._file is None: + return + try: + self._ensure_header_written(0) + if self._datawritten & 1: + # quick pad to even size + self._file.write(chr(0)) + self._datawritten = self._datawritten + 1 + self._writemarkers() + if self._nframeswritten != self._nframes or \ + self._datalength != self._datawritten or \ + self._marklength: + self._patchheader() + if self._comp: + self._comp.CloseCompressor() + self._comp = None + finally: + # Prevent ref cycles + self._convert = None + f = self._file + self._file = None + f.close() # # Internal methods. diff -r 457c0c9c7893 Lib/test/test_aifc.py --- a/Lib/test/test_aifc.py Thu Nov 15 07:10:27 2012 +0100 +++ b/Lib/test/test_aifc.py Fri Nov 16 15:25:05 2012 +0200 @@ -106,6 +106,13 @@ self.assertEqual(testfile.closed, False) f.close() self.assertEqual(testfile.closed, True) + testfile = open(TESTFN, 'wb') + fout = aifc.open(testfile, 'wb') + self.assertFalse(testfile.closed) + with self.assertRaises(aifc.Error): + fout.close() + self.assertTrue(testfile.closed) + fout.close() # do nothing class AIFCLowLevelTest(unittest.TestCase): From report at bugs.python.org Fri Nov 16 14:39:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 13:39:23 +0000 Subject: [issue16486] Add context manager support to aifc module Message-ID: <1353073163.72.0.969679362142.issue16486@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch adds context manager support aifc module. Now objects returned by aifc.open() will support context manager protocol. This issue required first fixing issue16485 to pass tests. ---------- components: Library (Lib) files: aifc_context_manager.patch keywords: patch messages: 175687 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Add context manager support to aifc module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28001/aifc_context_manager.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 14:41:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 13:41:15 +0000 Subject: [issue16486] Add context manager support to aifc module In-Reply-To: <1353073163.72.0.969679362142.issue16486@psf.upfronthosting.co.za> Message-ID: <1353073275.86.0.693267670976.issue16486@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +FD leaks in aifc module nosy: +r.david.murray stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 14:43:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 13:43:09 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <1353073389.32.0.175953096189.issue16485@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Adding "with" support to Aifc_write looks like a new feature, but Aifc_write doesn't seem to be part of the public API. Does this change (indirectly) add "with" support to any part of the public API? Don't pay attention, it was a wrong patch. For "with" support see issue16486. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 14:49:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 13:49:10 +0000 Subject: [issue11287] Add context manager support to dbm modules In-Reply-To: <1298383106.44.0.402041562416.issue11287@psf.upfronthosting.co.za> Message-ID: <1353073750.86.0.323381017002.issue11287@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I added comments in Rietveld. ---------- nosy: +serhiy.storchaka stage: commit review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 14:55:23 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 16 Nov 2012 13:55:23 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1353059317.5.0.189776338269.issue16475@psf.upfronthosting.co.za> Message-ID: <63905856.241517818.1353074117248.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > This change is specifically aimed at code objects. > As it is, it is impossible to produce code objects that share common > data (e.g. filename strings, common tuples, name strings, etc) that > don't unserialize to separate objects. Shouldn't strings be interned when the code object is unmarshalled? > This change is based on work done at CCP to reduce the size of > compiled code in memory. Simple preprocessing of code objects prior > to writing them to disk can result in important memory savings. How important? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 16:10:16 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 16 Nov 2012 15:10:16 +0000 Subject: [issue16487] Allow ssl certificates to be speficfied from memory rather than files. Message-ID: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson: The _ssl module (and indeed the openssl lib) relies heaviliy on actual filesystem locations to load certificates. A client or a server may not want to rely on physical filesystem locations to load certificates for authentication or verification. Physical disc files are cumbersome and present a management burden in the presence of multiple processes. This patch adds extensions to the _ssl.c file which allows certificates, keys and certification chains to be provided by file contents, rather than file name. The ctx.load_cert_chain and ctx.load_verify_locations take additional arguments to specify the data on this form. the ssl.wrap_socket does not add arguments, rather the function is polymorphic in that the conents of the certfil/keyfile are examined and treated as file-data if beginning with -----BEGIN. the ca_certs is similarly treated as a list of file contents, if it is a list, (rather than a string) This patch is the result of work at CCP for deploying ssl clients and servers in an isolated environment without having to resort to temporary disk files. ---------- components: Extension Modules files: sslpatch1.patch keywords: patch messages: 175691 nosy: kristjan.jonsson priority: normal severity: normal status: open title: Allow ssl certificates to be speficfied from memory rather than files. type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28002/sslpatch1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 16:10:39 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 16 Nov 2012 15:10:39 +0000 Subject: [issue16487] Allow ssl certificates to be speficfied from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1353078639.93.0.130861098275.issue16487@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: (the patch contains a local change to set the location of the 'external' dir, please disregard this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 16:14:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 15:14:09 +0000 Subject: [issue16488] Add context manager support to epoll object Message-ID: <1353078849.09.0.752588026545.issue16488@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch adds support of context manager protocol to epoll objects. ---------- components: Extension Modules files: select_epoll_context_manager.patch keywords: patch messages: 175693 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Add context manager support to epoll object type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28003/select_epoll_context_manager.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 16:15:38 2012 From: report at bugs.python.org (Daniel Swanson) Date: Fri, 16 Nov 2012 15:15:38 +0000 Subject: [issue15346] Tkinter extention modules have no documentation In-Reply-To: <1342198047.2.0.619885102312.issue15346@psf.upfronthosting.co.za> Message-ID: <1353078938.12.0.695320969126.issue15346@psf.upfronthosting.co.za> Changes by Daniel Swanson : ---------- status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 16:19:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 15:19:50 +0000 Subject: [issue11287] Add context manager support to dbm modules In-Reply-To: <1298383106.44.0.402041562416.issue11287@psf.upfronthosting.co.za> Message-ID: <1353079190.11.0.489729156946.issue11287@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think it will be better to call the close() method from the __exit__() method using _PyObject_CallMethodId(). It will allow to overload the close() method and get working context manager without overloading the __exit__() method. See issue16488 for example. ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 16:32:34 2012 From: report at bugs.python.org (Daniel Swanson) Date: Fri, 16 Nov 2012 15:32:34 +0000 Subject: [issue15346] Tkinter extention modules have no documentation In-Reply-To: <1342198047.2.0.619885102312.issue15346@psf.upfronthosting.co.za> Message-ID: <1353079954.78.0.444475011442.issue15346@psf.upfronthosting.co.za> Changes by Daniel Swanson : ---------- status: languishing -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 16:39:37 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 16 Nov 2012 15:39:37 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353080377.76.0.102275796947.issue16475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Basically, reuse of strings (and preservation of their internment status) fell by the wayside somewhere in the 3.x transition. Strings have been reused, and interned strings re-interned, since protocol version 1 in 2.x. This patch adds that feature back, and uses that mechanism to reuse not only strings, but also any other multiply-referenced object. It is not desirable to simply intern all strings that are read from marshaled data. Only selected strings are interned by python during compilation and we want to keep it that way. Also, 2.x reuses not only interned strings but other strings as well. Generalizing reuse of strings to other objects is trivial, and a logical step forward. This allows optimizations to be made on code objects where common data are identified and instanced, and those code objects to be saved and reloaded with that instancing intact. But even without such code-object optimization, the changes are significant: The sizes of the marshaled code object of lib/test/test_marshal drops from 24093 bytes in version 2 to 17841 bytes with version 3, without any additional massaging of the module code object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 18:22:18 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 16 Nov 2012 17:22:18 +0000 Subject: [issue15783] decimal.localcontext(None) fails when using the C accelerator module In-Reply-To: <1345904683.65.0.863127291798.issue15783@psf.upfronthosting.co.za> Message-ID: <1353086538.74.0.400782438796.issue15783@psf.upfronthosting.co.za> Stefan Krah added the comment: OK, here's a patch. Specifics: o Except for the number methods, decimal.py and _decimal should behave identically now. o _decimal actually requires an additional context arg in same_quantum(), compare_total(), compare_total_mag() and copy_sign(). This is for raising InvalidOperation if the second operand is a very large integer and cannot be converted exactly. I've added the context arguments to the Python version to keep compatibility. o For some reason decimal.py uses a context arg in canonical(), so I've added it to the C version. o localcontext(ctx=None) is pretty ugly. Perhaps we should make the backwards incompatible switch to localcontext(context=None). I don't care a lot though. o I'd like to update the docstrings and the documentation in a separate patch. o The important idiom c.power(modulo=None, b=9, a=3) is now supported. :) ---------- Added file: http://bugs.python.org/file28004/issue15783-all.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 18:25:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 17:25:08 +0000 Subject: [issue16323] Wrong C API documentation for locale encoding In-Reply-To: <1351173455.0.0.737976146006.issue16323@psf.upfronthosting.co.za> Message-ID: <1353086708.5.0.600852309918.issue16323@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 18:32:11 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 16 Nov 2012 17:32:11 +0000 Subject: [issue16489] importlib find_loader returns a loader for a non existent module Message-ID: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za> New submission from Xavier de Gaye: Create the following tree: foo.py mypackage __init__.py and get a loader for the non existent module 'mypackage.foo'. $ mkdir tmp $ cd tmp $ >foo.py $ mkdir mypackage $ >mypackage/__init__.py $ ./python Python 3.4.0a0 (default:53a7c2226a2b, Nov 9 2012, 16:47:41) [GCC 4.3.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import importlib >>> importlib.find_loader('mypackage').get_filename() './mypackage/__init__.py' >>> importlib.find_loader('mypackage.foo').get_filename() './foo.py' >>> find_loader should return None in this case. ---------- components: Library (Lib) messages: 175697 nosy: xdegaye priority: normal severity: normal status: open title: importlib find_loader returns a loader for a non existent module type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 18:42:55 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 16 Nov 2012 17:42:55 +0000 Subject: [issue16489] importlib find_loader returns a loader for a non existent module In-Reply-To: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za> Message-ID: <1353087775.85.0.192512054978.issue16489@psf.upfronthosting.co.za> Xavier de Gaye added the comment: And yes, find_loader returns None, when correctly invoked with the path argument: >>> importlib.find_loader('mypackage.foo', ['./mypackage/']) >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 19:21:15 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 16 Nov 2012 18:21:15 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1353090075.83.0.377231500854.issue15767@psf.upfronthosting.co.za> Chris Jerdonek added the comment: To state more explicitly the observation I alluded to in my comment above, we currently follow (without exception -- pun intended :) ) the convention that subclasses of exceptions that end in "Error" also end in "Error". We also do the same with the suffix "Warning". The latter is another reason to include the suffix "Error" -- to eliminate ambiguity as to whether the exception type inherits from a Warning class (e.g. from ImportWarning). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 19:27:03 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 16 Nov 2012 18:27:03 +0000 Subject: [issue16489] importlib find_loader returns a loader for a non existent module In-Reply-To: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za> Message-ID: <1353090423.65.0.6951749503.issue16489@psf.upfronthosting.co.za> R. David Murray added the comment: Not necessarily. The fact that there is nothing to load doesn't mean it isn't the right loader if there *was* something to load. But I'll leave it to the import experts to say what the expected behavior is. I'll admit that I can't figure it out from a quick perusal of the docs and PEP, so I'd say that regardless of what the correct behavior is there is at least a doc bug here. ---------- nosy: +brett.cannon, eric.smith, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 19:30:18 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 16 Nov 2012 18:30:18 +0000 Subject: [issue16487] Allow ssl certificates to be speficfied from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1353090618.88.0.0202597004781.issue16487@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > (the patch contains a local change to set the location of the > 'external' dir, please disregard this. Can you upload a cleaned up patch then? :) ---------- components: +Library (Lib) -Extension Modules nosy: +pitrou stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 19:35:09 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 16 Nov 2012 18:35:09 +0000 Subject: [issue16488] Add context manager support to epoll object In-Reply-To: <1353078849.09.0.752588026545.issue16488@psf.upfronthosting.co.za> Message-ID: <1353090909.04.0.680688476869.issue16488@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think that's very useful since generally the epoll object will have to survive accross function calls (it's usually stored as an attribute somewhere on your event loop). On the other hand, this addition doesn't hurt. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 19:53:46 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 16 Nov 2012 18:53:46 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1353092026.69.0.546300038241.issue15767@psf.upfronthosting.co.za> Ezio Melotti added the comment: That seems indeed to be the case with built-in exceptions. I'm not sure if it's intentional or just a coincidence. I agree that warnings should always have a "Warning" suffix to distinguish them from exceptions, but in the stdlib the "Error" suffix is not used consistently. There are exceptions like: FloatOperation, DivisionByZero, InvalidOperation, TimeoutExpired, BrokenProcessPool, BufferTooShort, ImproperConnectionState, UnknownProtocol, InvalidURL, etc.. Anyway I don't have a strong opinion about this, so if you think the name should be ModuleNotFoundError it's OK with me (i.e. I'm -0). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 19:56:10 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 Nov 2012 18:56:10 +0000 Subject: [issue16489] importlib find_loader returns a loader for a non existent module In-Reply-To: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za> Message-ID: <1353092170.65.0.1238853788.issue16489@psf.upfronthosting.co.za> Brett Cannon added the comment: Everything is working as expected; you left out the path argument:: importlib.find_loader('package.foo', ['package']) This works the way it does because otherwise we would have to stat every single time from the top level on down and that is extremely costly. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 20:08:04 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 Nov 2012 19:08:04 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1353092884.59.0.358881695541.issue15031@psf.upfronthosting.co.za> Brett Cannon added the comment: In order to have exceptions that have messages like "bad magic number in module" there would need to be a technically unneeded fullname parameter. People cool with that? I personally dislike having info passed in just for error reporting, but in this case import exceptions typically try to clarify what actually caused the issue by naming the module since you can end up with deep implicit module chains. The other stuff related to bytecode paths are just for verbose logging or for setting path on ImportError, both of which can be worked around. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 20:15:13 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 Nov 2012 19:15:13 +0000 Subject: [issue16484] Missing/broken documentation redirect for http://docs.python.org/library/xml.etree.ElementTree In-Reply-To: <1353062789.06.0.457819088795.issue16484@psf.upfronthosting.co.za> Message-ID: <1353093313.96.0.389675106868.issue16484@psf.upfronthosting.co.za> Georg Brandl added the comment: The redirect is not the problem. The page never existed. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 20:30:24 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 16 Nov 2012 19:30:24 +0000 Subject: [issue16489] importlib find_loader returns a loader for a non existent module In-Reply-To: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za> Message-ID: <1353094224.23.0.32168904268.issue16489@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Maybe find_loader could check its parameters, notice that the name is a dotted name, that path is None and in this case, not return a loader ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 20:34:56 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 Nov 2012 19:34:56 +0000 Subject: [issue16489] importlib find_loader returns a loader for a non existent module In-Reply-To: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za> Message-ID: <1353094496.03.0.139620467549.issue16489@psf.upfronthosting.co.za> Brett Cannon added the comment: That won't work as frozen and builtin modules don't care about the path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 20:41:54 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 16 Nov 2012 19:41:54 +0000 Subject: [issue16487] Allow ssl certificates to be speficfied from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1353094914.5.0.507340470592.issue16487@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Can't right now. It's only relevant for pcbuild anyway so you can test it for Unix if you want without fear. Don't worry, I always give my patches a cleanup before committing them. Meanwhile, I'd welcome comments on the substance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 20:47:09 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 16 Nov 2012 19:47:09 +0000 Subject: [issue16489] importlib find_loader returns a loader for a non existent module In-Reply-To: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za> Message-ID: <1353095229.22.0.141905621595.issue16489@psf.upfronthosting.co.za> Xavier de Gaye added the comment: > Not necessarily. The fact that there is nothing to load doesn't > mean it isn't the right loader if there *was* something to load. But it is not even the right loader if there *was* something to load, as get_filename() returns './foo.py' which is wrong even if mypackage/foo.py had existed. It should have returned './mypackage/foo.py' to be an acceptable loader for a would-be mypackage.foo module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 21:01:32 2012 From: report at bugs.python.org (Eric Snow) Date: Fri, 16 Nov 2012 20:01:32 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1353096092.22.0.422427023569.issue15031@psf.upfronthosting.co.za> Eric Snow added the comment: Don't underestimate the potential value of having the fullname when overriding the method in a subclass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 21:16:53 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 16 Nov 2012 20:16:53 +0000 Subject: [issue16461] wave module: wrong integer format In-Reply-To: <1352732651.92.0.893248719316.issue16461@psf.upfronthosting.co.za> Message-ID: <1353097013.24.0.811804311496.issue16461@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The Wikipedia sentence "The WAV format is limited to files that are less than 4 GB, because of its use of a 32-bit unsigned integer to record the file size header" is unambiguous and appears correct (see below). The rest of the Wikipedia sentence "(some programs limit the file size to 2 GB)" must be because some programs mistakenly read into signed instead of unsigned ints and fail to later adjust (by, for instance, later casting to unsigned). The statement reflects the original specification given in reference 3, a .pdf. On page 11, it has ''' The basic building block of a RIFF file is called a chunk. Using C syntax, a chunk can be defined as follows: typedef unsigned long DWORD; typedef DWORD CKSIZE; // 32-bit unsigned size value typedef struct { // Chunk structure CKID ckID; // Chunk type identifier CKSIZE ckSize; // Chunk size field (size of ckData) ''' and on page 19 " 16-bit unsigned quantity in Intel format unsigned int" INT and LONG are defined as 16 and 32 bit signed versions. The WAVE specification, start on p. 56, uses WORD and DWORD, not INT and LONG for chunk header fields. Certainly, the 2 bytes for samples/sec should be unsigned to allow the standard 44100 CD rate. http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html (reference 4) summarized the .wav chunk formats. I think it just takes it for granted that sizes and counts are unsigned. The patch given did not touch the write format in line 469(3.3.0): self._file.write(struct.pack('>> struct.unpack('L', struct.pack('l', 3000000000 -2**32)) (3000000000,) >>> struct.unpack('H', struct.pack('h', 44100 - 2**16))[0] 44100 It is possible that someone is using this to write CD-quality files. It is also possible that anyone who has tried just gave up. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 21:25:47 2012 From: report at bugs.python.org (Marius Gedminas) Date: Fri, 16 Nov 2012 20:25:47 +0000 Subject: [issue16484] Missing/broken documentation redirect for http://docs.python.org/library/xml.etree.ElementTree In-Reply-To: <1353062789.06.0.457819088795.issue16484@psf.upfronthosting.co.za> Message-ID: <1353097547.66.0.759603451911.issue16484@psf.upfronthosting.co.za> Marius Gedminas added the comment: A working link is http://docs.python.org/2/library/xml.etree.elementtree.html or http://docs.python.org/2/library/xml.etree.elementtree (with no .html at the end). Looks like capitalization is causing a problem. Did these pydoc links ever work? Would it be possible to make them work? There's a limited number of standard library modules with names that contain capital letters. find /usr/lib/python2.7 -name dist-packages -prune -o -name '*[A-Z]*' | wc -l gives me 211 names, but this is an imprecise upper bound because it includes files like 'distutils/README' that aren't modules or packages. Can I do anything to help? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 21:44:16 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 16 Nov 2012 20:44:16 +0000 Subject: [issue16477] tarfile fails to close file handles in case of exception In-Reply-To: <1352983787.27.0.404679122442.issue16477@psf.upfronthosting.co.za> Message-ID: <1353098656.44.0.0164561293028.issue16477@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Would "with source = self.extractfile(tarinfo):" work? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 22:23:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Nov 2012 21:23:59 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <1353101039.69.0.728187752995.issue12848@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch for 3.x. It unify behavior of Python and C implementations and unify behavior on 32- and 64-bit platforms. For backward compatibility Pickler can pickle up to 2G data, but Unpickler can unpickle up to 4G on 64-bit. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file28005/pickle_portable_size.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 16 22:41:26 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 16 Nov 2012 21:41:26 +0000 Subject: [issue16489] importlib find_loader returns a loader for a non existent module In-Reply-To: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za> Message-ID: <1353102086.21.0.045660152196.issue16489@psf.upfronthosting.co.za> Xavier de Gaye added the comment: If one would want to fix this, one way to do it could be to change the following two methods of the PathFinder class such that: find_module() does not set path to sys.path when its path argument is None, so as to keep this information for _get_loader() to process it later _get_loader() sets path to sys.path when its path argument is None and returns a None loader when a loader has been found by a finder and: - this finder is a FileFinder instance - the _get_loader() path argument is None - the module name is a dotted name ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 00:30:29 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 16 Nov 2012 23:30:29 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> Message-ID: <1353108629.35.0.246933135602.issue16465@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 00:38:07 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 16 Nov 2012 23:38:07 +0000 Subject: [issue16471] upgrade to sphinx 1.1 In-Reply-To: <1352888870.05.0.523269386726.issue16471@psf.upfronthosting.co.za> Message-ID: <1353109087.24.0.603101777513.issue16471@psf.upfronthosting.co.za> STINNER Victor added the comment: According to the changelog, Sphinx 1.1 now supports Python 3. Cool! Doc/Makefile may be modified to use "PYTHON = python3". ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 02:25:06 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 01:25:06 +0000 Subject: [issue16489] importlib find_loader returns a loader for a non existent module In-Reply-To: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za> Message-ID: <1353115506.29.0.438836208135.issue16489@psf.upfronthosting.co.za> Brett Cannon added the comment: Feel free to submit a patch, but I'm personally not motivated enough to try to change this on my own. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 02:28:57 2012 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 17 Nov 2012 01:28:57 +0000 Subject: [issue16489] importlib find_loader returns a loader for a non existent module In-Reply-To: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za> Message-ID: <1353115737.94.0.37183473181.issue16489@psf.upfronthosting.co.za> Eric V. Smith added the comment: It might be more motivating if you (Xavier de Gaye) could let us know of a real-world problem caused by this behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 03:43:31 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 17 Nov 2012 02:43:31 +0000 Subject: [issue16461] wave module: wrong integer format In-Reply-To: <1352732651.92.0.893248719316.issue16461@psf.upfronthosting.co.za> Message-ID: <3Y3LGV2ClQzRXJ@mail.python.org> Roundup Robot added the comment: New changeset b8ece33ce27d by Jesus Cea in branch '2.7': Closes #16461: Wave library should be able to deal with 4GB wav files, and sample rate of 44100 Hz. http://hg.python.org/cpython/rev/b8ece33ce27d New changeset 542bf1c1f2e3 by Jesus Cea in branch '3.2': Closes #16461: Wave library should be able to deal with 4GB wav files, and sample rate of 44100 Hz. http://hg.python.org/cpython/rev/542bf1c1f2e3 New changeset f380d749f6bd by Jesus Cea in branch '3.3': MERGE: Closes #16461: Wave library should be able to deal with 4GB wav files, and sample rate of 44100 Hz. http://hg.python.org/cpython/rev/f380d749f6bd New changeset 269498958b97 by Jesus Cea in branch 'default': MERGE: Closes #16461: Wave library should be able to deal with 4GB wav files, and sample rate of 44100 Hz. http://hg.python.org/cpython/rev/269498958b97 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 03:43:37 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 02:43:37 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1353120217.16.0.177481452924.issue15031@psf.upfronthosting.co.za> Brett Cannon added the comment: Attached is a patch that introduces _LoaderBasics.parse_bytecode_file(). It takes in basically what _bytes_from_bytecode() did plus a keyword-only boolean flag for exception suppression as that's needed to ignore stale bytecode when source is available. I still need to write specific tests for the method, but test.test_importlib passes. ---------- components: +Library (Lib) -Interpreter Core Added file: http://bugs.python.org/file28006/parse_pyc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 03:45:07 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 17 Nov 2012 02:45:07 +0000 Subject: [issue16461] wave module: wrong integer format In-Reply-To: <1352732651.92.0.893248719316.issue16461@psf.upfronthosting.co.za> Message-ID: <1353120307.84.0.445865244215.issue16461@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Thanks to Christian for the report and to Terry for digging the spec. Patched. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 03:47:49 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 17 Nov 2012 02:47:49 +0000 Subject: [issue16453] Inconsistent dead weakref equality In-Reply-To: <1352657255.44.0.0509101223416.issue16453@psf.upfronthosting.co.za> Message-ID: <1353120469.31.0.0243816587597.issue16453@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 03:55:52 2012 From: report at bugs.python.org (Ned Deily) Date: Sat, 17 Nov 2012 02:55:52 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1353120952.91.0.988178289096.issue16480@psf.upfronthosting.co.za> Ned Deily added the comment: What problem are you trying to solve here? pyvenv is working as documented. And, although pyvenv does not claim to be compatible with the third-party virtualenv package, as far as I know virtualenv does not create links for local/bin and friends either. ---------- nosy: +ned.deily, vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 04:36:29 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 17 Nov 2012 03:36:29 +0000 Subject: [issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work with builtins Message-ID: <1353123389.46.0.245856363901.issue16490@psf.upfronthosting.co.za> New submission from Jes?s Cea Avi?n: Yesterday I was attending a conference about a MOCK like library and the speaker told us about some "inspect" functionalities not working correctly with builtins. For instance: """ Python 3.3.0 (default, Oct 2 2012, 02:07:16) [GCC 4.4.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import inspect >>> def f(a=None) : ... pass ... >>> inspect.getcallargs(f) {'a': None} >>> inspect.getargspec(f) ArgSpec(args=['a'], varargs=None, keywords=None, defaults=(None,)) >>> inspect.getcallargs(list) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.3/inspect.py", line 993, in getcallargs spec = getfullargspec(func) File "/usr/local/lib/python3.3/inspect.py", line 850, in getfullargspec raise TypeError('{!r} is not a Python function'.format(func)) TypeError: is not a Python function >>> inspect.getargspec(list) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.3/inspect.py", line 823, in getargspec getfullargspec(func) File "/usr/local/lib/python3.3/inspect.py", line 850, in getfullargspec raise TypeError('{!r} is not a Python function'.format(func)) TypeError: is not a Python function >>> """ Can we annotate builtins to support this?. What about types defined in CModules? ---------- messages: 175725 nosy: jcea priority: normal severity: normal status: open title: "inspect.getargspec()" and "inspect.getcallargs()" don't work with builtins versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 04:37:17 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 17 Nov 2012 03:37:17 +0000 Subject: [issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins In-Reply-To: <1353123389.46.0.245856363901.issue16490@psf.upfronthosting.co.za> Message-ID: <1353123437.74.0.119860141498.issue16490@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- title: "inspect.getargspec()" and "inspect.getcallargs()" don't work with builtins -> "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 04:37:29 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 17 Nov 2012 03:37:29 +0000 Subject: [issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins In-Reply-To: <1353123389.46.0.245856363901.issue16490@psf.upfronthosting.co.za> Message-ID: <1353123449.56.0.728186760875.issue16490@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 04:51:52 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 17 Nov 2012 03:51:52 +0000 Subject: [issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins In-Reply-To: <1353123389.46.0.245856363901.issue16490@psf.upfronthosting.co.za> Message-ID: <1353124312.79.0.4917749983.issue16490@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I am fully aware that the interpreter doesn't know how a method/function written in C is going to parse the parameter list/keywords. And that even if we solve this (for instance, with annotations that create wrappers calling "PyArg_Parse()" automatically), every C extension out there would need to support it too. Just brainstorming. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 07:10:28 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Nov 2012 06:10:28 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1353132628.69.0.557988964697.issue16480@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 09:09:11 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 17 Nov 2012 08:09:11 +0000 Subject: [issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions In-Reply-To: <1308929993.57.0.810230060664.issue12398@psf.upfronthosting.co.za> Message-ID: <1353139751.51.0.990800350202.issue12398@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I'm running into this on 2.7.3 with code that worked fine on 2.6.5. The problem appears to be caused by a 'Host' http header that has a unicode type for the hostname:port value. Encoding header values makes sense though I haven't yet examined the patch in detail. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 09:32:23 2012 From: report at bugs.python.org (Hans Larsen) Date: Sat, 17 Nov 2012 08:32:23 +0000 Subject: [issue16491] try-except-raise-bug Message-ID: <9C3C06E7F0934B209166A3DC454F8D19@HansPc> New submission from Hans Larsen: Med venlig hilsen: Hans Larsen Galgebakken S?nder 4-11A DK-2620 Albertslund Danmark/Danio I has found a bug in Python3.3 on Windows! Why are all 3 try-statements equal? I don?t see a ?..During handling of above exception, another exception occured: ...? Where is the bug! I use Windows 7 64bit! ---------- files: Hans.vcf, try-execpt-raise-bug.rtf messages: 175728 nosy: Jocjo priority: normal severity: normal status: open title: try-except-raise-bug Added file: http://bugs.python.org/file28007/Hans.vcf Added file: http://bugs.python.org/file28008/try-execpt-raise-bug.rtf _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: Hans.vcf Type: text/x-vcard Size: 71 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: try-execpt-raise-bug.rtf Type: application/rtf Size: 1131 bytes Desc: not available URL: From report at bugs.python.org Sat Nov 17 09:45:08 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 17 Nov 2012 08:45:08 +0000 Subject: [issue16491] try-except-raise-bug In-Reply-To: <9C3C06E7F0934B209166A3DC454F8D19@HansPc> Message-ID: <1353141908.92.0.00566519662649.issue16491@psf.upfronthosting.co.za> Mark Dickinson added the comment: Please could you give a coherent description of the behaviour you think is a bug. Include: (1) what you did, (2) what results you got (including tracebacks for exceptions), (3) what results you expected to get. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 10:34:03 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 17 Nov 2012 09:34:03 +0000 Subject: [issue16491] try-except-raise-bug In-Reply-To: <9C3C06E7F0934B209166A3DC454F8D19@HansPc> Message-ID: <1353144843.57.0.502887034296.issue16491@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's the contents of the .rtf file: PythonWin 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)] on win32. Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information. try: ... 1/0 ... except ZeroDivisionError as exp: ... raise TypeError('Divided by 0') ... Traceback (most recent call last): File "", line 4, in TypeError: Divided by 0 try: ... 1/0 ... except ZeroDivisionError as exp: ... raise TypeError('Divided by 0') from exp ... Traceback (most recent call last): File "", line 4, in TypeError: Divided by 0 try: ... 1/0 ... except ZeroDivisionError: ... raise TypeError('Divided by 0') from None ... Traceback (most recent call last): File "", line 4, in TypeError: Divided by 0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 11:06:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 17 Nov 2012 10:06:57 +0000 Subject: [issue16470] Backport set and dictionary comprehensions in tutorial to 2.7 In-Reply-To: <1352879017.7.0.397020464451.issue16470@psf.upfronthosting.co.za> Message-ID: <3Y3X685L44zRKp@mail.python.org> Roundup Robot added the comment: New changeset 2e2e7f398864 by Ezio Melotti in branch '2.7': #16470: mention set and dict comprehension in the tutorial. Patch by Yongzhi Pan. http://hg.python.org/cpython/rev/2e2e7f398864 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 11:08:06 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 17 Nov 2012 10:08:06 +0000 Subject: [issue16470] Backport set and dictionary comprehensions in tutorial to 2.7 In-Reply-To: <1352879017.7.0.397020464451.issue16470@psf.upfronthosting.co.za> Message-ID: <1353146886.54.0.909490762034.issue16470@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! I also rephrased the sentence on 3.x. ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 12:52:48 2012 From: report at bugs.python.org (Thomas Kluyver) Date: Sat, 17 Nov 2012 11:52:48 +0000 Subject: [issue12967] IDLE RPC Proxy for standard IO streams lacks 'errors' attribute In-Reply-To: <1315888690.96.0.966369051182.issue12967@psf.upfronthosting.co.za> Message-ID: <1353153168.52.0.767339103584.issue12967@psf.upfronthosting.co.za> Thomas Kluyver added the comment: It seems pretty arbitrary and newcomer-unfriendly to decide that Python doesn't support running setup.py inside IDLE. Exhibit A: confused newcomer trying to install distribute, getting unhelpful error message. http://stackoverflow.com/questions/13368040/ipython-installation-on-3-3-x64-errors ---------- nosy: +takluyver _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 13:15:21 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 17 Nov 2012 12:15:21 +0000 Subject: [issue16489] importlib find_loader returns a loader for a non existent module In-Reply-To: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za> Message-ID: <1353154521.33.0.273567475203.issue16489@psf.upfronthosting.co.za> Xavier de Gaye added the comment: I was bitten by this behavior while, new to the importlib library, I was trying to understand if one has to call recursively find_loader for a dotted module name (in the way it must be done when using imp.find_module), since the documentation on find_loader is not clear. My test environment happened to be at that time: foo.py mypackage __init__.py foo.py and at first I could not understand why find_loader('mypackage.foo') was returning a loader, while find_loader('logging.handlers') was returning None. It is fine with me to consider that this behavior does not have to be changed and to close this discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 13:40:05 2012 From: report at bugs.python.org (Stefan Krah) Date: Sat, 17 Nov 2012 12:40:05 +0000 Subject: [issue15783] decimal.localcontext(None) fails when using the C accelerator module In-Reply-To: <1345904683.65.0.863127291798.issue15783@psf.upfronthosting.co.za> Message-ID: <1353156005.43.0.604448981458.issue15783@psf.upfronthosting.co.za> Stefan Krah added the comment: New patch with docs. I've eliminated the unused context arg from canonical(). I can't possibly imagine that anyone uses it (or that anyone uses canonical() at all for that matter). ---------- Added file: http://bugs.python.org/file28009/issue15783-all-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 14:40:35 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sat, 17 Nov 2012 13:40:35 +0000 Subject: [issue16491] try-except-raise-bug In-Reply-To: <9C3C06E7F0934B209166A3DC454F8D19@HansPc> Message-ID: <1353159635.75.0.069813791903.issue16491@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Also, please report bugs in English. (read the devguide to learn more) ---------- nosy: +ramchandra.apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 14:45:07 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 17 Nov 2012 13:45:07 +0000 Subject: [issue16491] try-except-raise-bug In-Reply-To: <9C3C06E7F0934B209166A3DC454F8D19@HansPc> Message-ID: <1353159907.88.0.684136139556.issue16491@psf.upfronthosting.co.za> Martin v. L?wis added the comment: That looks like a bug/missing feature in PythonWin to me, which doesn't print __context__ properly. Note: I haven't tested PythonWin to confirm. Hans: is the output also incorrect in IDLE, or a command line shell? If no, then this isn't a bug in Python itself, but one in PythonWin. You can find the bug tracker at http://sourceforge.net/projects/pywin32/ Ramchandra: the bug report actually *is* in English, starting with "I has found ...". The first part is just Hans' postal address (which we don't really need here, but it doesn't hurt having it, either). ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 14:47:16 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sat, 17 Nov 2012 13:47:16 +0000 Subject: [issue16483] Make int(float('inf')) raise ValueError rather than OverflowError. In-Reply-To: <1353014232.58.0.902552345028.issue16483@psf.upfronthosting.co.za> Message-ID: <1353160036.28.0.674736087732.issue16483@psf.upfronthosting.co.za> Ramchandra Apte added the comment: +1 on OverflowError being a subclass of ValueError ---------- nosy: +ramchandra.apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 14:56:40 2012 From: report at bugs.python.org (Stefan Krah) Date: Sat, 17 Nov 2012 13:56:40 +0000 Subject: [issue16483] Make int(float('inf')) raise ValueError rather than OverflowError. In-Reply-To: <1353014232.58.0.902552345028.issue16483@psf.upfronthosting.co.za> Message-ID: <1353160600.43.0.879008137081.issue16483@psf.upfronthosting.co.za> Stefan Krah added the comment: I don't particularly like OverflowError in any situation where the potential overflow is detected *before* it actually happens. This is another example: >>> x = [1]*99999999999999999999 Traceback (most recent call last): File "", line 1, in OverflowError: cannot fit 'int' into an index-sized integer So I agree that ValueError is more appropriate, but it may not be worth fixing it. Closing as "won't fix" sounds fine to me. A general exception cleanup that reduces the number of exceptions that a user has to remember is tempting, but should probably be discussed on python-ideas. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:06:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 17 Nov 2012 14:06:40 +0000 Subject: [issue16483] Make int(float('inf')) raise ValueError rather than OverflowError. In-Reply-To: <1353014232.58.0.902552345028.issue16483@psf.upfronthosting.co.za> Message-ID: <1353161200.3.0.421137375382.issue16483@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:08:22 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 17 Nov 2012 14:08:22 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1353161302.29.0.3247173691.issue16480@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:15:18 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 17 Nov 2012 14:15:18 +0000 Subject: [issue16465] dict creation performance regression In-Reply-To: <1352823544.31.0.485629860142.issue16465@psf.upfronthosting.co.za> Message-ID: <1353161718.62.0.00433007576772.issue16465@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:17:27 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 17 Nov 2012 14:17:27 +0000 Subject: [issue15346] Tkinter extention modules have no documentation In-Reply-To: <1342198047.2.0.619885102312.issue15346@psf.upfronthosting.co.za> Message-ID: <1353161847.24.0.528141843819.issue15346@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:18:01 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 17 Nov 2012 14:18:01 +0000 Subject: [issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins In-Reply-To: <1353123389.46.0.245856363901.issue16490@psf.upfronthosting.co.za> Message-ID: <1353161881.25.0.426738010401.issue16490@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:19:53 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 17 Nov 2012 14:19:53 +0000 Subject: [issue16487] Allow ssl certificates to be speficfied from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1353161993.71.0.246209219223.issue16487@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:33:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 17 Nov 2012 14:33:47 +0000 Subject: [issue16489] importlib find_loader returns a loader for a non existent module In-Reply-To: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za> Message-ID: <3Y3f231RLnzRTV@mail.python.org> Roundup Robot added the comment: New changeset 358be7742377 by Brett Cannon in branch '3.3': Issue #16489: Make it clearer that importlib.find_loader() requires http://hg.python.org/cpython/rev/358be7742377 New changeset ba1d7447bd1b by Brett Cannon in branch 'default': Merge fix for #16489 from 3.3 http://hg.python.org/cpython/rev/ba1d7447bd1b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:35:06 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 14:35:06 +0000 Subject: [issue16487] Allow ssl certificates to be speficfied from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1353162906.06.0.608613305563.issue16487@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Can't right now. It's only relevant for pcbuild anyway so you can test > it for Unix if you want without fear. Don't worry, I always give my > patches a cleanup before committing them. I don't want to review a patch if you tell me that it has problematic stuff in it. Please first upload a cleaned up patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:38:51 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 14:38:51 +0000 Subject: [issue16492] Add a load_parents argument to importlib.find_loader() Message-ID: <1353163131.46.0.896555939151.issue16492@psf.upfronthosting.co.za> New submission from Brett Cannon: To make using importlib.find_loader() easier, there should be a flag that says to automatically import all parent packages for the desired submodule so as to not force the user to do it:: def find_loader(name, path=None, *, load_parents=False): ... That way people who are okay with loading some packages implicitly to get at a specific loader can do so without having to do boilerplate name.split('.'); import each parent code. Also means people don't have to worry about the path argument (unless they explicitly want to trigger loading from a different location). ---------- components: Library (Lib) messages: 175742 nosy: brett.cannon priority: low severity: normal stage: test needed status: open title: Add a load_parents argument to importlib.find_loader() type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:39:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Nov 2012 14:39:17 +0000 Subject: [issue12967] IDLE RPC Proxy for standard IO streams lacks 'errors' attribute In-Reply-To: <1315888690.96.0.966369051182.issue12967@psf.upfronthosting.co.za> Message-ID: <1353163157.33.0.592829728895.issue12967@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> duplicate status: open -> pending superseder: -> IDLE and Command line present different behavior for sys.stdin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:39:43 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 14:39:43 +0000 Subject: [issue16489] importlib find_loader returns a loader for a non existent module In-Reply-To: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za> Message-ID: <1353163183.75.0.475873284012.issue16489@psf.upfronthosting.co.za> Brett Cannon added the comment: I clarified the wording in 3.3 and default. I also opened issue #16492 to add a keyword-only argument to find_loader() to have it import parent packages for you if you so desire. ---------- resolution: invalid -> fixed stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:44:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Nov 2012 14:44:04 +0000 Subject: [issue9290] IDLE and Command line present different behavior for sys.stdin In-Reply-To: <1279417895.54.0.811089047738.issue9290@psf.upfronthosting.co.za> Message-ID: <1353163444.84.0.0923144935534.issue9290@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since all previous changes were dispense with tests, I don't see why it should become an obstacle for this patch. Please review. This patch provides a simple and reliable solution for some other issues (mentioned in msg172685 issues and issue12967). ---------- keywords: +needs review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:46:45 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 14:46:45 +0000 Subject: [issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins In-Reply-To: <1353123389.46.0.245856363901.issue16490@psf.upfronthosting.co.za> Message-ID: <1353163605.51.0.603868916136.issue16490@psf.upfronthosting.co.za> Brett Cannon added the comment: So at this point you should use inspect.signature(), not getfullargspec(). With that you could do this if you either allowed setting the __signature__ attribute and then provided code that would set it, made __signature__ a property that returned the Signature object if desired on a built-in, or come up with some automated way to take the argument string from PyArg_Parse() as you suggested. ---------- nosy: +brett.cannon, larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:55:25 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 14:55:25 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <1353164125.96.0.710629700448.issue12848@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Here is a patch for 3.x. It unify behavior of Python and C > implementations and unify behavior on 32- and 64-bit platforms. For > backward compatibility Pickler can pickle up to 2G data, but Unpickler > can unpickle up to 4G on 64-bit. I agree the right tradeoff is not easy to find, but I don't think we should introduce a regression in _pickle.c just for the sake of making it more consistent with pickle.py's bugs. So _pickle.c behaviour should probably be preserved, and pickle.py should be improved to accept unpickling 4G pickles. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:57:41 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 14:57:41 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <1353164261.36.0.0833266031974.issue12848@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'd like to add that anyone wanting to serialize large data will certainly be using _pickle (or its ancestor cPickle), since using pickle.py is probably excruciatingly slow. Meaning we should favour preserving _pickle/cPickle's behaviour over preserving pickle.py's behaviour here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 15:59:33 2012 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 17 Nov 2012 14:59:33 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1353164373.98.0.90693231859.issue16480@psf.upfronthosting.co.za> Vinay Sajip added the comment: > as far as I know virtualenv does not create links for local/bin and friends either. AFAIK it never used to, but it seems to do so since 1.6.3, in an attempt to fix a problem with the "posix_local" install scheme. I just tested with virtualenv 1.6.4, and when I create a venv in /tmp/venv, it creates a symbolic link /tmp/venv/local which points back to /tmp/venv. This behaviour causes problems with e.g. PyCharm, which shows ever-nesting directories ("turtles all the way down"), has led to later versions of virtualenv creating an actual directory and symlinking the venv's contents to entries in it. The question is: is this still necessary? Why exactly does "posix_local" need this, and does it need it for Python 3.3, 3.4 etc? Adding Carl to nosy, hoping he can shed some light on this. ---------- components: +2to3 (2.x to 3.x conversion tool), Benchmarks, Build, Cross-Build, ctypes -None nosy: +carljm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:00:50 2012 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 17 Nov 2012 15:00:50 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1353164450.63.0.651091674752.issue16480@psf.upfronthosting.co.za> Vinay Sajip added the comment: Whoops, mouse glitch led to components being wrongly set. ---------- components: +Library (Lib) -2to3 (2.x to 3.x conversion tool), Benchmarks, Build, Cross-Build, ctypes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:05:49 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 15:05:49 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1353164749.44.0.0521175876989.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: I think we are as close as we are going to get with PEP 3018 being implemented. if profile/cProfile ever get merged that is great (issue #16492), but I'm not holding my breath and thus I am closing this issue. ---------- dependencies: -Merge profile/cProfile in 3.n+1 resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:08:11 2012 From: report at bugs.python.org (Larry Hastings) Date: Sat, 17 Nov 2012 15:08:11 +0000 Subject: [issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins In-Reply-To: <1353123389.46.0.245856363901.issue16490@psf.upfronthosting.co.za> Message-ID: <1353164891.14.0.0671909880094.issue16490@psf.upfronthosting.co.za> Larry Hastings added the comment: I'm working on a solution for this--expect an announcement on c.l.p-d in, oh, a week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:08:18 2012 From: report at bugs.python.org (Larry Hastings) Date: Sat, 17 Nov 2012 15:08:18 +0000 Subject: [issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins In-Reply-To: <1353123389.46.0.245856363901.issue16490@psf.upfronthosting.co.za> Message-ID: <1353164898.54.0.404000739289.issue16490@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- assignee: -> larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:15:06 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 15:15:06 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1353165306.56.0.77820674464.issue15031@psf.upfronthosting.co.za> Brett Cannon added the comment: Another name for the method I thought of last night was parse_bytecode_container(). People like that more? That would lead to new terminology to distinguish bytecode ala dis module compared to bytecode file format ala importlib that makes it clear that what is written to bytecode files does not have to be an actual file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:26:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Nov 2012 15:26:57 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <1353166017.15.0.508332977056.issue12848@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The issue is not only in difference between Python and C implementations, but also between 32-bit and 64-bit. pickle.py on 32-bit accepts data up to 2G. pickle.py on 64-bit accepts data up to 2G. _pickle.c on 32-bit accepts data up to 2G. _pickle.c on 64-bit accepts data up to 4G. 3:1 for 2G. Current _pickle.c behavior is just not portable. Of course, I can rewrite the patch, expanding the limit to 4G on 64-bit if you insist. But I doubt that this is the best variant. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:39:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 17 Nov 2012 15:39:24 +0000 Subject: [issue16420] PEP 249 (DB-API 2.0) converted to reStructuredText In-Reply-To: <1352211401.03.0.321684940203.issue16420@psf.upfronthosting.co.za> Message-ID: <3Y3gTl2PJ6zRdV@mail.python.org> Roundup Robot added the comment: New changeset 333fe4c4897a by Ezio Melotti in branch '2.7': #16420: document a way to escape metacharacters in glob/fnmatch. http://hg.python.org/cpython/rev/333fe4c4897a New changeset 168f36c2b5ea by Ezio Melotti in branch '3.2': #16420: document a way to escape metacharacters in glob/fnmatch. http://hg.python.org/cpython/rev/168f36c2b5ea New changeset 2208061d863c by Ezio Melotti in branch '3.3': #16420: merge with 3.2. http://hg.python.org/cpython/rev/2208061d863c New changeset ff6d3fd9d08f by Ezio Melotti in branch 'default': #16420: merge with 3.3. http://hg.python.org/cpython/rev/ff6d3fd9d08f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:40:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 17 Nov 2012 15:40:21 +0000 Subject: [issue16420] PEP 249 (DB-API 2.0) converted to reStructuredText In-Reply-To: <1352211401.03.0.321684940203.issue16420@psf.upfronthosting.co.za> Message-ID: <1353166821.47.0.756978059698.issue16420@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- Removed message: http://bugs.python.org/msg175755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:41:26 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 17 Nov 2012 15:41:26 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <1353166886.63.0.042280526364.issue12848@psf.upfronthosting.co.za> Martin v. L?wis added the comment: IMO, the right solution is to finish PEP 3154, and support large strings in the format. For the time being, I'd claim that signed length in the existing implementations are just a bug, and that unsigned lengths are the intended semantics of these opcodes. I can't see anything that is gained by allowing negative lengths. OTOH, I also think that it won't matter much in practive: if you try to unpickle a string with more than 2GiB on a 32-bit system, chances are really high that you run out of memory. So whether any bug fix needs to be backported, I don't know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:50:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 17 Nov 2012 15:50:21 +0000 Subject: [issue16240] Document a way to escape metacharacters in glob/fnmatch In-Reply-To: <1350312209.74.0.651951907427.issue16240@psf.upfronthosting.co.za> Message-ID: <3Y3gTl2PJ6zRdV@mail.python.org> Ezio Melotti added the comment: New changeset 333fe4c4897a by Ezio Melotti in branch '2.7': #16420: document a way to escape metacharacters in glob/fnmatch. http://hg.python.org/cpython/rev/333fe4c4897a New changeset 168f36c2b5ea by Ezio Melotti in branch '3.2': #16420: document a way to escape metacharacters in glob/fnmatch. http://hg.python.org/cpython/rev/168f36c2b5ea New changeset 2208061d863c by Ezio Melotti in branch '3.3': #16420: merge with 3.2. http://hg.python.org/cpython/rev/2208061d863c New changeset ff6d3fd9d08f by Ezio Melotti in branch 'default': #16420: merge with 3.3. http://hg.python.org/cpython/rev/ff6d3fd9d08f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:52:47 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 15:52:47 +0000 Subject: [issue16493] Document the 'optimize' argument to compile() Message-ID: <1353167567.95.0.716171753234.issue16493@psf.upfronthosting.co.za> New submission from Brett Cannon: Looks like Georg added the flag in 2010 after Python 2.7 was already out, so this doesn't need to be backported. The possible values are: -1 : optimization level the interpreter is already executing with 0 : no optimization 1 : -O 2 : -OO ---------- assignee: docs at python components: Documentation messages: 175757 nosy: brett.cannon, docs at python priority: normal severity: normal stage: needs patch status: open title: Document the 'optimize' argument to compile() versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:53:09 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 17 Nov 2012 15:53:09 +0000 Subject: [issue16240] Document a way to escape metacharacters in glob/fnmatch In-Reply-To: <1350312209.74.0.651951907427.issue16240@psf.upfronthosting.co.za> Message-ID: <1353167589.54.0.388967756151.issue16240@psf.upfronthosting.co.za> Ezio Melotti added the comment: Finalized! ---------- assignee: docs at python -> ezio.melotti priority: high -> normal resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:54:47 2012 From: report at bugs.python.org (Kushal Das) Date: Sat, 17 Nov 2012 15:54:47 +0000 Subject: [issue16493] Document the 'optimize' argument to compile() In-Reply-To: <1353167567.95.0.716171753234.issue16493@psf.upfronthosting.co.za> Message-ID: <1353167687.15.0.643862894462.issue16493@psf.upfronthosting.co.za> Kushal Das added the comment: I will submit a patch if no one is working on it. ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:54:57 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 15:54:57 +0000 Subject: [issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object In-Reply-To: <1344732276.83.0.543554641885.issue15627@psf.upfronthosting.co.za> Message-ID: <1353167697.31.0.196804047409.issue15627@psf.upfronthosting.co.za> Brett Cannon added the comment: We might want an keyword-only 'optimize' argument that maps to the compile() function's 'optimize' argument. ---------- dependencies: +Document the 'optimize' argument to compile() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 16:59:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Nov 2012 15:59:35 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <1353167975.3.0.968233832103.issue12848@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch for 3.x which extends supported size to 4G on 64-bit. ---------- Added file: http://bugs.python.org/file28010/pickle_nonportable_size.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:00:17 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 16:00:17 +0000 Subject: [issue16494] Method on importlib.SourceLoader for creating bytecode file format/container Message-ID: <1353168017.12.0.0693705888433.issue16494@psf.upfronthosting.co.za> New submission from Brett Cannon: With issue #15031 providing a way to take a bytecode file and get a code object out of it, there should probably be a comparable method that takes a code object and a path stats dict and returns the bytes to write out to a file. This could also be a slight performance win for subclasses of SourceLoader which can read bytecode files but not write them (e.g. zip files where the cost of modifying a zip file is too high). That way the method could raise NotImplementedError (or return None) to signify it doesn't want anything written out by SourceLoader.get_code() and thus skip the entire step of preparing the bytecode file bytes instead of what happens now where set_data() raises NotImplementedError after the whole set of bytes is constructed. More importantly, it would clean up py_compile once issue #15627 is in with an 'optimize' flag as py_compile.compile() would essentially become ``source = loader.get_source(...); code = loader.compile_source(source, optimize=...); pyc_bytes = loader.create_bytecode_file(code, loader.path_stats(...))``. Otherwise get_code() will need to grow an 'optimize' flag and that doesn't seem necessary. ---------- components: Library (Lib) messages: 175762 nosy: brett.cannon priority: normal severity: normal stage: test needed status: open title: Method on importlib.SourceLoader for creating bytecode file format/container type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:05:36 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 16:05:36 +0000 Subject: [issue16494] Add a ethod on importlib.SourceLoader for creating bytecode file format/container In-Reply-To: <1353168017.12.0.0693705888433.issue16494@psf.upfronthosting.co.za> Message-ID: <1353168336.3.0.937558352879.issue16494@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: Method on importlib.SourceLoader for creating bytecode file format/container -> Add a ethod on importlib.SourceLoader for creating bytecode file format/container _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:05:52 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 16:05:52 +0000 Subject: [issue16494] Add a method on importlib.SourceLoader for creating bytecode file format/container In-Reply-To: <1353168017.12.0.0693705888433.issue16494@psf.upfronthosting.co.za> Message-ID: <1353168352.95.0.925037082186.issue16494@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: Add a ethod on importlib.SourceLoader for creating bytecode file format/container -> Add a method on importlib.SourceLoader for creating bytecode file format/container _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:05:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Nov 2012 16:05:56 +0000 Subject: [issue16240] Document a way to escape metacharacters in glob/fnmatch In-Reply-To: <1350312209.74.0.651951907427.issue16240@psf.upfronthosting.co.za> Message-ID: <1353168356.49.0.678612646464.issue16240@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you, Ezio. Can we now continue with issue8402? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:07:08 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 16:07:08 +0000 Subject: [issue16213] Expose private functions in marshal used by importlib In-Reply-To: <1350054815.58.0.751298087125.issue16213@psf.upfronthosting.co.za> Message-ID: <1353168428.55.0.939149776229.issue16213@psf.upfronthosting.co.za> Brett Cannon added the comment: I've decided against this as issues #15031 and #16494 will alleviate the need to expose these functions. ---------- dependencies: -Split .pyc parsing from module loading resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:14:07 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 16:14:07 +0000 Subject: [issue667770] import C API mess Message-ID: <1353168847.15.0.35858456437.issue667770@psf.upfronthosting.co.za> Brett Cannon added the comment: The story of impports from the C level is much more sane than back in the 2.6 days thanks to PyImport_Import, PyImport_ImportModuleLevelObject, and PyImport_ImportModuleLevel. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:15:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 17 Nov 2012 16:15:05 +0000 Subject: [issue8402] Add a function to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1353168905.37.0.763472479424.issue8402@psf.upfronthosting.co.za> Ezio Melotti added the comment: The workaround is now documented. I'm still not sure if this should still be added, or if it should be closed as rejected now that the workaround is documented. A third option would be adding it as a recipe in the doc, given that the whole functions boils down to a single re.sub (the user can take care of picking the bytes/str regex depending on his input). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:21:11 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 16:21:11 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1353169271.7.0.0713844661458.issue10224@psf.upfronthosting.co.za> Brett Cannon added the comment: What exactly is blocking this? From looking on PyPI it seems Jinja2, Pygments, and Sphinx have all been ported to Python 3 at this point. Is it a matter of porting any custom code in Doc/ to Python 3 and then updating the Makefile to grab Python 3 versions of the required libraries? ---------- dependencies: -Fix doctest runable examples in python manual _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:44:58 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 16:44:58 +0000 Subject: [issue15292] import hook behavior documentation improvement In-Reply-To: <1341743900.84.0.0628684352519.issue15292@psf.upfronthosting.co.za> Message-ID: <1353170698.14.0.193698346418.issue15292@psf.upfronthosting.co.za> Brett Cannon added the comment: Closing as "works for me" due to lack of reply from OP. ---------- resolution: -> works for me status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:45:31 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 16:45:31 +0000 Subject: [issue15623] Init time relative imports no longer work from __init__.so modules In-Reply-To: <1344697325.25.0.880049566038.issue15623@psf.upfronthosting.co.za> Message-ID: <1353170731.95.0.146290052295.issue15623@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:46:05 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 16:46:05 +0000 Subject: [issue13572] import _curses fails because of UnicodeDecodeError('utf8' codec can't decode byte 0xb5 ...') on ARM Ubuntu 3.x In-Reply-To: <1323524849.05.0.773120918069.issue13572@psf.upfronthosting.co.za> Message-ID: <1353170765.76.0.822239072514.issue13572@psf.upfronthosting.co.za> Brett Cannon added the comment: Should we just close this, Barry? ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:51:34 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 16:51:34 +0000 Subject: [issue4347] Circular dependency causes SystemError when adding new syntax In-Reply-To: <1227022091.75.0.852526924329.issue4347@psf.upfronthosting.co.za> Message-ID: <1353171094.89.0.210187309424.issue4347@psf.upfronthosting.co.za> Brett Cannon added the comment: This still an issue? ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:55:39 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 16:55:39 +0000 Subject: [issue4182] warnings.warn shows the wrong filename and line number for stacklevel of 0 In-Reply-To: <1224712526.35.0.138565894307.issue4182@psf.upfronthosting.co.za> Message-ID: <1353171339.11.0.810197200888.issue4182@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:56:26 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 17 Nov 2012 16:56:26 +0000 Subject: [issue11981] dupe self.fp.tell() in zipfile.ZipFile.writestr In-Reply-To: <1304354217.95.0.422937158098.issue11981@psf.upfronthosting.co.za> Message-ID: <3Y3jBd2kP6zRgY@mail.python.org> Roundup Robot added the comment: New changeset d51665f9a416 by Ezio Melotti in branch 'default': #11981: remove duplicate line. Patch by Johan Euphrosine. http://hg.python.org/cpython/rev/d51665f9a416 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:57:00 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 17 Nov 2012 16:57:00 +0000 Subject: [issue11981] dupe self.fp.tell() in zipfile.ZipFile.writestr In-Reply-To: <1304354217.95.0.422937158098.issue11981@psf.upfronthosting.co.za> Message-ID: <1353171420.81.0.344913700871.issue11981@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:57:23 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 16:57:23 +0000 Subject: [issue6526] importlib.import_module affects permissions of .pyc files subsequently created by import In-Reply-To: <1248115523.66.0.058614511154.issue6526@psf.upfronthosting.co.za> Message-ID: <1353171443.59.0.56628438461.issue6526@psf.upfronthosting.co.za> Brett Cannon added the comment: At some point this was fixed in importlib. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 17:58:40 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 17 Nov 2012 16:58:40 +0000 Subject: [issue16456] UnicodeDecodeError thrown for 'encode' operation on string In-Reply-To: <1352674296.04.0.101357421426.issue16456@psf.upfronthosting.co.za> Message-ID: <1353171520.41.0.378368011542.issue16456@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:01:46 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 17:01:46 +0000 Subject: [issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c In-Reply-To: <1273069856.93.0.435136167669.issue8627@psf.upfronthosting.co.za> Message-ID: <1353171706.88.0.654271193979.issue8627@psf.upfronthosting.co.za> Brett Cannon added the comment: A quick search through typeobject.c in 2.7 didn't show any PyErr_WarnPy3k calls that didn't have their return value checked or propagated. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:06:15 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 17:06:15 +0000 Subject: [issue2744] Fix test_cProfile In-Reply-To: <1209770110.61.0.304892387875.issue2744@psf.upfronthosting.co.za> Message-ID: <1353171974.99.0.576122871596.issue2744@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:07:19 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 17:07:19 +0000 Subject: [issue8585] zipimporter.find_module is untested In-Reply-To: <1272676536.77.0.29287206537.issue8585@psf.upfronthosting.co.za> Message-ID: <1353172039.12.0.967384190279.issue8585@psf.upfronthosting.co.za> Brett Cannon added the comment: Been longer than a weekend. =) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:09:25 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 17 Nov 2012 17:09:25 +0000 Subject: [issue12967] IDLE RPC Proxy for standard IO streams lacks 'errors' attribute In-Reply-To: <1315888690.96.0.966369051182.issue12967@psf.upfronthosting.co.za> Message-ID: <1353172165.12.0.706048838567.issue12967@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thomas, please re-read the messages starting msg145215 where it was decided that this is not an issue about setup.py in particular. There appears to now only be a problem if IDLE is run without a subprocess, and that option may disappear in 3.4 as unneeded. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:09:42 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 17:09:42 +0000 Subject: [issue850482] Enhance frame handing in warnings.warn() Message-ID: <1353172182.24.0.665763255769.issue850482@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:10:59 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 17:10:59 +0000 Subject: [issue9761] stale .pyc files aren't cleaned out In-Reply-To: <1283542384.36.0.244541121538.issue9761@psf.upfronthosting.co.za> Message-ID: <1353172259.69.0.934019145115.issue9761@psf.upfronthosting.co.za> Brett Cannon added the comment: Never heard back from OP. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:12:29 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 17:12:29 +0000 Subject: [issue16487] Allow ssl certificates to be speficfied from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1353172349.13.0.488098113603.issue16487@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, without looking too much at the patch, I think it would be cleaner to let the certificate functions accept file-like objects, rather than adding keydata/certdata arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:12:57 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 17:12:57 +0000 Subject: [issue1539925] warnings in interactive sessions Message-ID: <1353172377.2.0.423487057924.issue1539925@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:14:33 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 17:14:33 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <1353172473.6.0.105063000869.issue12848@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > OTOH, I also think that it won't matter much in practive: if you try to > unpickle a string with more than 2GiB on a 32-bit system, chances are > really high that you run out of memory. Agreed. I think this issue is mostly about 64-bit systems, even though we may want to fix to apply to 32-bit systems as well, if it doesn't make things more complicated. And, yes, PEP 3154 should be finished, but it is currently stalled in issue 15642. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:19:11 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 17 Nov 2012 17:19:11 +0000 Subject: [issue12967] IDLE RPC Proxy for standard IO streams lacks 'errors' attribute In-Reply-To: <1315888690.96.0.966369051182.issue12967@psf.upfronthosting.co.za> Message-ID: <1353172751.51.0.296375495169.issue12967@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Even though the title of #9290 says stdin, the patches are for all std** streams, so should cover this. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:19:22 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 17 Nov 2012 17:19:22 +0000 Subject: [issue12967] IDLE RPC Proxy for standard IO streams lacks 'errors' attribute In-Reply-To: <1315888690.96.0.966369051182.issue12967@psf.upfronthosting.co.za> Message-ID: <1353172762.8.0.597662279583.issue12967@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: needs patch -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:21:27 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Nov 2012 17:21:27 +0000 Subject: [issue9893] Removing the Misc/Vim/ files In-Reply-To: <1284827686.39.0.471855984875.issue9893@psf.upfronthosting.co.za> Message-ID: <1353172887.94.0.107940824725.issue9893@psf.upfronthosting.co.za> ?ric Araujo added the comment: I had forgotten that README.Emacs was moved to the devguide. Adding doc about Vim support can be another bug report. Thanks. ---------- stage: needs patch -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:23:15 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 17 Nov 2012 17:23:15 +0000 Subject: [issue16489] importlib find_loader returns a loader for a non existent module In-Reply-To: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za> Message-ID: <1353172995.49.0.00301116917633.issue16489@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Thanks, this is great! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:24:55 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 17 Nov 2012 17:24:55 +0000 Subject: [issue8585] zipimporter.find_module is untested In-Reply-To: <1272676536.77.0.29287206537.issue8585@psf.upfronthosting.co.za> Message-ID: <1353173095.59.0.646954318594.issue8585@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:30:03 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Nov 2012 17:30:03 +0000 Subject: [issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules In-Reply-To: <1353062789.06.0.457819088795.issue16484@psf.upfronthosting.co.za> Message-ID: <1353173403.23.0.702060935642.issue16484@psf.upfronthosting.co.za> ?ric Araujo added the comment: A patch and test making sure that pydoc generates the right URIs for upper-case modules would help. ---------- assignee: docs at python -> nosy: +eric.araujo -docs at python stage: -> needs patch title: Missing/broken documentation redirect for http://docs.python.org/library/xml.etree.ElementTree -> pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules type: -> behavior versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:30:59 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 17 Nov 2012 17:30:59 +0000 Subject: [issue16157] Irrelevant references to Misc/News In-Reply-To: <1349628852.45.0.324394497616.issue16157@psf.upfronthosting.co.za> Message-ID: <3Y3jyV4DLrzN9n@mail.python.org> Roundup Robot added the comment: New changeset d6cd283bb4c2 by Ezio Melotti in branch '3.3': #16157: fix links in the whatsnew files. http://hg.python.org/cpython/rev/d6cd283bb4c2 New changeset 9a08c9443c54 by Ezio Melotti in branch 'default': #16157: merge with 3.3. http://hg.python.org/cpython/rev/9a08c9443c54 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:32:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 17 Nov 2012 17:32:05 +0000 Subject: [issue16157] Irrelevant references to Misc/News In-Reply-To: <1349628852.45.0.324394497616.issue16157@psf.upfronthosting.co.za> Message-ID: <1353173525.55.0.655896565158.issue16157@psf.upfronthosting.co.za> Ezio Melotti added the comment: This should be fixed now. I linked to http://hg.python.org/cpython/file/3.2/Misc/NEWS for the 3.2 whatsnew and to http://docs.python.org/3.3/whatsnew/changelog.html and http://docs.python.org/3.4/whatsnew/changelog.html for 3.3 and 3.4 respectively. ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:33:20 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 17 Nov 2012 17:33:20 +0000 Subject: [issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c In-Reply-To: <1273069856.93.0.435136167669.issue8627@psf.upfronthosting.co.za> Message-ID: <1353173600.83.0.947865642135.issue8627@psf.upfronthosting.co.za> Mark Dickinson added the comment: There's still a case where the return value isn't properly propagated: it's the one marked by an 'XXX' in the source. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:33:32 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 17:33:32 +0000 Subject: [issue8585] zipimporter.find_module is untested In-Reply-To: <1272676536.77.0.29287206537.issue8585@psf.upfronthosting.co.za> Message-ID: <1353173612.72.0.524795047601.issue8585@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- versions: -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:36:02 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 17 Nov 2012 17:36:02 +0000 Subject: =?utf-8?q?=5Bissue13424=5D_Add_examples_for_open=E2=80=99s_new_opener_arg?= =?utf-8?q?ument?= In-Reply-To: <1321609933.89.0.531165464334.issue13424@psf.upfronthosting.co.za> Message-ID: <1353173762.53.0.412508697733.issue13424@psf.upfronthosting.co.za> Ezio Melotti added the comment: There's also a Sphinx warning that should be fixed: 3.3/Doc/library/functions.rst:955: WARNING: undefined label: dir_fd (if the link has no caption the label must precede a section header) ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:37:20 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 17:37:20 +0000 Subject: [issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c In-Reply-To: <1273069856.93.0.435136167669.issue8627@psf.upfronthosting.co.za> Message-ID: <1353173840.99.0.113169463408.issue8627@psf.upfronthosting.co.za> Brett Cannon added the comment: I can't find it, Mark, after searching through every XXX marker in a 2.7 checkout of Objects/typeobject.c . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:39:49 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 17 Nov 2012 17:39:49 +0000 Subject: [issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c In-Reply-To: <1273069856.93.0.435136167669.issue8627@psf.upfronthosting.co.za> Message-ID: <1353173989.41.0.328677307651.issue8627@psf.upfronthosting.co.za> Mark Dickinson added the comment: It's line 3912 in the current source. The warning is always cleared, which is the wrong thing to do if warnings should be turned into exceptions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:42:38 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 17 Nov 2012 17:42:38 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1353174158.5.0.488112100078.issue10224@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- dependencies: +upgrade to sphinx 1.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:47:11 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 17:47:11 +0000 Subject: [issue8787] warnings inside PyRun_SimpleString() display argv[1] In-Reply-To: <1274536832.39.0.220188636264.issue8787@psf.upfronthosting.co.za> Message-ID: <1353174431.88.0.697688493593.issue8787@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:49:46 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 17:49:46 +0000 Subject: [issue1545463] New-style classes fail to cleanup attributes Message-ID: <1353174586.68.0.0348097123558.issue1545463@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:51:26 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 17:51:26 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1353174686.07.0.0381633988982.issue2953@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 18:52:13 2012 From: report at bugs.python.org (Jan Duzinkiewicz) Date: Sat, 17 Nov 2012 17:52:13 +0000 Subject: [issue16386] imp.find_module does not specify registry key it searches on windows In-Reply-To: <1351859767.89.0.815277454803.issue16386@psf.upfronthosting.co.za> Message-ID: <1353174733.06.0.592460924059.issue16386@psf.upfronthosting.co.za> Jan Duzinkiewicz added the comment: Ok, didn't knew much about importlib, I can work on a patch but have a few questions/suggestions: 1. For importlib, simply referencing the "Using on Windows" guide imo won't be ok - the importlib sources show that the key being used is "Software\\Python\\PythonCore\\{sys_version}\\Modules\\{fullname}", while guide refers to \\PythonPath. Am I missing something here? 2. Considering that importlib code is Python, easy to retrieve without having C sources (which is common case on Windows) - do you think this should go into 3.3 docs? 3. Do you think the current version of the patch is applicable to Python 2.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 19:00:00 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 17 Nov 2012 18:00:00 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <3Y3kbz4KZ3zRSs@mail.python.org> Roundup Robot added the comment: New changeset 27c20650aeab by Antoine Pitrou in branch 'default': Issue #14631: Add a new :class:`weakref.WeakMethod` to simulate weak references to bound methods. http://hg.python.org/cpython/rev/27c20650aeab ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 19:01:46 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 18:01:46 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <1353175306.04.0.174103915148.issue14631@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed, thank you! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 19:07:01 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 17 Nov 2012 18:07:01 +0000 Subject: [issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c In-Reply-To: <1273069856.93.0.435136167669.issue8627@psf.upfronthosting.co.za> Message-ID: <1353175621.86.0.335563838987.issue8627@psf.upfronthosting.co.za> Mark Dickinson added the comment: To clarify, here's the bug: the following code should raise an exception, but doesn't: iwasawa:cpython mdickinson$ ./python.exe -3 Python 2.7.3+ (2.7:333fe4c4897a, Nov 17 2012, 18:01:00) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import warnings; warnings.filterwarnings("error") >>> class A(object): ... def __eq__(self, other): ... return False ... Without "warnings.filterwarnings("error")", the warning gets issued as expected: iwasawa:cpython mdickinson$ ./python.exe -3 Python 2.7.3+ (2.7:333fe4c4897a, Nov 17 2012, 18:01:00) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> class A(object): ... def __eq__(self, object): ... return False ... __main__:1: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x Brett, is it okay to re-open this? Perhaps a change of title would help? Or I can open a new issue for the remaining problem, if you think that's better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 19:07:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Nov 2012 18:07:04 +0000 Subject: [issue15861] ttk.Treeview "unmatched open brace in list" In-Reply-To: <1346794903.35.0.326071924778.issue15861@psf.upfronthosting.co.za> Message-ID: <1353175624.45.0.934784979204.issue15861@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. ---------- Added file: http://bugs.python.org/file28011/tkinter_quoting_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 19:39:45 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 18:39:45 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1353177585.19.0.673877491498.issue4473@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hello, Here are some comments about the patches: 1) poplib_01_socket_shutdown_v3.diff: looks fine to me 2) poplib_02_server_capabilities_v3.diff: - please try to follow PEP 8 (i.e. `capa = {}` not `capa={}`) - I think the capa() result should be a dict mapping str keys to str values (not bytes), since that part of the POP3 protocol seems to have a well-defined character set (ASCII) 3) poplib_03_starttls_v3.diff: - same comment about PEP 8 - why did you change the signature of the _create_socket() method? it looks gratuitous - the new method should be called starttls() as in other modules, not stls() - starttls() should only take a context argument; no need to support separate keyfile and certfile arguments - what is the point of catching errors like this: + except error_proto as _err: + resp = _err ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 20:18:28 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 17 Nov 2012 19:18:28 +0000 Subject: [issue16451] Remove duplication between slice_indices and compute_slice_indices In-Reply-To: <1352559451.13.0.963654733597.issue16451@psf.upfronthosting.co.za> Message-ID: <3Y3mLW6XRxzRn0@mail.python.org> Roundup Robot added the comment: New changeset e9af9b1ca67e by Mark Dickinson in branch 'default': Issue #16451: Refactor to remove duplication between range and slice in slice index computations. http://hg.python.org/cpython/rev/e9af9b1ca67e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 20:22:43 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 17 Nov 2012 19:22:43 +0000 Subject: [issue16451] Remove duplication between slice_indices and compute_slice_indices In-Reply-To: <1352559451.13.0.963654733597.issue16451@psf.upfronthosting.co.za> Message-ID: <1353180163.82.0.970057955889.issue16451@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 20:23:26 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 17 Nov 2012 19:23:26 +0000 Subject: [issue14794] slice.indices raises OverflowError In-Reply-To: <1336863098.54.0.753598684211.issue14794@psf.upfronthosting.co.za> Message-ID: <1353180206.53.0.692450259736.issue14794@psf.upfronthosting.co.za> Mark Dickinson added the comment: For the refactoring, see issue #16451 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 21:01:00 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 20:01:00 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353182460.7.0.88146186681.issue16475@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I agree that restoring the string interning behaviour would be a good thing. However, I don't agree that supporting recursive objects and instantiation is useful. marshal is specialized for code objects, and you shouldn't find any recursive constants there. As for the size of pyc files, who cares? Memory footprint may be useful to shrink (especially for cache efficiency reasons), but I don't see why we should try to reduce the size of on-disk bytecode. And if we do, it would probably be simpler to zlib-compress them. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 21:02:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Nov 2012 20:02:13 +0000 Subject: [issue16477] tarfile fails to close file handles in case of exception In-Reply-To: <1353098656.44.0.0164561293028.issue16477@psf.upfronthosting.co.za> Message-ID: <201211172201.57570.storchaka@gmail.com> Serhiy Storchaka added the comment: > Would "with source = self.extractfile(tarinfo):" work? No. extractfile() can return an instance of custom class. But in 3.x this not used at all. Here are patches for 2.7 and 3.x. ---------- keywords: +patch Added file: http://bugs.python.org/file28012/tarfile_fd_leaks-2.7.patch Added file: http://bugs.python.org/file28013/tarfile_fd_leaks.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 457c0c9c7893 Lib/tarfile.py --- a/Lib/tarfile.py Thu Nov 15 07:10:27 2012 +0100 +++ b/Lib/tarfile.py Sat Nov 17 21:57:57 2012 +0200 @@ -1987,9 +1987,8 @@ # Append the tar header and data to the archive. if tarinfo.isreg(): - f = bltn_open(name, "rb") - self.addfile(tarinfo, f) - f.close() + with bltn_open(name, "rb") as f: + self.addfile(tarinfo, f) elif tarinfo.isdir(): self.addfile(tarinfo) @@ -2197,10 +2196,11 @@ """Make a file called targetpath. """ source = self.extractfile(tarinfo) - target = bltn_open(targetpath, "wb") - copyfileobj(source, target) - source.close() - target.close() + try: + with bltn_open(targetpath, "wb") as target: + copyfileobj(source, target) + finally: + source.close() def makeunknown(self, tarinfo, targetpath): """Make a file from a TarInfo object with an unknown type -------------- next part -------------- diff -r e9af9b1ca67e Lib/tarfile.py --- a/Lib/tarfile.py Sat Nov 17 19:18:10 2012 +0000 +++ b/Lib/tarfile.py Sat Nov 17 21:37:45 2012 +0200 @@ -1924,9 +1924,8 @@ # Append the tar header and data to the archive. if tarinfo.isreg(): - f = bltn_open(name, "rb") - self.addfile(tarinfo, f) - f.close() + with bltn_open(name, "rb") as f: + self.addfile(tarinfo, f) elif tarinfo.isdir(): self.addfile(tarinfo) @@ -2131,16 +2130,15 @@ """ source = self.fileobj source.seek(tarinfo.offset_data) - target = bltn_open(targetpath, "wb") - if tarinfo.sparse is not None: - for offset, size in tarinfo.sparse: - target.seek(offset) - copyfileobj(source, target, size) - else: - copyfileobj(source, target, tarinfo.size) - target.seek(tarinfo.size) - target.truncate() - target.close() + with bltn_open(targetpath, "wb") as target: + if tarinfo.sparse is not None: + for offset, size in tarinfo.sparse: + target.seek(offset) + copyfileobj(source, target, size) + else: + copyfileobj(source, target, tarinfo.size) + target.seek(tarinfo.size) + target.truncate() def makeunknown(self, tarinfo, targetpath): """Make a file from a TarInfo object with an unknown type From report at bugs.python.org Sat Nov 17 21:10:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 17 Nov 2012 20:10:24 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <3Y3nVR6x6FzRR3@mail.python.org> Roundup Robot added the comment: New changeset 47ae836aa221 by Antoine Pitrou in branch 'default': Issue #2771: !! http://hg.python.org/test/rev/47ae836aa221 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 21:17:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 17 Nov 2012 20:17:14 +0000 Subject: [issue15379] Charmap decoding of no-BMP characters In-Reply-To: <1342512958.35.0.341191772548.issue15379@psf.upfronthosting.co.za> Message-ID: <3Y3nfL1r43zRlM@mail.python.org> Roundup Robot added the comment: New changeset c7ce91756472 by Antoine Pitrou in branch '2.7': Issue #15379: Fix passing of non-BMP characters as integers for the charmap decoder (already working as unicode strings). http://hg.python.org/cpython/rev/c7ce91756472 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 21:17:36 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 20:17:36 +0000 Subject: [issue15379] Charmap decoding of no-BMP characters In-Reply-To: <1342512958.35.0.341191772548.issue15379@psf.upfronthosting.co.za> Message-ID: <1353183456.92.0.716295188726.issue15379@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the backport, committed! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 21:17:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 20:17:42 +0000 Subject: [issue15379] Charmap decoding of no-BMP characters In-Reply-To: <1342512958.35.0.341191772548.issue15379@psf.upfronthosting.co.za> Message-ID: <1353183462.16.0.841545513915.issue15379@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: commit review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 21:19:00 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 17 Nov 2012 20:19:00 +0000 Subject: [issue9742] Python 2.7: math module fails to build on Solaris 9 In-Reply-To: <1283438135.42.0.361314007633.issue9742@psf.upfronthosting.co.za> Message-ID: <3Y3nhM3zYyzRmV@mail.python.org> Roundup Robot added the comment: New changeset ff300ccd119d by Mark Dickinson in branch '2.7': Issue #9742: Sneaky fix for build failure on Solaris 9. http://hg.python.org/cpython/rev/ff300ccd119d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 21:21:36 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 17 Nov 2012 20:21:36 +0000 Subject: [issue9742] Python 2.7: math module fails to build on Solaris 9 In-Reply-To: <1283438135.42.0.361314007633.issue9742@psf.upfronthosting.co.za> Message-ID: <1353183696.6.0.864913262646.issue9742@psf.upfronthosting.co.za> Mark Dickinson added the comment: Matt: thanks for testing. Patch applied---this should be fixed now. I'm a little bit nervous about this one, since it may introduce new failures on systems with a buggy round implementation (Linux / alpha, for example). Still, we have tests for that, so I'll just watch the buildbots for a bit, and possibly revert this fix if it proves necessary. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 21:24:40 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sat, 17 Nov 2012 20:24:40 +0000 Subject: [issue16487] Allow ssl certificates to be speficfied from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1353183880.83.0.631631122856.issue16487@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: The please don't. I'm actually growing tired of the way you seem to always latch onto every submission I make almost with hostility. I will find someone else to look this over. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 21:44:23 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Nov 2012 20:44:23 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1353185063.57.0.891703961273.issue2953@psf.upfronthosting.co.za> ?ric Araujo added the comment: Eric, as you know importlib, can you comment about this? If zipimport now works with the invalidate_caches system, then we do have a documented way of clearing the cache, and I would recommend closing this bug (the existing attribute should stay for compat, but we should not document or test it more IMO). ---------- assignee: tarek -> nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 21:53:07 2012 From: report at bugs.python.org (Eric Snow) Date: Sat, 17 Nov 2012 20:53:07 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1353185587.71.0.287674731706.issue2953@psf.upfronthosting.co.za> Eric Snow added the comment: I'll take a look but can't say when. My wife's is having a baby in the next couple days so I'm a bit swamped. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 22:12:52 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 21:12:52 +0000 Subject: [issue16487] Allow ssl certificates to be speficfied from memory rather than files. In-Reply-To: <1353183880.83.0.631631122856.issue16487@psf.upfronthosting.co.za> Message-ID: <1353186722.3331.26.camel@localhost.localdomain> Antoine Pitrou added the comment: > The please don't. I'm actually growing tired of the way you seem to > always latch onto every submission I make almost with hostility. I > will find someone else to look this over. I fully realize my reply was blunt. But perhaps you could try to understand that people care about the quality of the codebase and it is why they care about reviewing patches before letting them in. Asking for reviews of patches that you *know* contain unneeded cruft is rude. Disregarding their comments and saying "I'll ask someone else because I don't want to deal with you anymore" is even worse. This certainly happens often to you, because (IME) you are often pushy with your patches. So, yes, you must expect a certain amount of defensive replies when being so. Just be prepared to deal with them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 22:28:01 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Nov 2012 21:28:01 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1353187681.05.0.122387218487.issue2953@psf.upfronthosting.co.za> ?ric Araujo added the comment: No problem (and congratulations :) ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 22:29:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 17 Nov 2012 21:29:49 +0000 Subject: [issue16495] bytes_decode() unnecessarily examines encoding Message-ID: <1353187789.37.0.881944433109.issue16495@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The code below in bytes_decode() is unnecessary: if (encoding == NULL) encoding = PyUnicode_GetDefaultEncoding(); (from http://hg.python.org/cpython/file/e9af9b1ca67e/Objects/bytesobject.c#l2230 ) because PyUnicode_FromEncodedObject() already handles the case of NULL encoding (inside normalize_encoding() called by PyUnicode_Decode()): http://hg.python.org/cpython/file/e9af9b1ca67e/Objects/unicodeobject.c#l2811 ---------- components: Interpreter Core keywords: easy messages: 175811 nosy: chris.jerdonek, haypo priority: normal severity: normal status: open title: bytes_decode() unnecessarily examines encoding type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 22:32:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Nov 2012 21:32:44 +0000 Subject: [issue16496] Simplify and optimize random_seed() Message-ID: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Now random_seed() use an ineffective quadratic-time algorithm. It can reuse _PyLong_AsByteArray(), decreasing code size and increasing performance. ---------- components: Extension Modules files: random_seed.patch keywords: patch messages: 175812 nosy: mark.dickinson, rhettinger, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Simplify and optimize random_seed() type: performance versions: Python 3.4 Added file: http://bugs.python.org/file28014/random_seed.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 22:41:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Nov 2012 21:41:11 +0000 Subject: [issue16495] bytes_decode() unnecessarily examines encoding In-Reply-To: <1353187789.37.0.881944433109.issue16495@psf.upfronthosting.co.za> Message-ID: <1353188471.92.0.281346666105.issue16495@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 22:50:51 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 17 Nov 2012 21:50:51 +0000 Subject: [issue16495] bytes_decode() unnecessarily examines encoding In-Reply-To: <1353187789.37.0.881944433109.issue16495@psf.upfronthosting.co.za> Message-ID: <1353189051.46.0.129034076078.issue16495@psf.upfronthosting.co.za> Chris Jerdonek added the comment: For the record, there is a test for the default encoding: http://hg.python.org/cpython/file/e9af9b1ca67e/Lib/test/test_bytes.py#l209 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 23:29:13 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Sat, 17 Nov 2012 22:29:13 +0000 Subject: [issue16464] urllib.request: opener not resetting content-length In-Reply-To: <1352771853.32.0.535718799021.issue16464@psf.upfronthosting.co.za> Message-ID: <1353191353.7.0.0708032442008.issue16464@psf.upfronthosting.co.za> Alexey Kachayev added the comment: This is special case for more "general" problem. When request is executed with HTTP client and data is not None, it calculates content length and adds special header to request. Then one can change request.data attribute value, but header "Content-length" is not changed in this case. Patch is attached. I implemented request.data as property and added method "remove_header" to deal problem. Test cases are also provided. ---------- keywords: +patch nosy: +kachayev Added file: http://bugs.python.org/file28015/issue16464.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 23:29:48 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 17 Nov 2012 22:29:48 +0000 Subject: [issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c In-Reply-To: <1353175621.86.0.335563838987.issue8627@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: Go ahead and reopen. I just couldn't find the lines anymore when I closed it. On Nov 17, 2012 3:07 PM, "Mark Dickinson" wrote: > > Mark Dickinson added the comment: > > To clarify, here's the bug: the following code should raise an exception, > but doesn't: > > iwasawa:cpython mdickinson$ ./python.exe -3 > Python 2.7.3+ (2.7:333fe4c4897a, Nov 17 2012, 18:01:00) > [GCC 4.2.1 (Apple Inc. build 5664)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import warnings; warnings.filterwarnings("error") > >>> class A(object): > ... def __eq__(self, other): > ... return False > ... > > > Without "warnings.filterwarnings("error")", the warning gets issued as > expected: > > iwasawa:cpython mdickinson$ ./python.exe -3 > Python 2.7.3+ (2.7:333fe4c4897a, Nov 17 2012, 18:01:00) > [GCC 4.2.1 (Apple Inc. build 5664)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> class A(object): > ... def __eq__(self, object): > ... return False > ... > __main__:1: DeprecationWarning: Overriding __eq__ blocks inheritance of > __hash__ in 3.x > > Brett, is it okay to re-open this? Perhaps a change of title would help? > Or I can open a new issue for the remaining problem, if you think that's > better. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 23:30:50 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 17 Nov 2012 22:30:50 +0000 Subject: [issue16215] Possible double memory free in str.replace In-Reply-To: <1350081232.49.0.0151935995631.issue16215@psf.upfronthosting.co.za> Message-ID: <3Y3rcT50FLzRmN@mail.python.org> Roundup Robot added the comment: New changeset 26e5234239ae by Antoine Pitrou in branch '3.3': Issue #16215: Fix potential double memory free in str.replace(). http://hg.python.org/cpython/rev/26e5234239ae New changeset 5f2624db78bd by Antoine Pitrou in branch 'default': Issue #16215: Fix potential double memory free in str.replace(). http://hg.python.org/cpython/rev/5f2624db78bd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 23:33:19 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 22:33:19 +0000 Subject: [issue16215] Possible double memory free in str.replace In-Reply-To: <1350081232.49.0.0151935995631.issue16215@psf.upfronthosting.co.za> Message-ID: <1353191599.33.0.894711801473.issue16215@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed, thank you. ---------- nosy: +pitrou resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 23:37:41 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 22:37:41 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <1353191861.71.0.489996352844.issue10182@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patch looks good to me. Do you think it's possible to add some bigmem tests for this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 23:40:13 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 17 Nov 2012 22:40:13 +0000 Subject: [issue13572] import _curses fails because of UnicodeDecodeError('utf8' codec can't decode byte 0xb5 ...') on ARM Ubuntu 3.x In-Reply-To: <1323524849.05.0.773120918069.issue13572@psf.upfronthosting.co.za> Message-ID: <1353192013.59.0.857837495744.issue13572@psf.upfronthosting.co.za> STINNER Victor added the comment: > The issue obviously in PyUnicode_FromString() call from PyCursesWindow_GetKey(). > We can try latin1 encoding, locale encoding or utf-8 with surrogateescape error handler. PyUnicode_FromString() uses the UTF-8 decoder. I don't think that curses uses any non-ASCII name for a key. If we get a name which is not decodable from UTF-8, I bet that we have a more serious issue than the encoding. I prefer not to change the encoding for getkey (UTF-8 is just fine). It looks like nobody saw this issue since months, even after the final release of Python 3.3. I'm closing this issue. It doesn't contain any useful information, it would be easy to reopen it or open a new issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 23:42:55 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 17 Nov 2012 22:42:55 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353192175.34.0.624410139742.issue16496@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Why is this a problem? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 23:48:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Nov 2012 22:48:38 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353192518.37.0.263686937621.issue16496@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is not a problem at all. This just a code cleanup. Removing a code duplicate. Performance boost is a side effect. I confused by an old code comment about _PyLong_AsByteArray(). I don't see any difficulties. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 23:51:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Nov 2012 22:51:29 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <1353192689.88.0.137769735153.issue10182@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I can't write a test, because I have no such big memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 23:53:44 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 17 Nov 2012 22:53:44 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353192824.73.0.150825038046.issue16475@psf.upfronthosting.co.za> Martin v. L?wis added the comment: When I added interning support to marshal, I specifically cared about the size of pyc. I find it sad that this support was thrown out, so I support restoring it. I'm also skeptical about general sharing, and would like to see some specific numbers pointing out the gain of such a mechanism (compared to a version that merely preserves interned strings). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 23:56:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 17 Nov 2012 22:56:09 +0000 Subject: [issue16408] FD leaks in zipfile In-Reply-To: <1352060579.29.0.995643495141.issue16408@psf.upfronthosting.co.za> Message-ID: <3Y3s9h6YBQzRmV@mail.python.org> Roundup Robot added the comment: New changeset d51d95c9ea81 by Antoine Pitrou in branch '3.2': Issue #16408: Fix file descriptors not being closed in error conditions in the zipfile module. http://hg.python.org/cpython/rev/d51d95c9ea81 New changeset 27cb1a3d57c8 by Antoine Pitrou in branch '3.3': Issue #16408: Fix file descriptors not being closed in error conditions in the zipfile module. http://hg.python.org/cpython/rev/27cb1a3d57c8 New changeset 779e8f31dd30 by Antoine Pitrou in branch 'default': Issue #16408: Fix file descriptors not being closed in error conditions in the zipfile module. http://hg.python.org/cpython/rev/779e8f31dd30 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 23:58:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 17 Nov 2012 22:58:43 +0000 Subject: [issue16408] FD leaks in zipfile In-Reply-To: <1352060579.29.0.995643495141.issue16408@psf.upfronthosting.co.za> Message-ID: <3Y3sDf3g2WzRnQ@mail.python.org> Roundup Robot added the comment: New changeset eba28506eed3 by Antoine Pitrou in branch '2.7': Issue #16408: Fix file descriptors not being closed in error conditions in the zipfile module. http://hg.python.org/cpython/rev/eba28506eed3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 17 23:59:16 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 22:59:16 +0000 Subject: [issue16408] FD leaks in zipfile In-Reply-To: <1352060579.29.0.995643495141.issue16408@psf.upfronthosting.co.za> Message-ID: <1353193156.53.0.361893022212.issue16408@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you for the patches. They looked fine, so I committed them. ---------- nosy: +pitrou resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 00:16:47 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 17 Nov 2012 23:16:47 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353194207.7.0.521015460807.issue16496@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Ah. The cleanup looks good, from a shallow glance. I haven't verified yet that the change is actually correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 00:34:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Nov 2012 23:34:36 +0000 Subject: [issue16477] tarfile fails to close file handles in case of exception In-Reply-To: <1352983787.27.0.404679122442.issue16477@psf.upfronthosting.co.za> Message-ID: <1353195276.29.0.528297380594.issue16477@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 00:36:39 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 23:36:39 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <1353195399.15.0.631545740871.issue16423@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A couple of comments: - the patch needs a test (and docs too) - are you sure ignoring POSTed data is the right thing to do? Shouldn't we forbid it instead? - I think it would be nice to reference the RFC number somewhere - not sure why you raise IOError on a bad URL; I would say ValueError is the right exception here +1 on the general idea, by the way. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 00:38:44 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 17 Nov 2012 23:38:44 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1353165306.56.0.77820674464.issue15031@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: "parse_cache_contents" is my last proposed colour for the shed, but I can live with "parse_bytecode_container" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 00:39:59 2012 From: report at bugs.python.org (Berker Peksag) Date: Sat, 17 Nov 2012 23:39:59 +0000 Subject: [issue16497] zipimport.zipimporter.find_module() does not work with dotted module names Message-ID: <1353195599.47.0.873270280839.issue16497@psf.upfronthosting.co.za> New submission from Berker Peksag: I am trying to write a test for issue 8585. The `zipimport.zipimporter.find_module()` docs says: "Search for a module specified by fullname. fullname must be the fully qualified (dotted) module name." (from http://docs.python.org/3.4/library/zipimport.html#zipimport.zipimporter.find_module ) However, the `zipimport.zipimporter.find_module()` method does not work as expected. See the output of reproducer.py: spam package.eggs None ---------- components: Library (Lib) files: reproducer.py messages: 175830 nosy: berker.peksag priority: normal severity: normal status: open title: zipimport.zipimporter.find_module() does not work with dotted module names versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28016/reproducer.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 00:42:08 2012 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Sat, 17 Nov 2012 23:42:08 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1353195399.15.0.631545740871.issue16423@psf.upfronthosting.co.za> Message-ID: <50A820CE.4070300@gmx.net> Mathias Panzenb?ck added the comment: On 11/18/2012 12:36 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > A couple of comments: > > - the patch needs a test (and docs too) Will do (when I have time). > - are you sure ignoring POSTed data is the right thing to do? Shouldn't we forbid it instead? > - I think it would be nice to reference the RFC number somewhere > - not sure why you raise IOError on a bad URL; I would say ValueError is the right exception here > I did that because that's what the old URLopener code does (ignoring POSTed data and raising an IOError). The comment is actually a 1:1 copy of the old code. > +1 on the general idea, by the way. > > ---------- > nosy: +pitrou > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 00:42:15 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 23:42:15 +0000 Subject: [issue16497] zipimport.zipimporter.find_module() does not work with dotted module names In-Reply-To: <1353195599.47.0.873270280839.issue16497@psf.upfronthosting.co.za> Message-ID: <1353195735.46.0.606525711781.issue16497@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brett.cannon, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 00:42:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Nov 2012 23:42:55 +0000 Subject: [issue16335] Integer overflow in unicode-escape decoder In-Reply-To: <1351292121.99.0.943463007307.issue16335@psf.upfronthosting.co.za> Message-ID: <1353195775.35.0.613259887947.issue16335@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Terry, can you measure how much memory tests really needed (3.2 and 3.3 should want different quantity)? Looks as I wrong in my assumptions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 00:43:19 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 23:43:19 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <50A820CE.4070300@gmx.net> Message-ID: <1353195749.3331.27.camel@localhost.localdomain> Antoine Pitrou added the comment: > > - are you sure ignoring POSTed data is the right thing to do? Shouldn't we forbid it instead? > > - I think it would be nice to reference the RFC number somewhere > > - not sure why you raise IOError on a bad URL; I would say ValueError is the right exception here > > > > I did that because that's what the old URLopener code does (ignoring POSTed data and raising an > IOError). The comment is actually a 1:1 copy of the old code. Ok. I think it's better to take a fresh start here :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 00:56:40 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Nov 2012 23:56:40 +0000 Subject: [issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long) In-Reply-To: <1202068724.99.0.704404319493.issue2005@psf.upfronthosting.co.za> Message-ID: <1353196600.67.0.165889852271.issue2005@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I think the patch will break on Unix systems that don't have uid_t or > gid_t types. Do these exist? uid_t and gid_t are part of POSIX: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 01:12:16 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 18 Nov 2012 00:12:16 +0000 Subject: [issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long) In-Reply-To: <1202068724.99.0.704404319493.issue2005@psf.upfronthosting.co.za> Message-ID: <1353197536.55.0.218524740644.issue2005@psf.upfronthosting.co.za> STINNER Victor added the comment: > On some OSes and combination of 64bit typess and 32bit long > it's an invalid assumption. Can you give an example of OS where pid_t, gid_t or uid_t type are longer than the long type? (If I remember correctly, the "identifier" of a Windows process is an addresse, so it has a size of sizeof(void*), whereas long can be smaller on 64 bit Windows. But this issue looks to be specific to UNIX.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 01:15:16 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 18 Nov 2012 00:15:16 +0000 Subject: [issue11679] readline interferes with characters beginning with byte \xe9 In-Reply-To: <1301099319.36.0.392064400408.issue11679@psf.upfronthosting.co.za> Message-ID: <1353197716.55.0.847361336915.issue11679@psf.upfronthosting.co.za> ?ric Araujo added the comment: Original bug report: https://github.com/ipython/ipython/issues/58 ---------- nosy: +eric.araujo stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 01:26:40 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 18 Nov 2012 00:26:40 +0000 Subject: [issue11679] readline interferes with characters beginning with byte \xe9 In-Reply-To: <1301099319.36.0.392064400408.issue11679@psf.upfronthosting.co.za> Message-ID: <1353198400.51.0.792650115729.issue11679@psf.upfronthosting.co.za> STINNER Victor added the comment: I confirm that the issue exists, but I don't think that it comes from Python. I bet that the readline library uses *byte* string, not *character* string, and so is unable to handle correctly multibyte characters like the chinese character U+9000. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 01:52:56 2012 From: report at bugs.python.org (Trent Nelson) Date: Sun, 18 Nov 2012 00:52:56 +0000 Subject: [issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long) In-Reply-To: <1202068724.99.0.704404319493.issue2005@psf.upfronthosting.co.za> Message-ID: <1353199976.94.0.755419881171.issue2005@psf.upfronthosting.co.za> Changes by Trent Nelson : ---------- nosy: +trent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 02:20:43 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 Nov 2012 01:20:43 +0000 Subject: [issue16497] zipimport.zipimporter.find_module() does not work with dotted module names In-Reply-To: <1353195599.47.0.873270280839.issue16497@psf.upfronthosting.co.za> Message-ID: <1353201643.54.0.0984643586286.issue16497@psf.upfronthosting.co.za> Brett Cannon added the comment: It actually does work, you just have to embed the subdirectory in the path you pass to zipimport.zipimporter(): >>> importer = zipimport.zipimporter('zipimport_example.zip/package/') >>> importer.find_module('package.eggs') ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 02:22:18 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 Nov 2012 01:22:18 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1353201738.87.0.267674147972.issue15031@psf.upfronthosting.co.za> Brett Cannon added the comment: I can go with parse_cache_contents() as that aligns with imp.cache_from_source(). Does the API look reasonable (other than the parameter names since those would have to be renamed to be more in line with "cache")? Only thing I'm worried about. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 02:31:15 2012 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Sun, 18 Nov 2012 01:31:15 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1353195399.15.0.631545740871.issue16423@psf.upfronthosting.co.za> Message-ID: <50A83A62.5010607@gmx.net> Mathias Panzenb?ck added the comment: On 11/18/2012 12:36 AM, Antoine Pitrou wrote: > > - the patch needs a test (and docs too) > - are you sure ignoring POSTed data is the right thing to do? Shouldn't we forbid it instead? Btw.: The file:// protocol handler also just ignores posted data, so I think the data url handler shouldn't deviate from that. Either both raise an error when data is posted or none. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 02:47:11 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 18 Nov 2012 01:47:11 +0000 Subject: [issue10966] eliminate use of ImportError implicitly representing SkipTest In-Reply-To: <1295566830.75.0.786153857799.issue10966@psf.upfronthosting.co.za> Message-ID: <3Y3wz30pkCzRqn@mail.python.org> Roundup Robot added the comment: New changeset eb3714863872 by Brett Cannon in branch 'default': Issue #10966: Remove the concept of unexpected skipped tests. http://hg.python.org/cpython/rev/eb3714863872 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 02:48:00 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 Nov 2012 01:48:00 +0000 Subject: [issue10966] eliminate use of ImportError implicitly representing SkipTest In-Reply-To: <1295566830.75.0.786153857799.issue10966@psf.upfronthosting.co.za> Message-ID: <1353203280.23.0.896433934475.issue10966@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 02:48:04 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 Nov 2012 01:48:04 +0000 Subject: [issue10966] eliminate use of ImportError implicitly representing SkipTest In-Reply-To: <1295566830.75.0.786153857799.issue10966@psf.upfronthosting.co.za> Message-ID: <1353203284.99.0.123536538583.issue10966@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 05:16:02 2012 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Sun, 18 Nov 2012 04:16:02 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <1353212162.38.0.982224306705.issue16423@psf.upfronthosting.co.za> Mathias Panzenb?ck added the comment: Ok, I've added a documentation and some tests. Is it ok this way? More tests? More/other documentation? ---------- Added file: http://bugs.python.org/file28017/urllib.request-data-url.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 05:41:33 2012 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Sun, 18 Nov 2012 04:41:33 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <1353213693.09.0.383525971664.issue16423@psf.upfronthosting.co.za> Changes by Mathias Panzenb?ck : Removed file: http://bugs.python.org/file28017/urllib.request-data-url.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 05:41:47 2012 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Sun, 18 Nov 2012 04:41:47 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <1353213707.96.0.259829784024.issue16423@psf.upfronthosting.co.za> Changes by Mathias Panzenb?ck : Added file: http://bugs.python.org/file28018/urllib.request-data-url.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 05:42:11 2012 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Sun, 18 Nov 2012 04:42:11 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <1353213731.22.0.08434902127.issue16423@psf.upfronthosting.co.za> Changes by Mathias Panzenb?ck : Removed file: http://bugs.python.org/file27994/urllib.request-data-url.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 05:43:55 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 18 Nov 2012 04:43:55 +0000 Subject: [issue16335] Integer overflow in unicode-escape decoder In-Reply-To: <1351292121.99.0.943463007307.issue16335@psf.upfronthosting.co.za> Message-ID: <1353213835.03.0.942783681236.issue16335@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Serhiy, please be more specific as to 'measure' and 'how much' for what effect. I ran two examples, one ran (with error), the other raised. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 09:18:03 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 18 Nov 2012 08:18:03 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1353226683.48.0.0512812621998.issue15031@psf.upfronthosting.co.za> Nick Coghlan added the comment: The suppression flag rings alarm bells for me, as does the fact that all the arguments are optional. Do you remember the rationale for allowing the marshalling errors to propagate rather than falling back to loading from source? It seems weird that a truncated read in the first 12 bytes means to fall back to compiling from source, but truncation after that is a user visible error. Allowing those exceptions to be suppressed as well would simplify things a fair bit. Regardless, looking at the full patch in context on a real computer (rather than through my phone), suggests to me there needs to be *two* private static methods on _LoaderBasics._parse_bytecode_file: _validate_bytecode_header _unmarshal_code SourcelessLoader.get_code would just call these directly, while SourceLoader.parse_cache_contents would suppress exceptions from the first one. I'll put together a patch illustrating this approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 09:31:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 08:31:55 +0000 Subject: [issue16335] Integer overflow in unicode-escape decoder In-Reply-To: <1351292121.99.0.943463007307.issue16335@psf.upfronthosting.co.za> Message-ID: <1353227515.52.0.996609784682.issue16335@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I add tests. Victor ran the test and got MemoryError. This means that I incorrectly calculated the minimal memory size for bigmem. This is unacceptable, the test should skip or pass. Only someone with enough memory for test can measure a minimal memory requirement (I?don't know how to do this). May be apply the fix without a test? You tested this manually and this test too cumbersome for regular automatic testing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 09:32:41 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Nov 2012 08:32:41 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353227561.58.0.281961207841.issue16496@psf.upfronthosting.co.za> Mark Dickinson added the comment: Patch looks correct and looks good to me, modulo a couple of nitpicks (see Rietveld comments). This seems like a nice cleanup. The patch introduces a new dependence on PY_UINT32_T, which is something we haven't so far used elsewhere in Python beyond the float<->string conversions. That's quite a big change: it means that it's conceivable that the random module could now fail to build on platforms where it used to work. It also changes the signature of 'init_by_array', which is one of the core routines taken directly from the MT implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 09:41:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 08:41:38 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353228098.51.0.546116346395.issue16496@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Are there any platforms without 32-bit integers (PY_UINT32_T can be uint32_t, unsigned int or long)? PyUCS4 also should be 32-bit, therefore Python requires such type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 10:00:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 09:00:10 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353229210.9.0.00574113449765.issue16496@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated to conform with Mark's nitpicks. What I really doubt is that now same integer seed on little-endian and big-endian give different random sequences. Is this important? If yes, I can add bytes-swapping. On other hand, non-integer seed already give platform-depending results (the hashing used). What you think about using a buffer instead a hash for bytes and bytearrays (and all other seeds supported buffer protocol)? It can increase entropy. Of course, it should be another issue if you approve it. ---------- Added file: http://bugs.python.org/file28019/random_seed_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 10:08:38 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Nov 2012 09:08:38 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353229718.12.0.252727126366.issue16496@psf.upfronthosting.co.za> Mark Dickinson added the comment: > PyUCS4 also should be 32-bit, therefore Python requires such type. Hmm, okay. I wonder whether PY_UINT32_T should have been used there, to avoid doing the same checks in multiple places. > What I really doubt is that now same integer seed on little-endian and > big-endian give different random sequences. Is this important? Yes, I think it's important that this code change doesn't change the random sequence if the seed is unchanged, on any platform (32 / 64-bit, big versus little endian). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 10:14:42 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Nov 2012 09:14:42 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353230082.62.0.809971424673.issue16496@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for the updated patch. A couple more comments: - you've got potential overflow when computing keysize from bits, on platforms where sizeof(size_t) > sizeof(unsigned long). - please could you move the check for PY_UINT32_T nearer the top of the file, along with the other #defines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 10:36:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 09:36:17 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353231377.5.0.779514182935.issue16496@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Now random_seed() is platform-independed for integer arguments. ---------- Added file: http://bugs.python.org/file28020/random_seed_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 10:38:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 09:38:26 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353231506.88.0.0968748810733.issue16496@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28020/random_seed_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 10:39:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 09:39:28 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353231568.03.0.328802900279.issue16496@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oops, typo. ---------- Added file: http://bugs.python.org/file28021/random_seed_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 10:47:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 09:47:03 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <1353232023.11.0.469298028834.issue10182@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually, standard tests should be enough on a big-endian platform with sizeof(int) < sizeof(size_t) or sizeof(long) < sizeof(size_t). No additional tests needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 11:06:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 10:06:13 +0000 Subject: [issue11679] readline interferes with characters beginning with byte \xe9 In-Reply-To: <1301099319.36.0.392064400408.issue11679@psf.upfronthosting.co.za> Message-ID: <1353233173.38.0.41465436031.issue11679@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, this is a readline issue. Add '"\M-i":" "' line to ~/.inputrc, run 'rlwrap cat' command, paste this multibyte character and you got the same result. This is not a Python bug. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 11:07:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 10:07:39 +0000 Subject: [issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila In-Reply-To: <1344890920.23.0.695633734046.issue15642@psf.upfronthosting.co.za> Message-ID: <1353233259.77.0.678593024013.issue15642@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 11:21:01 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 18 Nov 2012 10:21:01 +0000 Subject: [issue12005] modulo result of Decimal differs from float/int In-Reply-To: <1304584519.64.0.99823949629.issue12005@psf.upfronthosting.co.za> Message-ID: <3Y48Mw4FrkzQNb@mail.python.org> Roundup Robot added the comment: New changeset 290f3b75480f by Mark Dickinson in branch '2.7': Issue #12005: clarify behaviour of % and // for Decimal objects. http://hg.python.org/cpython/rev/290f3b75480f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 11:23:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 18 Nov 2012 10:23:15 +0000 Subject: [issue12005] modulo result of Decimal differs from float/int In-Reply-To: <1304584519.64.0.99823949629.issue12005@psf.upfronthosting.co.za> Message-ID: <3Y48QV6G2rzQQB@mail.python.org> Roundup Robot added the comment: New changeset 0ec314f26791 by Mark Dickinson in branch '3.2': Issue #12005: clarify behaviour of % and // for Decimal objects. http://hg.python.org/cpython/rev/0ec314f26791 New changeset f626c214cad0 by Mark Dickinson in branch '3.3': Issue #12005: merge doc patch from 3.2 http://hg.python.org/cpython/rev/f626c214cad0 New changeset 0263d2ef9530 by Mark Dickinson in branch 'default': Issue #12005: merge doc patch from 3.3 http://hg.python.org/cpython/rev/0263d2ef9530 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 11:24:05 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Nov 2012 10:24:05 +0000 Subject: [issue12005] modulo result of Decimal differs from float/int In-Reply-To: <1304584519.64.0.99823949629.issue12005@psf.upfronthosting.co.za> Message-ID: <1353234245.25.0.440773979151.issue12005@psf.upfronthosting.co.za> Mark Dickinson added the comment: Docs updated. ---------- assignee: rhettinger -> mark.dickinson resolution: -> fixed status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 11:33:41 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 Nov 2012 10:33:41 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1353226683.48.0.0512812621998.issue15031@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: The rationale is that was the way it already was prior to importlib. As for the approach you are suggesting, I am understand it, it will just not give the public method the same functionality which might not be that important. On Nov 18, 2012 5:18 AM, "Nick Coghlan" wrote: > > Nick Coghlan added the comment: > > The suppression flag rings alarm bells for me, as does the fact that all > the arguments are optional. Do you remember the rationale for allowing the > marshalling errors to propagate rather than falling back to loading from > source? It seems weird that a truncated read in the first 12 bytes means to > fall back to compiling from source, but truncation after that is a user > visible error. Allowing those exceptions to be suppressed as well would > simplify things a fair bit. > > Regardless, looking at the full patch in context on a real computer > (rather than through my phone), suggests to me there needs to be *two* > private static methods on _LoaderBasics._parse_bytecode_file: > > _validate_bytecode_header > _unmarshal_code > > SourcelessLoader.get_code would just call these directly, while > SourceLoader.parse_cache_contents would suppress exceptions from the first > one. > > I'll put together a patch illustrating this approach. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 11:34:18 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Nov 2012 10:34:18 +0000 Subject: [issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c In-Reply-To: <1273069856.93.0.435136167669.issue8627@psf.upfronthosting.co.za> Message-ID: <1353234858.8.0.604855298095.issue8627@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: out of date -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 11:39:34 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 18 Nov 2012 10:39:34 +0000 Subject: [issue12005] modulo result of Decimal differs from float/int In-Reply-To: <1304584519.64.0.99823949629.issue12005@psf.upfronthosting.co.za> Message-ID: <1353235174.64.0.788241373236.issue12005@psf.upfronthosting.co.za> Stefan Krah added the comment: Mark, there's a small typo in the patch: "preseve the usual identity" ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 11:40:04 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Nov 2012 10:40:04 +0000 Subject: [issue12005] modulo result of Decimal differs from float/int In-Reply-To: <1304584519.64.0.99823949629.issue12005@psf.upfronthosting.co.za> Message-ID: <1353235204.05.0.638993512693.issue12005@psf.upfronthosting.co.za> Mark Dickinson added the comment: D'oh! Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 11:44:00 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Nov 2012 10:44:00 +0000 Subject: [issue12005] modulo result of Decimal differs from float/int In-Reply-To: <1304584519.64.0.99823949629.issue12005@psf.upfronthosting.co.za> Message-ID: <1353235440.06.0.0649183247782.issue12005@psf.upfronthosting.co.za> Mark Dickinson added the comment: Typo now fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 11:50:36 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 18 Nov 2012 10:50:36 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1353235836.14.0.865477247926.issue15031@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, rereading the whole issue and getting completely back up to speed with the problem we're trying to solve, I think parse_bytecode_container is a better name than any of my suggestions, since there is no cache involved for SourcelessLoader and similar cases. I also think a static method is a bad idea, since that makes the preferred method of invocation unclear as the method is visible via a number of different loaders, and if you're just wanting to get the code object out of a bytecode file, it isn't clear why a loader is involved at all. So, I've gone back to Ronan's approach of a module level function. The attached patch goes down that route - the public function *always* reraises the header errors, but in a way that SourceLoader.get_code can easily suppress. SourcelessLoader.get_code simply bypasses the public helper entirely (it *could* call it and unwrap the header exceptions for backwards compatibility, but that seems pointlessly convoluted). The "fullname, data, bytecode_path" part of the API remains consistent across the 3 helpers, with optional source_* parameters at the end where appropriate. ---------- Added file: http://bugs.python.org/file28022/issue15031_parse_container_function.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 11:56:44 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 18 Nov 2012 10:56:44 +0000 Subject: [issue16053] "strict" parameter is not documented in csv module In-Reply-To: <1348655757.15.0.984566805089.issue16053@psf.upfronthosting.co.za> Message-ID: <3Y49975dfPzQSv@mail.python.org> Roundup Robot added the comment: New changeset 9b6797631490 by Ezio Melotti in branch '2.7': #16053: document csv.Dialect.strict. Patch by Kushal Das. http://hg.python.org/cpython/rev/9b6797631490 New changeset faf6941ed5fd by Ezio Melotti in branch '3.2': #16053: document csv.Dialect.strict. Patch by Kushal Das. http://hg.python.org/cpython/rev/faf6941ed5fd New changeset 1956bc3edbb7 by Ezio Melotti in branch '3.3': #16053: merge with 3.2. http://hg.python.org/cpython/rev/1956bc3edbb7 New changeset cb7953ba03af by Ezio Melotti in branch 'default': #16053: merge with 3.3. http://hg.python.org/cpython/rev/cb7953ba03af ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 11:57:50 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 10:57:50 +0000 Subject: [issue16053] "strict" parameter is not documented in csv module In-Reply-To: <1348655757.15.0.984566805089.issue16053@psf.upfronthosting.co.za> Message-ID: <1353236270.32.0.684817862731.issue16053@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 12:23:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 18 Nov 2012 11:23:09 +0000 Subject: [issue14313] zipfile should raise an exception for unsupported compression methods In-Reply-To: <1331786135.76.0.307574406169.issue14313@psf.upfronthosting.co.za> Message-ID: <3Y49ld0wmMzQNb@mail.python.org> Roundup Robot added the comment: New changeset 8feaa8d04c56 by Ezio Melotti in branch '2.7': #14313: zipfile now raises NotImplementedError when the compression type is unknown. http://hg.python.org/cpython/rev/8feaa8d04c56 New changeset b193a5dc7a58 by Ezio Melotti in branch '3.2': #14313: zipfile now raises NotImplementedError when the compression type is unknown. http://hg.python.org/cpython/rev/b193a5dc7a58 New changeset c2ba10b9d654 by Ezio Melotti in branch '3.3': #14313: null merge. http://hg.python.org/cpython/rev/c2ba10b9d654 New changeset 4b866e39d1fb by Ezio Melotti in branch 'default': #14313: null merge. http://hg.python.org/cpython/rev/4b866e39d1fb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 12:24:34 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 11:24:34 +0000 Subject: [issue14313] zipfile should raise an exception for unsupported compression methods In-Reply-To: <1331786135.76.0.307574406169.issue14313@psf.upfronthosting.co.za> Message-ID: <1353237874.94.0.361427167006.issue14313@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patches! ---------- assignee: -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 12:38:27 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Nov 2012 11:38:27 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <50A83A62.5010607@gmx.net> Message-ID: <1353238657.3364.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > On 11/18/2012 12:36 AM, Antoine Pitrou wrote: > > > > - the patch needs a test (and docs too) > > - are you sure ignoring POSTed data is the right thing to do? Shouldn't we forbid it instead? > > Btw.: The file:// protocol handler also just ignores posted data, so I think the data url handler > shouldn't deviate from that. Either both raise an error when data is posted or none. Ah, fair enough, then. Thanks for the updated patch, I'll take a look (unless someone beats me to it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 13:07:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 18 Nov 2012 12:07:14 +0000 Subject: [issue16306] Multiple error line for unknown command line parameter In-Reply-To: <1351036031.44.0.0447945169816.issue16306@psf.upfronthosting.co.za> Message-ID: <3Y4BkV0sqFzQQB@mail.python.org> Roundup Robot added the comment: New changeset d2df83d7c649 by Ezio Melotti in branch '2.7': #16306: Fix multiple error messages when unknown command line parameters where passed to the interpreter. Patch by Hieu Nguyen. http://hg.python.org/cpython/rev/d2df83d7c649 New changeset 0153c077a0fd by Ezio Melotti in branch '3.2': #16306: Fix multiple error messages when unknown command line parameters where passed to the interpreter. Patch by Hieu Nguyen. http://hg.python.org/cpython/rev/0153c077a0fd New changeset 7f01121a660d by Ezio Melotti in branch '3.3': #16306: merge with 3.2. http://hg.python.org/cpython/rev/7f01121a660d New changeset 3a1bcb6de167 by Ezio Melotti in branch 'default': #16306: merge with 3.3. http://hg.python.org/cpython/rev/3a1bcb6de167 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 13:08:36 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 12:08:36 +0000 Subject: [issue16306] Multiple error line for unknown command line parameter In-Reply-To: <1351036031.44.0.0447945169816.issue16306@psf.upfronthosting.co.za> Message-ID: <1353240516.19.0.924097866774.issue16306@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 13:42:22 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 Nov 2012 12:42:22 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1353235836.14.0.865477247926.issue15031@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: It's a method so that it can be overridden. Otherwise I can't develop my own format and have that be the only differing option from SourceLoader. On Nov 18, 2012 7:50 AM, "Nick Coghlan" wrote: > > Nick Coghlan added the comment: > > OK, rereading the whole issue and getting completely back up to speed with > the problem we're trying to solve, I think parse_bytecode_container is a > better name than any of my suggestions, since there is no cache involved > for SourcelessLoader and similar cases. > > I also think a static method is a bad idea, since that makes the preferred > method of invocation unclear as the method is visible via a number of > different loaders, and if you're just wanting to get the code object out of > a bytecode file, it isn't clear why a loader is involved at all. So, I've > gone back to Ronan's approach of a module level function. > > The attached patch goes down that route - the public function *always* > reraises the header errors, but in a way that SourceLoader.get_code can > easily suppress. SourcelessLoader.get_code simply bypasses the public > helper entirely (it *could* call it and unwrap the header exceptions for > backwards compatibility, but that seems pointlessly convoluted). > > The "fullname, data, bytecode_path" part of the API remains consistent > across the 3 helpers, with optional source_* parameters at the end where > appropriate. > > ---------- > Added file: > http://bugs.python.org/file28022/issue15031_parse_container_function.diff > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 14:38:58 2012 From: report at bugs.python.org (Terry Cooper) Date: Sun, 18 Nov 2012 13:38:58 +0000 Subject: [issue16498] Unwanted link between volatile and shelve storage Message-ID: <1353245937.97.0.646518309195.issue16498@psf.upfronthosting.co.za> New submission from Terry Cooper: The Python statement gList1[i1][1] += gList2[i2][1] modifies not only gList1 (a volatile storage object) but dBasis[163] (a record within shelve object dBasis). Both gList and dBasis[163] are printed before and after execution of the statement by cFract2.combine. They are obviously not the same record, but the statement modifies gList1[2][1] and dBasis[163][2][1] simultaniously. ---------- components: Windows files: bugMail.py messages: 175871 nosy: ttcooper priority: normal severity: normal status: open title: Unwanted link between volatile and shelve storage type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file28023/bugMail.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 14:45:54 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 Nov 2012 13:45:54 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1353246354.89.0.409795580695.issue15031@psf.upfronthosting.co.za> Brett Cannon added the comment: Or to put it another way, without making it a method other interpreters like IronPython and Jython will never be able to reuse SourceLoader effectively if they want their own cached file format. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 15:14:03 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 Nov 2012 14:14:03 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1353248043.83.0.915044115508.issue15031@psf.upfronthosting.co.za> Brett Cannon added the comment: FYI I'm talking with Dino for IronPython and I just emailed some Jython folks to try to get an opinion on whether they would prefer to have a method to override, something in _imp that they can implement, or simply implement marshal.loads() and dumps() such that the bytecode headers stay and the rest of the file is up to them to deal with. Their answers will dictate whether the code is a public method or just some private functions in importlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 15:14:33 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 Nov 2012 14:14:33 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1353248073.09.0.62237969328.issue15031@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +dino.viehland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 15:26:11 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 18 Nov 2012 14:26:11 +0000 Subject: [issue16499] CLI option for isolated mode Message-ID: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> New submission from Christian Heimes: I like to propose a new option for the Python interpreter: python -I It shall start the interpreter in isolated mode which ignores any environment variables set by the user and any files installed by the user. The mode segregate a Python program from anything an unpriviliged user is able to modify and uses only files that are installed by a system adminstrator. The isolated mode implies -E (ignore all PYTHON* environment vars) and -s (don't add user site directory). It also refrains from the inclusion of '' or getcwd() to sys.path. TKinter doesn't load and execute Python scripts from the user's home directory. Other parts of the stdlib should be checked, too. The option is intended for OS and application scripts that doesn't want to become affected by user installed files or files in the current working path of a user. The idea is motivated by a couple of bug reports, for example: https://bugs.launchpad.net/bugs/938869 lsb_release crashed with SIGABRT in Py_FatalError() http://bugs.python.org/issue16202 sys.path[0] security issues http://bugs.python.org/issue16248 Security bug in tkinter allows for untrusted, arbitrary code execution. --- The idea has been discussed at http://mail.python.org/pipermail/python-ideas/2012-November/017766.html. ---------- assignee: christian.heimes messages: 175874 nosy: barry, christian.heimes, lemburg priority: normal severity: normal stage: patch review status: open title: CLI option for isolated mode type: security versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 15:30:00 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 18 Nov 2012 14:30:00 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1353249000.81.0.759402366146.issue16499@psf.upfronthosting.co.za> Christian Heimes added the comment: The first patch implements the arg parsing, sys.flags, PySys_SetArgv() modification that doesn't include the current directory as sys.path[0] and some doc updates. Open issue: - MAL has addressed concerns that '-I' is too similar to GCC's -I (include path) option - Is 'isolated mode' a good term to describe the feature? IMO 'restricted mode' is also a good name but it sounds too similar to PyPy's restricted python. ---------- keywords: +patch Added file: http://bugs.python.org/file28024/isolatemode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 15:45:12 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 18 Nov 2012 14:45:12 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1353249912.85.0.00800036515181.issue16499@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- components: +Interpreter Core keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 15:51:36 2012 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Sun, 18 Nov 2012 14:51:36 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1353250296.8.0.168934660272.issue4473@psf.upfronthosting.co.za> Changes by Lorenzo M. Catucci : Added file: http://bugs.python.org/file28025/poplib_02_server_capabilities_v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 15:51:55 2012 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Sun, 18 Nov 2012 14:51:55 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1353250315.24.0.239185463598.issue4473@psf.upfronthosting.co.za> Changes by Lorenzo M. Catucci : Added file: http://bugs.python.org/file28026/poplib_03_starttls_v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 15:52:06 2012 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Sun, 18 Nov 2012 14:52:06 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1353250326.75.0.409360366302.issue4473@psf.upfronthosting.co.za> Changes by Lorenzo M. Catucci : Removed file: http://bugs.python.org/file26251/poplib_02_server_capabilities_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 15:52:19 2012 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Sun, 18 Nov 2012 14:52:19 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1353250339.81.0.69813596559.issue4473@psf.upfronthosting.co.za> Changes by Lorenzo M. Catucci : Removed file: http://bugs.python.org/file26252/poplib_03_starttls_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 16:03:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 18 Nov 2012 15:03:46 +0000 Subject: [issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object In-Reply-To: <1344732276.83.0.543554641885.issue15627@psf.upfronthosting.co.za> Message-ID: <3Y4GfB1WqgzQHc@mail.python.org> Roundup Robot added the comment: New changeset e30bcce5c634 by Brett Cannon in branch 'default': Issue #15627: Add the compile_source() method to http://hg.python.org/cpython/rev/e30bcce5c634 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 16:14:51 2012 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Sun, 18 Nov 2012 15:14:51 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1353251691.41.0.780064061602.issue4473@psf.upfronthosting.co.za> Lorenzo M. Catucci added the comment: Updated 02 and 03 patches (mostly) in line with Antoine's review comments: > 2) poplib_02_server_capabilities_v3.diff: > - please try to follow PEP 8 (i.e. `capa = {}` not `capa={}`) > - I think the capa() result should be a dict mapping str keys to str > values (not bytes), since that part of the POP3 protocol seems to > have a well-defined character set (ASCII) Completely right. Done. > 3) poplib_03_starttls_v3.diff: > > - same comment about PEP 8 where? > - why did you change the signature of the _create_socket() > method? it looks gratuitous undone > - the new method should be called starttls() as in other modules, not > stls() Here I'm following: at :ref:`pop3-objects` in Doc/library/poplib.rst, All POP3 commands are represented by methods of the same name, in lower-case; most return the response text sent by the server. IMHO, having a single method with a name different than the underlying POP command would just be confusing. For this reason, I'd rather avoid adding an alias like in starttls = stls or the reverse... > - starttls() should only take a context argument; no need to support > separate keyfile and certfile arguments Right, non need to mimick pre-SSLContext method signatures! > - what is the point of catching errors like this: > [...] undone ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 16:20:05 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 18 Nov 2012 15:20:05 +0000 Subject: [issue16500] Add an 'afterfork' module Message-ID: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> New submission from Christian Heimes: I propose the addition of an 'afterfork' module. The module shall fulfill a similar task as the 'atexit' module except that it handles process forks instead of process shutdown. The 'afterfork' module shall allow libraries to register callbacks that are executed on fork() inside the child process and as soon as possible. Python already has a function that must be called by C code: PyOS_AfterFork(). The 'afterfork' callbacks are called as the last step in PyOS_AfterFork(). Use case example: The tempfile module has a specialized RNG that re-initialized the RNG after fork() by comparing os.getpid() to an instance variable every time the RNG is accessed. The check can be replaced with an afterfork callback. Open questions: How should the afterfork() module handle exceptions that are raised by callbacks? Implementation: I'm going to use as much code from atexitmodule.c as possible. I'm going to copy common code to a template file and include the template from atexitmodule.c and afterforkmodule.c with some preprocessor tricks. ---------- assignee: christian.heimes components: Extension Modules, Interpreter Core keywords: needs review messages: 175878 nosy: christian.heimes priority: normal severity: normal status: open title: Add an 'afterfork' module type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 16:23:10 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 Nov 2012 15:23:10 +0000 Subject: [issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object In-Reply-To: <1344732276.83.0.543554641885.issue15627@psf.upfronthosting.co.za> Message-ID: <1353252190.34.0.761934045396.issue15627@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: -Document the 'optimize' argument to compile() resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 16:23:13 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 18 Nov 2012 15:23:13 +0000 Subject: [issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions In-Reply-To: <1308929993.57.0.810230060664.issue12398@psf.upfronthosting.co.za> Message-ID: <1353252193.87.0.268216877649.issue12398@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +aronacher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 16:23:41 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 Nov 2012 15:23:41 +0000 Subject: [issue16493] Document the 'optimize' argument to compile() In-Reply-To: <1353167567.95.0.716171753234.issue16493@psf.upfronthosting.co.za> Message-ID: <1353252221.02.0.309293055532.issue16493@psf.upfronthosting.co.za> Brett Cannon added the comment: No one else is working on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 16:24:09 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 18 Nov 2012 15:24:09 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1353252249.19.0.672805365437.issue16499@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 16:27:21 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 18 Nov 2012 15:27:21 +0000 Subject: [issue16497] zipimport.zipimporter.find_module() does not work with dotted module names In-Reply-To: <1353195599.47.0.873270280839.issue16497@psf.upfronthosting.co.za> Message-ID: <1353252441.52.0.344630677161.issue16497@psf.upfronthosting.co.za> Berker Peksag added the comment: > It actually does work, you just have to embed the subdirectory in the > path you pass to zipimport.zipimporter(): Thanks, didn't know that. Would it be good to add an example to the zipimporter.find_module() documentation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 16:30:24 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Nov 2012 15:30:24 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353252624.09.0.56429335125.issue16496@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'm still uncomfortable with the init_by_array signature changes and the use of PY_UINT32_T. How about something like the attached instead? It keeps the central idea (use _PyLong_NumBits and _PyLong_AsByteArray) but doesn't require any signature changes or special casing for bigendian machines. ---------- Added file: http://bugs.python.org/file28027/random_seed_metd.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 16:37:59 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 18 Nov 2012 15:37:59 +0000 Subject: [issue16493] Document the 'optimize' argument to compile() In-Reply-To: <1353167567.95.0.716171753234.issue16493@psf.upfronthosting.co.za> Message-ID: <1353253079.2.0.880168243911.issue16493@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 16:38:30 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 Nov 2012 15:38:30 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1353253110.07.0.732735423951.issue16499@psf.upfronthosting.co.za> Brett Cannon added the comment: I don't think we need to worry about overlapping with gcc; -B, -b, -c, -d, etc. are all used by gcc for some reason or another. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 16:55:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 15:55:53 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353254153.58.0.1732535107.issue16496@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think that the preservation of the signature of the auxiliary private static function is worth it. I'm uncomfortable with such patch. But do as you feel comfortable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 17:19:21 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Nov 2012 16:19:21 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353255561.38.0.812983429569.issue16496@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I'm uncomfortable with such patch. Any particular reason? It's direct and straightforward, and eliminates the quadratic behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 17:42:20 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 Nov 2012 16:42:20 +0000 Subject: [issue16497] zipimport.zipimporter.find_module() does not work with dotted module names In-Reply-To: <1353195599.47.0.873270280839.issue16497@psf.upfronthosting.co.za> Message-ID: <1353256940.84.0.307168126385.issue16497@psf.upfronthosting.co.za> Brett Cannon added the comment: It certainly wouldn't hurt. I think all of the path-related things for that module are under-documented in terms of subdirectories, relative directories, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 17:49:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 16:49:03 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353257343.73.0.550553944797.issue16496@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The code is larger. There is one additional allocation. CPU tacts wasted for uint32->ulong conversion (and in any case all numbers in the generator are 32-bit). One additional ValeError/OverflowError. Apparently my feeling of comfort is different from your own. ;) Hmm, reviewing your code I found errors in my code too. I guess I'm more captious as a critic than as an author. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 18:06:24 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Nov 2012 17:06:24 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353258384.7.0.194744227643.issue16496@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Apparently my feeling of comfort is different from your own. ;) Yes: I tend to favour direct, readable, and portable code over unnecessarily optimized code. To address the specific points: > The code is larger. Very slightly. It's (IMO) more readable and comprehensible though. > There is one additional allocation. Yep. Is this a problem? > CPU tacts wasted for uint32->ulong conversion. random.seed is hardly going to be a bottleneck in most applications. Again, I don't see that as a problem. > One additional ValeError/OverflowError. That's not really additional: it should really have already been there in the original code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 18:07:38 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Nov 2012 17:07:38 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353258458.06.0.104221094665.issue16496@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I agree with Mark, we don't need to micro-optimize here. Also, +1 for not needing PY_UINT32_T. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 18:08:15 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Nov 2012 17:08:15 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1353258495.77.0.416726735518.issue16500@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 18:15:07 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Nov 2012 17:15:07 +0000 Subject: [issue16501] deprecate RISCOS "support" Message-ID: <1353258907.33.0.855880480918.issue16501@psf.upfronthosting.co.za> New submission from Antoine Pitrou: There are a couple of places in our code with references to RISCOS (mostly as #ifdef's). I propose we record this platform as deprecated in 3.4 and removed in 3.5. This needs PEP 11 to be updated. Wikipedia mentions the existence of two operating systems named "RISC OS". I conjecture we are talking about this one: http://en.wikipedia.org/wiki/RISC_OS In any case, there hasn't been any report of people actually running Python on that OS for years, so it's unlikely to work at all. ---------- components: Interpreter Core messages: 175889 nosy: haypo, loewis, pitrou priority: normal severity: normal status: open title: deprecate RISCOS "support" type: enhancement versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 18:16:40 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Nov 2012 17:16:40 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1353259000.55.0.705552460137.issue16499@psf.upfronthosting.co.za> Antoine Pitrou added the comment: +1 from me. "-I" and "isolated" sound fine to me. The patch needs to add some tests. Also the docs need some "versionadded" / "versionchanged" markers. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 18:33:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 17:33:29 +0000 Subject: [issue16502] PEP 305: eaten backslashes Message-ID: <1353260009.13.0.210575226551.issue16502@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: In PEP 305 '\r\n' rendered as 'rn' in one place. The proposed patch should fix this. ---------- assignee: docs at python components: Documentation files: pep-0305_rn.patch keywords: patch messages: 175891 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: PEP 305: eaten backslashes Added file: http://bugs.python.org/file28028/pep-0305_rn.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 18:34:43 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 18 Nov 2012 17:34:43 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1353260083.68.0.362226444185.issue16500@psf.upfronthosting.co.za> Richard Oudkerk added the comment: pthread_atfork() allows the registering of three types of callbacks: 1) prepare callbacks which are called before the fork, 2) parent callbacks which are called in the parent after the fork 3) child callbacks which are called in the child after the fork. I think all three should be supported. I also think that a recursive "fork lock" should be introduced which is held during the fork. This can be acquired around critical sections during which forks must not occur. This is more or less a duplicate of #6923. See also #6721. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 18:35:04 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Nov 2012 17:35:04 +0000 Subject: [issue16502] PEP 305: eaten backslashes In-Reply-To: <1353260009.13.0.210575226551.issue16502@psf.upfronthosting.co.za> Message-ID: <1353260104.97.0.964015754963.issue16502@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hmm, I wonder if this is a ReST bug. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 18:35:16 2012 From: report at bugs.python.org (Zachary Ware) Date: Sun, 18 Nov 2012 17:35:16 +0000 Subject: [issue16503] Unclear documentation regarding apply(), 'extended call syntax' Message-ID: <1353260116.84.0.175308282069.issue16503@psf.upfronthosting.co.za> New submission from Zachary Ware: (Reported by Kevin Leeds on docs at python.org) The documentation for the apply() built-in function in 2.7 says that it is deprecated and to use "extended call syntax" instead. There is no mention of "extended call syntax" anywhere else in the docs. The simplest solution I can see is in the attached patch; it merely adds a link to the tutorial section about arbitrary argument lists within the deprecation warning. I wonder though if the wording should be changed to something more findable. What is the common wording of *args and **kwargs usage? ---------- assignee: docs at python components: Documentation files: arbitraryargs_2.7.patch keywords: patch messages: 175894 nosy: docs at python, zach.ware priority: normal severity: normal status: open title: Unclear documentation regarding apply(), 'extended call syntax' versions: Python 2.7 Added file: http://bugs.python.org/file28029/arbitraryargs_2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 18:37:09 2012 From: report at bugs.python.org (Roger Serwy) Date: Sun, 18 Nov 2012 17:37:09 +0000 Subject: [issue16504] IDLE - fatal error when opening a file with certain tokenizing errors Message-ID: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za> New submission from Roger Serwy: IDLE's IndentSearcher class in EditorWindow.py can raise an uncaught IndentationError when opening a file. The attached patch fixes the problem by catching everything that the tokenize module can raise explicitly, namely IndentationError, TokenError, and SyntaxError. Alternatively, the except clause can be left bare, as it is disappointing to crash IDLE when simply guessing the indent width of a file. (See "guess_indent" in EditorWindow.py) ---------- components: IDLE files: editor_token_error.patch keywords: patch messages: 175895 nosy: serwy priority: normal severity: normal status: open title: IDLE - fatal error when opening a file with certain tokenizing errors type: behavior versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28030/editor_token_error.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 18:39:54 2012 From: report at bugs.python.org (Roger Serwy) Date: Sun, 18 Nov 2012 17:39:54 +0000 Subject: [issue16504] IDLE - fatal error when opening a file with certain tokenizing errors In-Reply-To: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za> Message-ID: <1353260394.26.0.572475534745.issue16504@psf.upfronthosting.co.za> Roger Serwy added the comment: I encountered this behavior while testing an extension that highlights tabs and trailing whitespace. The very first test file I wrote caused this crash. See the attached "sample_token_error.py". ---------- Added file: http://bugs.python.org/file28031/sample_token_error.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 18:45:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 17:45:10 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353260710.72.0.593047581251.issue16496@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I tend to favour direct, readable, and portable code over unnecessarily optimized code. And my feeling of directness, readability, and portability also slightly differs. I agree that code size and additional operations not of importance here. I say only that it makes me feel less comfortable. It doesn't matter. I were left some nitpicks on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 18:49:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 17:49:55 +0000 Subject: [issue16502] PEP 305: eaten backslashes In-Reply-To: <1353260009.13.0.210575226551.issue16502@psf.upfronthosting.co.za> Message-ID: <1353260995.21.0.772761617785.issue16502@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a markup bug. In all other cases \n escaped (\\n), or quoted (``\n``), or used in a code fragment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 18:55:47 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 17:55:47 +0000 Subject: [issue16502] PEP 305: eaten backslashes In-Reply-To: <1353260009.13.0.210575226551.issue16502@psf.upfronthosting.co.za> Message-ID: <1353261347.82.0.57142820915.issue16502@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 19:09:44 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 18 Nov 2012 18:09:44 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353262184.34.0.301696939293.issue16496@psf.upfronthosting.co.za> Stefan Krah added the comment: Is PY_UINT32_T a big problem? I hope that one day we can use the C99 types directly. Visual Studio finally supports stdint.h, and I'm not aware of any compiler that does not. Consider cdecimal as a trial balloon: It compiles on all obscure snakebite platforms, and I'm almost willing to bet that there won't be any reports due to the C99 types. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 19:33:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 18:33:13 +0000 Subject: [issue15927] csv.reader() does not support escaped newline when quoting=csv.QUOTE_NONE In-Reply-To: <1347425390.54.0.862014726204.issue15927@psf.upfronthosting.co.za> Message-ID: <1353263593.79.0.0103281014219.issue15927@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: CSV?is not well defined format. What you expect to read from csv.reader(['one', 'two'])? If two rows ['one'] and ['two'], than the reader in its own right and there is no bug which can be fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 19:38:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 18:38:22 +0000 Subject: [issue16504] IDLE - fatal error when opening a file with certain tokenizing errors In-Reply-To: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za> Message-ID: <1353263902.86.0.580033814887.issue16504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: IndentationError is a subclass of SyntaxError. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 19:54:30 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 18 Nov 2012 18:54:30 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353259000.55.0.705552460137.issue16499@psf.upfronthosting.co.za> Message-ID: <20121118135425.44868e4d@resist> Barry A. Warsaw added the comment: On Nov 18, 2012, at 05:16 PM, Antoine Pitrou wrote: >Antoine Pitrou added the comment: > >+1 from me. "-I" and "isolated" sound fine to me. I haven't reviewed the patch yet, but based on the email discussions, I'm also +1 for the concept, option name, and terminology. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 19:55:07 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 18 Nov 2012 18:55:07 +0000 Subject: [issue16498] Unwanted link between volatile and shelve storage In-Reply-To: <1353245937.97.0.646518309195.issue16498@psf.upfronthosting.co.za> Message-ID: <1353264907.23.0.152923895633.issue16498@psf.upfronthosting.co.za> R. David Murray added the comment: Any chance you could reduce this to a simpler test case? It may be a while before anyone gets around to analyzing your complete example. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:06:11 2012 From: report at bugs.python.org (Roger Serwy) Date: Sun, 18 Nov 2012 19:06:11 +0000 Subject: [issue16504] IDLE - fatal error when opening a file with certain tokenizing errors In-Reply-To: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za> Message-ID: <1353265571.97.0.238065187709.issue16504@psf.upfronthosting.co.za> Roger Serwy added the comment: That's a good point. Attached is a revision to omit IndentationError. Thanks Serhiy. ---------- Added file: http://bugs.python.org/file28032/editor_token_error_rev1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:07:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 19:07:49 +0000 Subject: [issue16498] Unwanted link between volatile and shelve storage In-Reply-To: <1353245937.97.0.646518309195.issue16498@psf.upfronthosting.co.za> Message-ID: <1353265669.27.0.0920899536208.issue16498@psf.upfronthosting.co.za> Ezio Melotti added the comment: > They are obviously not the same record Have you tried printing gList1 and dBasis[163], their repr and their ids? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:12:26 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 18 Nov 2012 19:12:26 +0000 Subject: [issue8585] zipimporter.find_module is untested In-Reply-To: <1272676536.77.0.29287206537.issue8585@psf.upfronthosting.co.za> Message-ID: <1353265946.16.0.959876153174.issue8585@psf.upfronthosting.co.za> Berker Peksag added the comment: I've attached a patch that adds tests for the zipimporter.find_module(). ---------- keywords: +patch nosy: +berker.peksag versions: +Python 3.2, Python 3.3 Added file: http://bugs.python.org/file28033/issue8585.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:23:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 18 Nov 2012 19:23:57 +0000 Subject: [issue16503] Unclear documentation regarding apply(), 'extended call syntax' In-Reply-To: <1353260116.84.0.175308282069.issue16503@psf.upfronthosting.co.za> Message-ID: <3Y4NQN3Jx9zRN7@mail.python.org> Roundup Robot added the comment: New changeset 7efa0d66b1a0 by Ezio Melotti in branch '2.7': #16503: clarify "apply" docs. http://hg.python.org/cpython/rev/7efa0d66b1a0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:24:59 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 19:24:59 +0000 Subject: [issue16503] Unclear documentation regarding apply(), 'extended call syntax' In-Reply-To: <1353260116.84.0.175308282069.issue16503@psf.upfronthosting.co.za> Message-ID: <1353266699.38.0.94605676165.issue16503@psf.upfronthosting.co.za> Ezio Melotti added the comment: It should be clearer now. ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:26:29 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 19:26:29 +0000 Subject: [issue16493] Document the 'optimize' argument to compile() In-Reply-To: <1353167567.95.0.716171753234.issue16493@psf.upfronthosting.co.za> Message-ID: <1353266789.3.0.554384003834.issue16493@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:28:32 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 19:28:32 +0000 Subject: [issue1539925] warnings in interactive sessions Message-ID: <1353266912.14.0.513236651048.issue1539925@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> needs patch versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:32:51 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 19:32:51 +0000 Subject: [issue8145] Documentation about sqlite3 isolation_level In-Reply-To: <1268643705.49.0.319902511171.issue8145@psf.upfronthosting.co.za> Message-ID: <1353267171.77.0.9089365221.issue8145@psf.upfronthosting.co.za> Ezio Melotti added the comment: Can someone review this patch? (There is a typo: s/The/This/) ---------- keywords: +easy, needs review nosy: +ezio.melotti versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:36:31 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 19:36:31 +0000 Subject: [issue10336] test_xmlrpc fails if gzip is not supported by client In-Reply-To: <1289041038.52.0.266218953067.issue10336@psf.upfronthosting.co.za> Message-ID: <1353267391.98.0.152836445395.issue10336@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> test needed type: -> behavior versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:41:22 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Nov 2012 19:41:22 +0000 Subject: [issue16143] Building with configure option "--without-doc-strings" crashes first time through PyUnicode_DecodeUTF8Stateful In-Reply-To: <1349455516.0.0.465126799391.issue16143@psf.upfronthosting.co.za> Message-ID: <1353267682.63.0.762726559587.issue16143@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Does this need to be a release blocker? I don't know what the concrete point of --without-doc-strings is. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:45:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 19:45:16 +0000 Subject: [issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash. In-Reply-To: <1349390143.92.0.685174043431.issue16137@psf.upfronthosting.co.za> Message-ID: <1353267916.34.0.101782898419.issue16137@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which includes backported issue6608 and issue8013. This should fix this crash. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file28034/asctime.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:50:01 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 18 Nov 2012 19:50:01 +0000 Subject: [issue16143] Building with configure option "--without-doc-strings" crashes first time through PyUnicode_DecodeUTF8Stateful In-Reply-To: <1349455516.0.0.465126799391.issue16143@psf.upfronthosting.co.za> Message-ID: <1353268201.14.0.709078326713.issue16143@psf.upfronthosting.co.za> Stefan Krah added the comment: The deeper issue is that globals in unicodeobject.c are used before they are initialized. So I thought that should be cleared up before the next release. Basically, strings are used as keys during type initializations *before* _PyUnicode_Init() is called. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:55:29 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 19:55:29 +0000 Subject: [issue14525] ia64-hp-hpux11.31 won't compile Python-2.6.8rc2 without -D_TERMIOS_INCLUDED In-Reply-To: <1333850075.77.0.408518012212.issue14525@psf.upfronthosting.co.za> Message-ID: <1353268529.95.0.241101096864.issue14525@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +trent versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:57:32 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 18 Nov 2012 19:57:32 +0000 Subject: [issue16143] Building with configure option "--without-doc-strings" crashes first time through PyUnicode_DecodeUTF8Stateful In-Reply-To: <1349455516.0.0.465126799391.issue16143@psf.upfronthosting.co.za> Message-ID: <1353268652.09.0.461908316237.issue16143@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:58:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 19:58:05 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1353268685.13.0.940143066173.issue10496@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 20:59:24 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 19:59:24 +0000 Subject: [issue13262] IDLE opens partially hidden In-Reply-To: <1319538134.39.0.210129529894.issue13262@psf.upfronthosting.co.za> Message-ID: <1353268764.64.0.694065679478.issue13262@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 21:00:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 20:00:14 +0000 Subject: [issue16505] Drop Py_TPFLAGS_INT_SUBCLASS Message-ID: <1353268814.03.0.789884448045.issue16505@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Py_TPFLAGS_INT_SUBCLASS is not used in Python 3. Lets drop it and free a one bit for some other interesting flag. ---------- components: Interpreter Core files: drop_int_tpflag.patch keywords: patch messages: 175913 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Drop Py_TPFLAGS_INT_SUBCLASS type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28035/drop_int_tpflag.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 21:01:26 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 20:01:26 +0000 Subject: [issue1678077] improve telnetlib.Telnet so option negotiation becomes easie Message-ID: <1353268886.32.0.469572738829.issue1678077@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 21:01:39 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 18 Nov 2012 20:01:39 +0000 Subject: [issue14525] ia64-hp-hpux11.31 won't compile Python-2.6.8rc2 without -D_TERMIOS_INCLUDED In-Reply-To: <1333850075.77.0.408518012212.issue14525@psf.upfronthosting.co.za> Message-ID: <1353268899.85.0.735460701967.issue14525@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I should have added 'please try compiling 3.x to make sure it has the same problem' since configure might behave differently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 21:03:54 2012 From: report at bugs.python.org (Zachary Ware) Date: Sun, 18 Nov 2012 20:03:54 +0000 Subject: [issue16503] Unclear documentation regarding apply(), 'extended call syntax' In-Reply-To: <1353260116.84.0.175308282069.issue16503@psf.upfronthosting.co.za> Message-ID: <1353269034.93.0.524490689543.issue16503@psf.upfronthosting.co.za> Zachary Ware added the comment: Looks good to me, thank you Ezio! ---------- resolution: fixed -> status: closed -> open type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 21:04:19 2012 From: report at bugs.python.org (Zachary Ware) Date: Sun, 18 Nov 2012 20:04:19 +0000 Subject: [issue16503] Unclear documentation regarding apply(), 'extended call syntax' In-Reply-To: <1353260116.84.0.175308282069.issue16503@psf.upfronthosting.co.za> Message-ID: <1353269059.56.0.0421248553725.issue16503@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 21:07:47 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 20:07:47 +0000 Subject: [issue5945] PyMapping_Check returns 1 for lists In-Reply-To: <1241560036.33.0.817766851688.issue5945@psf.upfronthosting.co.za> Message-ID: <1353269267.85.0.386282793338.issue5945@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 21:15:13 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 20:15:13 +0000 Subject: [issue13223] pydoc removes 'self' in HTML for method docstrings with example code In-Reply-To: <1319050782.47.0.924539258184.issue13223@psf.upfronthosting.co.za> Message-ID: <1353269713.33.0.519313018471.issue13223@psf.upfronthosting.co.za> Ezio Melotti added the comment: V?ctor, can you address my comment on rietveld? ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 21:18:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 20:18:12 +0000 Subject: [issue16498] Unwanted link between volatile and shelve storage In-Reply-To: <1353245937.97.0.646518309195.issue16498@psf.upfronthosting.co.za> Message-ID: <1353269892.54.0.185254750073.issue16498@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > dBasis = shelve.open('cFract2.tmp','n') > i,testVal,dBasis,oldTime = 0,1,{},int(time.clock()) # Initialize As I understand, you don't use shelve object at all (except creating an empty base). Such a lot of code has no relation to the bugs in Python. Ask on the Python mailing list or on forums and may be someone help you. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 21:19:20 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 18 Nov 2012 20:19:20 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1353269960.28.0.704993069954.issue16499@psf.upfronthosting.co.za> Christian Heimes added the comment: Here is a new patch with some tests. ---------- Added file: http://bugs.python.org/file28036/isolatemode2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 21:19:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 20:19:25 +0000 Subject: [issue16498] Unwanted link between volatile and shelve storage In-Reply-To: <1353245937.97.0.646518309195.issue16498@psf.upfronthosting.co.za> Message-ID: <1353269965.36.0.868208257491.issue16498@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 21:23:53 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 20:23:53 +0000 Subject: [issue16498] Unwanted link between volatile and shelve storage In-Reply-To: <1353245937.97.0.646518309195.issue16498@psf.upfronthosting.co.za> Message-ID: <1353270233.04.0.901811492989.issue16498@psf.upfronthosting.co.za> Ezio Melotti added the comment: Indeed. ---------- stage: -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 21:25:47 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 18 Nov 2012 20:25:47 +0000 Subject: [issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash. In-Reply-To: <1349390143.92.0.685174043431.issue16137@psf.upfronthosting.co.za> Message-ID: <1353270347.53.0.281400995514.issue16137@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I recall a discussion in which it was argued that "look before you leap"-style argument checking that we implemented in py3k was a feature and backporting it to 2.x could potentially break code running on platforms with promiscuous (and possibly buggy) asctime(). I am +0 on back-porting, but would like someone else to make the call. ---------- nosy: +haypo, lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 21:46:48 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 18 Nov 2012 20:46:48 +0000 Subject: [issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object In-Reply-To: <1344732276.83.0.543554641885.issue15627@psf.upfronthosting.co.za> Message-ID: <1353271608.07.0.883890024141.issue15627@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- stage: test needed -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 21:59:27 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 18 Nov 2012 20:59:27 +0000 Subject: [issue16487] Allow ssl certificates to be speficfied from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1353272367.39.0.912389823628.issue16487@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 22:04:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Nov 2012 21:04:03 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1353272643.75.0.663099157077.issue16499@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: -I looks as antonym to -i. This is good. See also related issue12238 and issue10496. Hint: if you refers to issue as issueXXX, you can see an issue title when hover mouse over link. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 22:06:26 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 21:06:26 +0000 Subject: [issue1500504] Alternate RFC 3986 compliant URI parsing module Message-ID: <1353272786.93.0.283058718305.issue1500504@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 22:08:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 21:08:22 +0000 Subject: [issue6500] urllib2 maximum recursion depth exceeded In-Reply-To: <1247819174.12.0.0313325803352.issue6500@psf.upfronthosting.co.za> Message-ID: <1353272902.02.0.759724777101.issue6500@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 22:16:17 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 18 Nov 2012 21:16:17 +0000 Subject: [issue7782] new test for test_iter.py In-Reply-To: <1264493526.37.0.587552008343.issue7782@psf.upfronthosting.co.za> Message-ID: <3Y4Qw01gkJzRR9@mail.python.org> Roundup Robot added the comment: New changeset 4624570c1f19 by Ezio Melotti in branch '2.7': #7782: add a test for test_iter. http://hg.python.org/cpython/rev/4624570c1f19 New changeset d2054aa9bed4 by Ezio Melotti in branch '3.2': #7782: add a test for test_iter. http://hg.python.org/cpython/rev/d2054aa9bed4 New changeset 0cc209d95e70 by Ezio Melotti in branch '3.3': #7782: merge with 3.2. http://hg.python.org/cpython/rev/0cc209d95e70 New changeset d2b98a4c4251 by Ezio Melotti in branch 'default': #7782: merge with 3.3. http://hg.python.org/cpython/rev/d2b98a4c4251 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 22:19:29 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 21:19:29 +0000 Subject: [issue7782] new test for test_iter.py In-Reply-To: <1264493526.37.0.587552008343.issue7782@psf.upfronthosting.co.za> Message-ID: <1353273569.34.0.796959142782.issue7782@psf.upfronthosting.co.za> Ezio Melotti added the comment: I committed the patch as is. It run fast enough that I cannot notice any slowdown. ---------- assignee: -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 22:25:27 2012 From: report at bugs.python.org (Marco Amadori) Date: Sun, 18 Nov 2012 21:25:27 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1353273927.72.0.00164148901622.issue16480@psf.upfronthosting.co.za> Marco Amadori added the comment: > The question is: is this still necessary? Why exactly does > "posix_local" need this, and does it need it for Python 3.3, 3.4 etc? > Adding Carl to nosy, hoping he can shed some light on this. I hope to see the light on that too. ;-) Meanwhile, my problem was that after creating the virtualenv, as cited in the blog post above linked, I got stuck in installing pip (and thus distribute) in that virtualenv, because 'VENV/local/bin' is not in the $PATH (and it seems reasonable for a virtualenv that this will remain stable). So, (IMHO) if changing the $PATH is not a good idea, either python should do: 1. patch distribute and pip to do not install in ./local by default if in a VENV. (enviroment variable based?, whatever) 2. create the links after creating the VENV (my na?ve solution) Am I right or I completely hit the wrong issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 22:42:19 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 21:42:19 +0000 Subject: [issue7855] Add test cases for ctypes/winreg for issues found in IronPython In-Reply-To: <1265311030.9.0.277359551887.issue7855@psf.upfronthosting.co.za> Message-ID: <1353274939.28.0.91297469944.issue7855@psf.upfronthosting.co.za> Ezio Melotti added the comment: I made the latest 3.x patch hg import-able and cleaned up a few nits (whitespace, naming conventions, and used assertIs). I have 2 comments though: 1) the winreg test is defined in Win64WinregTests. Is it specific to x64 or should it go in BaseWinregTests instead? 2) the test_wintypes should be skipped on platforms where it's not supported. Currently if I try to run test_ctypes I get: test test_ctypes crashed -- Traceback (most recent call last): File "/home/wolf/dev/py/3.2/Lib/test/regrtest.py", line 1116, in runtest_inner indirect_test() File "/home/wolf/dev/py/3.2/Lib/test/test_ctypes.py", line 11, in test_main skipped, testcases = ctypes.test.get_tests(ctypes.test, "test_*.py", verbosity=0) File "/home/wolf/dev/py/3.2/Lib/ctypes/test/__init__.py", line 64, in get_tests mod = __import__(modname, globals(), locals(), ['*']) File "/home/wolf/dev/py/3.2/Lib/ctypes/test/test_wintypes.py", line 3, in from ctypes import wintypes File "/home/wolf/dev/py/3.2/Lib/ctypes/wintypes.py", line 20, in class VARIANT_BOOL(ctypes._SimpleCData): ValueError: _type_ 'v' not supported I get this error on 2.7/3.2/3.3/3.4 when I try to import wintypes. Maybe this should be an ImportError instead? Unfortunately I'm on Linux, so I can test and commit the patch myself, but feel free to address my comments and commit it. ---------- versions: +Python 3.3, Python 3.4 -Python 3.1 Added file: http://bugs.python.org/file28037/issue7855-3.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 22:53:15 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 21:53:15 +0000 Subject: [issue1284316] Win32: Security problem with default installation directory Message-ID: <1353275595.17.0.228790509074.issue1284316@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 22:54:59 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 21:54:59 +0000 Subject: [issue12886] datetime.strptime parses input wrong In-Reply-To: <1314974007.55.0.285568781981.issue12886@psf.upfronthosting.co.za> Message-ID: <1353275699.77.0.852763831952.issue12886@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 23:02:31 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 22:02:31 +0000 Subject: [issue12870] Regex object should have introspection methods In-Reply-To: <1314811774.34.0.509713448629.issue12870@psf.upfronthosting.co.za> Message-ID: <1353276151.91.0.412198435558.issue12870@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 23:03:34 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Nov 2012 22:03:34 +0000 Subject: [issue13094] Need Programming FAQ entry for the behavior of closures In-Reply-To: <1317652797.3.0.357677492942.issue13094@psf.upfronthosting.co.za> Message-ID: <1353276214.36.0.859978120518.issue13094@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy stage: -> needs patch type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 23:24:37 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 18 Nov 2012 22:24:37 +0000 Subject: [issue16506] devguide should have table of contents Message-ID: <1353277477.34.0.0074204417651.issue16506@psf.upfronthosting.co.za> New submission from Chris Jerdonek: Currently, the devguide does not have a table of contents. For example, clicking the "Table of Contents" link in the left column does nothing. My feeling is that a proper table of contents will make it easier to understand how the devguide is organized at a high level and to track what parts one has read and not read. It is currently not so easy to do this. ---------- components: Devguide messages: 175926 nosy: chris.jerdonek, eric.araujo, ezio.melotti, ncoghlan priority: normal severity: normal status: open title: devguide should have table of contents _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 18 23:32:54 2012 From: report at bugs.python.org (Trent Nelson) Date: Sun, 18 Nov 2012 22:32:54 +0000 Subject: [issue16507] Patch selectmodule.c to support WSAPoll on Windows Message-ID: <1353277974.19.0.012295377293.issue16507@psf.upfronthosting.co.za> New submission from Trent Nelson: Attached patch adds select.poll() support on Windows via WSAPoll. It's hacky; I was curious to see whether or not it could be done, and whether or not tulip's pollster would work with it. It compiles and works, but doesn't play very nicely with tulip. Also, just about every lick of code that tests poll() does so in a UNIX-specific way, so it's hard to test. As with select, WSAPoll() will barf if you feed it anything other than SOCKETs (i.e. it doesn't work against non-socket file descriptors). ---------- files: wsapoll.patch keywords: patch messages: 175927 nosy: trent priority: normal severity: normal status: open title: Patch selectmodule.c to support WSAPoll on Windows Added file: http://bugs.python.org/file28038/wsapoll.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 00:08:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 18 Nov 2012 23:08:39 +0000 Subject: [issue6308] termios fix for QNX breaks HP-UX In-Reply-To: <1245342143.83.0.0806702305005.issue6308@psf.upfronthosting.co.za> Message-ID: <3Y4TPf388DzRHF@mail.python.org> Roundup Robot added the comment: New changeset 9dd4638de73b by Stefan Krah in branch 'default': Issue #6308: Try to fix the termios build failure on HP-UX. http://hg.python.org/cpython/rev/9dd4638de73b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 00:19:19 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Nov 2012 23:19:19 +0000 Subject: [issue16507] Patch selectmodule.c to support WSAPoll on Windows In-Reply-To: <1353277974.19.0.012295377293.issue16507@psf.upfronthosting.co.za> Message-ID: <1353280759.87.0.540665541215.issue16507@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Related post: http://daniel.haxx.se/blog/2012/10/10/wsapoll-is-broken/ ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 00:26:26 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 18 Nov 2012 23:26:26 +0000 Subject: [issue16501] deprecate RISCOS "support" In-Reply-To: <1353258907.33.0.855880480918.issue16501@psf.upfronthosting.co.za> Message-ID: <1353281186.89.0.00251067409508.issue16501@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Note that 3e3bc84122d7 claims that RISCOS support was removed in 3.0. Skip removed some in 4d2aa4bfb2d6, and more in a2859ae89da9 and 4d2aa4bfb2d6. So I don't think that a deprecation release is necessary. Updating PEP 11 is still a good thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 00:27:57 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 18 Nov 2012 23:27:57 +0000 Subject: [issue16501] deprecate RISCOS "support" In-Reply-To: <1353258907.33.0.855880480918.issue16501@psf.upfronthosting.co.za> Message-ID: <1353281277.08.0.421012585547.issue16501@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The third rev should have bee 48a31b0bf501. These hg revision numbers are too error prone :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 00:28:00 2012 From: report at bugs.python.org (Roger Serwy) Date: Sun, 18 Nov 2012 23:28:00 +0000 Subject: [issue12274] "Print window" menu on IDLE aborts whole application In-Reply-To: <1307427367.68.0.910605365077.issue12274@psf.upfronthosting.co.za> Message-ID: <1353281280.76.0.286545995637.issue12274@psf.upfronthosting.co.za> Changes by Roger Serwy : ---------- dependencies: +Create a unittest framework for IDLE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 00:44:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 18 Nov 2012 23:44:52 +0000 Subject: [issue16501] deprecate RISCOS "support" In-Reply-To: <1353258907.33.0.855880480918.issue16501@psf.upfronthosting.co.za> Message-ID: <3Y4VCR3RTJzN7j@mail.python.org> Roundup Robot added the comment: New changeset ceb0184c7f44 by Christian Heimes in branch 'default': RISCOS support has been removed a long time ago. Remove last remains in sys.flags code. #16501 can be closed, too. http://hg.python.org/cpython/rev/ceb0184c7f44 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 00:49:53 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 18 Nov 2012 23:49:53 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1353248043.83.0.915044115508.issue15031@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: I thought about that, but decided that being able to hook the compilation step and the reading from the cache step without overriding get code completely is a separate design problem from providing a public API for reading the bytecode container format. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 01:00:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 19 Nov 2012 00:00:14 +0000 Subject: [issue16501] deprecate RISCOS "support" In-Reply-To: <1353258907.33.0.855880480918.issue16501@psf.upfronthosting.co.za> Message-ID: <3Y4VY94g5wzQSv@mail.python.org> Roundup Robot added the comment: New changeset 6b74a93a2b8a by Christian Heimes in branch 'default': Remove sys.platform == 'riscos' checks from some Python and test files. #16501 http://hg.python.org/cpython/rev/6b74a93a2b8a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 01:04:23 2012 From: report at bugs.python.org (Stefan Krah) Date: Mon, 19 Nov 2012 00:04:23 +0000 Subject: [issue6308] termios fix for QNX breaks HP-UX In-Reply-To: <1245342143.83.0.0806702305005.issue6308@psf.upfronthosting.co.za> Message-ID: <1353283463.93.0.3710097314.issue6308@psf.upfronthosting.co.za> Stefan Krah added the comment: Fixed in 2.7, 3.3 and 3.4. ---------- keywords: +buildbot nosy: +skrah resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 01:05:32 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 19 Nov 2012 00:05:32 +0000 Subject: [issue16501] deprecate RISCOS "support" In-Reply-To: <1353258907.33.0.855880480918.issue16501@psf.upfronthosting.co.za> Message-ID: <1353283532.21.0.600824085854.issue16501@psf.upfronthosting.co.za> Christian Heimes added the comment: I've removed the remaining ifdef from the sys.flags code, site.py and tests. The remaining code lines are 3rd party code. I'm not sure about the last two lines. $ find -name '*.[ch]' -or -name '*.py' | xargs grep -i riscos ./Modules/zlib/zutil.h:#if defined(_BEOS_) || defined(RISCOS) ./Modules/zlib/example.c:#if defined(VMS) || defined(RISCOS) ./Modules/zlib/minigzip.c:#ifdef RISCOS ./Objects/floatobject.c: * systems raise an exception then (RISCOS was mentioned as one, ./Lib/test/test_email/test_email.py: eq(part2.get_content_type(), 'application/riscos') ./Mac/Tools/bundlebuilder.py: 'org.python.core', 'riscos', 'riscosenviron', 'riscospath' ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 01:08:47 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 19 Nov 2012 00:08:47 +0000 Subject: [issue16501] deprecate RISCOS "support" In-Reply-To: <1353258907.33.0.855880480918.issue16501@psf.upfronthosting.co.za> Message-ID: <1353283727.89.0.342042441141.issue16501@psf.upfronthosting.co.za> Martin v. L?wis added the comment: application/riscos remains a valid MIME type, see http://www.iana.org/assignments/media-types/application/riscos I believe it's safe to remove the riscos modules from the Mac build process... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 01:14:41 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 19 Nov 2012 00:14:41 +0000 Subject: [issue16508] include the "object" type in the lists of documented types Message-ID: <1353284081.12.0.684350303879.issue16508@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to add the "object" type to the list of types documented in the language reference's standard type hierarchy and the library reference's list of built-in types: http://docs.python.org/dev/reference/datamodel.html#the-standard-type-hierarchy http://docs.python.org/dev/library/stdtypes.html#other-built-in-types The constructor is documented here: http://docs.python.org/dev/library/functions.html#object In the documentation, it might also be worth stating explicitly which of the special methods the object type defines: http://docs.python.org/dev/reference/datamodel.html#special-method-names For example, object.__str__ is defined, but object.__bytes__ is not. By doing this, users will know which special methods user-defined classes will automatically inherit. ---------- assignee: docs at python components: Documentation messages: 175938 nosy: chris.jerdonek, docs at python, eric.araujo, ezio.melotti, georg.brandl priority: normal severity: normal status: open title: include the "object" type in the lists of documented types type: enhancement versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 01:16:11 2012 From: report at bugs.python.org (Stefan Krah) Date: Mon, 19 Nov 2012 00:16:11 +0000 Subject: [issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0 In-Reply-To: <1344473974.14.0.584788696764.issue15599@psf.upfronthosting.co.za> Message-ID: <1353284171.27.0.317897946793.issue15599@psf.upfronthosting.co.za> Stefan Krah added the comment: Not that it helps much, but here are recent failures on Windows and FreeBSD: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/5938/steps/test/logs/stdio http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/5936/steps/test/logs/stdio http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/3737/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 02:58:33 2012 From: report at bugs.python.org (Terry Cooper) Date: Mon, 19 Nov 2012 01:58:33 +0000 Subject: [issue16498] Unwanted link between volatile and shelve storage In-Reply-To: <1353245937.97.0.646518309195.issue16498@psf.upfronthosting.co.za> Message-ID: <25587983.1353290309534.JavaMail.root@mswamui-bichon.atl.sa.earthlink.net> Terry Cooper added the comment: This is easy to reply to. You better believe I've tried printing gList1 and dBasis[163]. I've also scrapped a predecessor function named combo (which is included in the attachment) and written its successor, viz., "combine". I bent over backwards to make sure that the two functions did NOTHING the same way. Guess what. Both combo and combine screw up exactly the same record that they aren't supposed to know about in exactly the same way. So I'm pretty sure Python remembers that it originally got one ITEM on gList from dBasis[161]. So I think I know that the problem is to determine WHY Python remembers that. Of course what oneo thinks one knows is always subject to revision--especially what one thinks one knows about the truth. --Terry -----Original Message----- >From: Ezio Melotti >Sent: Nov 18, 2012 2:07 PM >To: ttcooper at indy.net >Subject: [issue16498] Unwanted link between volatile and shelve storage > > >Ezio Melotti added the comment: > >> They are obviously not the same record > >Have you tried printing gList1 and dBasis[163], their repr and their ids? > >---------- >nosy: +ezio.melotti > >_______________________________________ >Python tracker > >_______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 03:17:37 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 19 Nov 2012 02:17:37 +0000 Subject: [issue16506] devguide should have table of contents In-Reply-To: <1353277477.34.0.0074204417651.issue16506@psf.upfronthosting.co.za> Message-ID: <1353291457.48.0.100602769075.issue16506@psf.upfronthosting.co.za> Brett Cannon added the comment: The link does nothing because what is directly below the TOC link is the table of contents. There was originally a TOC but it was removed when it pushed too much of the quick start section off of the screen at initial load. You also don't want a large TOC as that can seem daunting to a newbie. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 03:33:17 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 19 Nov 2012 02:33:17 +0000 Subject: [issue16506] devguide should have table of contents In-Reply-To: <1353277477.34.0.0074204417651.issue16506@psf.upfronthosting.co.za> Message-ID: <1353292397.55.0.590134272911.issue16506@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > The link does nothing because what is directly below the TOC link is the table of contents. Yes, that's the impression one gets when the link doesn't work. But the links below are just the sections for the current page rather than the table of contents for the devguide. Compare, for example, the left column here: http://docs.python.org/dev/library/argparse.html The table of contents for the devguide can go on a separate page like it's done for the Python documentation. We can decide what level of sectioning to display (assuming Sphinx lets you configure that). Personally, I think I would prefer a shallow TOC (i.e. one or two levels). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 03:39:29 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 19 Nov 2012 02:39:29 +0000 Subject: [issue16498] Unwanted link between volatile and shelve storage In-Reply-To: <1353245937.97.0.646518309195.issue16498@psf.upfronthosting.co.za> Message-ID: <1353292769.07.0.829814679214.issue16498@psf.upfronthosting.co.za> R. David Murray added the comment: If it "got it" from dBasis[163] via item assignment (say gList1[i1][1] = dBasis[163]), then yes, Python remembers that. Names just hold pointers to objects, so after that assignment gList1[i1][1] points to the same object as dBasis[163] does. If that object is mutable, and you mutate it (as += will do, if the object is mutable), both names will still reference the same object, the one that has been changed. As Serhiy suggested, you are more likely to get help with this on python-list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 03:50:06 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 19 Nov 2012 02:50:06 +0000 Subject: [issue16505] Drop Py_TPFLAGS_INT_SUBCLASS In-Reply-To: <1353268814.03.0.789884448045.issue16505@psf.upfronthosting.co.za> Message-ID: <3Y4ZK91sqlzQFC@mail.python.org> Roundup Robot added the comment: New changeset cf606c403f14 by Benjamin Peterson in branch 'default': remove unused flag (closes #16505) http://hg.python.org/cpython/rev/cf606c403f14 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 04:04:48 2012 From: report at bugs.python.org (Terry Cooper) Date: Mon, 19 Nov 2012 03:04:48 +0000 Subject: [issue16498] Unwanted link between volatile and shelve storage In-Reply-To: <1353245937.97.0.646518309195.issue16498@psf.upfronthosting.co.za> Message-ID: <2070827.1353294285374.JavaMail.root@mswamui-bichon.atl.sa.earthlink.net> Terry Cooper added the comment: Got your message before I got his. Thanks for the reference to python-list. -----Original Message----- >From: "R. David Murray" >Sent: Nov 18, 2012 9:39 PM >To: ttcooper at indy.net >Subject: [issue16498] Unwanted link between volatile and shelve storage > > >R. David Murray added the comment: > >If it "got it" from dBasis[163] via item assignment (say gList1[i1][1] = dBasis[163]), then yes, Python remembers that. Names just hold pointers to objects, so after that assignment gList1[i1][1] points to the same object as dBasis[163] does. If that object is mutable, and you mutate it (as += will do, if the object is mutable), both names will still reference the same object, the one that has been changed. > >As Serhiy suggested, you are more likely to get help with this on python-list. > >---------- > >_______________________________________ >Python tracker > >_______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 06:44:48 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 19 Nov 2012 05:44:48 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353303888.22.0.541341205444.issue16475@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 08:40:52 2012 From: report at bugs.python.org (Daniel Micay) Date: Mon, 19 Nov 2012 07:40:52 +0000 Subject: [issue16509] sqlite3 docs do not explain check_same_thread Message-ID: <1353310851.97.0.745365364193.issue16509@psf.upfronthosting.co.za> New submission from Daniel Micay: The sqlite3 documentation now includes a Multithreading section explaining issues with older sqlite versions, but still doesn't directly cover disabling check_same_thread beyond listing it as a possible parameter. As far as I can tell, reusing sqlite connections in different threads (such as from a pool) is safe, as long as no attempt is made to use them from multiple threads with no locking. ---------- assignee: docs at python components: Documentation messages: 175946 nosy: docs at python, strcat priority: normal severity: normal status: open title: sqlite3 docs do not explain check_same_thread type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 08:54:34 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 19 Nov 2012 07:54:34 +0000 Subject: [issue16495] bytes_decode() unnecessarily examines encoding In-Reply-To: <1353187789.37.0.881944433109.issue16495@psf.upfronthosting.co.za> Message-ID: <1353311674.09.0.00117852490045.issue16495@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Patch attached. The tests pass. ---------- keywords: +patch Added file: http://bugs.python.org/file28039/issue-16495-1-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 09:12:40 2012 From: report at bugs.python.org (Trent Nelson) Date: Mon, 19 Nov 2012 08:12:40 +0000 Subject: [issue16507] Patch selectmodule.c to support WSAPoll on Windows In-Reply-To: <1353280759.87.0.540665541215.issue16507@psf.upfronthosting.co.za> Message-ID: <20121119081227.GA31072@snakebite.org> Trent Nelson added the comment: On Sun, Nov 18, 2012 at 03:19:19PM -0800, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Related post: > http://daniel.haxx.se/blog/2012/10/10/wsapoll-is-broken/ Yeah, came across that yesterday. Few other relevant links, for the records: http://social.msdn.microsoft.com/Forums/en/wsk/thread/18769abd-fca0-4d3c-9884-1a38ce27ae90 (has a code example of what doesn't work) http://www.codeproject.com/Articles/140533/The-Differences-Between-Network-Calls-in-Windows-a http://blogs.msdn.com/b/wndp/archive/2006/10/26/wsapoll.aspx http://curl.haxx.se/mail/lib-2012-10/0038.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 09:20:30 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 19 Nov 2012 08:20:30 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353249000.81.0.759402366146.issue16499@psf.upfronthosting.co.za> Message-ID: <50A9EBCA.6000402@egenix.com> Marc-Andre Lemburg added the comment: On 18.11.2012 15:30, Christian Heimes wrote: > > Christian Heimes added the comment: > > The first patch implements the arg parsing, sys.flags, PySys_SetArgv() modification that doesn't include the current directory as sys.path[0] and some doc updates. > > Open issue: > > - MAL has addressed concerns that '-I' is too similar to GCC's -I (include path) option > - Is 'isolated mode' a good term to describe the feature? IMO 'restricted mode' is also a good name but it sounds too similar to PyPy's restricted python. Some other possible names: - unmodified mode (-U) - encapsulated mode (-e) - installation only mode (-I) - non-local mode (-l) Since this mode will often be used for testing Python installation and setup issues, perhaps emphasizing on the testing nature would be good... - test installation mode (-T) FWIW: Isolated and -I works for me as well. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 19 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 09:27:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 19 Nov 2012 08:27:03 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1353313623.91.0.803075037942.issue13538@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Updating patch after Ezio's review on Rietveld. ---------- Added file: http://bugs.python.org/file28040/issue-13538-6-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 10:16:15 2012 From: report at bugs.python.org (Kushal Das) Date: Mon, 19 Nov 2012 09:16:15 +0000 Subject: [issue16493] Document the 'optimize' argument to compile() In-Reply-To: <1353167567.95.0.716171753234.issue16493@psf.upfronthosting.co.za> Message-ID: <1353316575.24.0.0900954970793.issue16493@psf.upfronthosting.co.za> Kushal Das added the comment: I guess somebody already did the work http://docs.python.org/3.4/library/functions.html?highlight=compile#compile ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 10:27:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 19 Nov 2012 09:27:42 +0000 Subject: [issue16493] Document the 'optimize' argument to compile() In-Reply-To: <1353167567.95.0.716171753234.issue16493@psf.upfronthosting.co.za> Message-ID: <1353317262.06.0.982256953193.issue16493@psf.upfronthosting.co.za> Ezio Melotti added the comment: Looks like Georg did: 713c6b6ca5ce. The documentation is missing on 2.7, but AFAICT that's because the arg is only in 3.2+. Brett, if you meant that this should be documented somewhere else, feel free to reopen the issue. ---------- resolution: -> out of date stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 11:44:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 19 Nov 2012 10:44:20 +0000 Subject: [issue16510] Using appropriate checks in tests Message-ID: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch upgrades tests to use specialized checks added in 3.1 and 3.2 (assertIsNone(x) instead assertTrue(x is None), assertLess(a, b) instead assertTrue(a < b), etc). This modern checks provide a more useful error message in case of a fail. Replaced only those checks that are not related to the tested operators. For example, assertTrue(a < b) preserved if the operator "<" is tested. ---------- components: Tests files: tests_asserts.patch keywords: patch messages: 175953 nosy: ezio.melotti, michael.foord, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Using appropriate checks in tests type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28041/tests_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 11:45:14 2012 From: report at bugs.python.org (Thomas Kluyver) Date: Mon, 19 Nov 2012 10:45:14 +0000 Subject: [issue11679] readline interferes with characters beginning with byte \xe9 In-Reply-To: <1301099319.36.0.392064400408.issue11679@psf.upfronthosting.co.za> Message-ID: <1353321914.58.0.202436964013.issue11679@psf.upfronthosting.co.za> Thomas Kluyver added the comment: OK, thanks, and sorry for the noise. I've closed this issue. Looking at the readline manual, it looks like this is tied up with the options input-meta, output-meta and convert-meta. Fiddling around with .inputrc hasn't clarified exactly what they do, but it seems that the terminal can either handle unicode, or shortcuts involving meta (alt), but not both. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 12:35:43 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 19 Nov 2012 11:35:43 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353324943.51.0.837638195315.issue16475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: If you have string sharing, adding support for general sharing falls automatically out without any effort. There is no reason _not_ to support it, in other words. Marshal may be primarily used for .pyc files but it is not the only usage. It is a very fast and powerful serializer for data that is not subject to the overhead or safety concerns of the general pickle protocol. This is illustrated by the following code (2.7): case TYPE_CODE: if (PyEval_GetRestricted()) { PyErr_SetString(PyExc_RuntimeError, "cannot unmarshal code objects in " "restricted execution mode"); Obviously, this shows that marshal is still expected to work and be useful even if not for pickling code objects. It is good to know that you care about the size of the .pyc files, Martin. But we should bear in mind that this size difference is directly reflected in the memory use of the loaded data. A reduction by 25% of the .pyc size is roughly equivalent to a 25% memory use reduction by the loaded code object. I haven't produced data about the savings of general object reuse because it relies on my "recode" code optimizer module which is still work in progress. However, I will do some tests and let you know. Suffice to say that it is enormously frustrating to re-generate code objects with an optimization tool, sharing common or identical sub-objects and so on, and then finding that the marshal module undoes all of that. I'll report back with additional figures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 12:54:13 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 19 Nov 2012 11:54:13 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1353326053.8.0.672071349796.issue16510@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the work, but we don't generally make bulk changes like this. It generates churn in the codebase, and has the risk of inadvertently changing the meaning of the tests, to little actual benefit. Instead we modernize tests when we touch them for other reasons and are in a position to confirm that the changes do not change the meaning of the tests. (I realize that for most of your changes the meaning is trivially preserved...but when you make a lot of changes you are almost certain to make some mistakes...thus the resistance to doing bulk updates.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 13:17:07 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 19 Nov 2012 12:17:07 +0000 Subject: [issue16506] devguide should have table of contents In-Reply-To: <1353277477.34.0.0074204417651.issue16506@psf.upfronthosting.co.za> Message-ID: <1353327427.37.0.989370114243.issue16506@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching patch. Out-of-the-box at least, Sphinx seems to have the constraint that the "home page" (what the link in the upper-left corner points to) needs to be the same as the table of contents (what the "table of contents" link in the left column points to). Retaining the same home page seems to be the most important, so for now at least, I'm proposing putting the table of contents at the bottom of the home page (with the home page itself not part of the contents). I also re-did the header formatting for a few pages to make the nesting levels match the page list. ---------- keywords: +needs review, patch stage: -> patch review Added file: http://bugs.python.org/file28042/issue-16506-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 13:45:06 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 19 Nov 2012 12:45:06 +0000 Subject: [issue16506] devguide should have table of contents In-Reply-To: <1353277477.34.0.0074204417651.issue16506@psf.upfronthosting.co.za> Message-ID: <1353329106.56.0.269784096339.issue16506@psf.upfronthosting.co.za> Nick Coghlan added the comment: Sounds good to me - I was looking for a link to the maintainer list the other day, and there doesn't appear to be one at the moment. Having a reasonably complete ToC/site map deals with that kind of problem, and putting it at the bottom helps avoid overwhelming newcomers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 13:46:45 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 19 Nov 2012 12:46:45 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353329205.67.0.660288980806.issue16475@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 14:50:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 19 Nov 2012 13:50:05 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353333005.55.0.577633866243.issue16475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is no many sense to use references for TYPE_INT whose representation size not greater then a reference representation size. I doubt about references to mutable objects. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 14:58:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 19 Nov 2012 13:58:54 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1353333534.07.0.84798175614.issue16510@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I understand this. I checked the patch few times, with long (more than a month) intervals between inspections. If someone wants to modernize some tests, he can turn to this patch for reference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 16:16:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 19 Nov 2012 15:16:35 +0000 Subject: [issue9613] Python considers pid longs under 64-bit Windows In-Reply-To: <1281895347.49.0.271541660208.issue9613@psf.upfronthosting.co.za> Message-ID: <1353338195.25.0.795565587034.issue9613@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 16:18:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 19 Nov 2012 15:18:13 +0000 Subject: [issue3580] failures in test_os In-Reply-To: <1218991904.92.0.339312182303.issue3580@psf.upfronthosting.co.za> Message-ID: <1353338293.43.0.78962439724.issue3580@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is this reproduced on modern Python versions? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 16:38:40 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 19 Nov 2012 15:38:40 +0000 Subject: [issue16491] try-except-raise-bug In-Reply-To: <9C3C06E7F0934B209166A3DC454F8D19@HansPc> Message-ID: <1353339520.38.0.171049352636.issue16491@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 17:18:21 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 19 Nov 2012 16:18:21 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353341901.46.0.734791005055.issue16475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Ok, I did some tests with my recode module. The following are the sizes of the marshal data: test2To3 ... 24748 24748 212430 212430 test3To3 ... 18420 17848 178969 174806 test4To3 ... 18425 18411 178969 178550 The columns: a) test_marshal.py without transform b) test_marshal.py with recode.intern() (folding common objects) c) and d): decimal.py module (the largest one in lib) The lines: 1) Version 2 of the protocol. 2) Version 3 of the protocol (object instancing and the works) 3) Version 4, an dummy version that only instances strings) As expected, there is no difference between version 3 and 4 unless I employ the recode module to fold common subobjects. This brings an additional saving of some 3% bringing the total reduction up to 28% and 18% respectively. Note that the transform is a simple recursive folding of objects. common argument lists, such as (self) are subject to this. No renaming of local variables or other stripping is performed. So, although the "recode" module is work in progress, and not the subject of this "defect", its use shows how it is important to be able to support proper instancing in serialization protocols. Implementation note: The trick of using a bit flag on the type to indicate a slot reservation in the instance list is one that has been in use in CCP?s own "Marshal" format, a proprietary serialization format based on marshal back in 2002 (adding many more special opcodes and other stuff) Serhiy: There is no reason _not_ to reuse INT objects if we are doing it for other immutables to. As you note, the size of the data is the same. This will ensure that integers that are not cached can be folded into the same object, e.g. the value 123, if used in two functions, can be the same int object. I should also point out that the marshal protocol takes care to be able to serialize lists, sets and frozensets correctly, the latter being added in version 2.4. This despite the fact that code objects don't make use of these. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 18:02:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 19 Nov 2012 17:02:14 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353344534.93.0.629469083422.issue16475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The following are the sizes of the marshal data: Can you please measure the time of unmarshalling? It would be interesting. If you can count the statistics about marshalled types (what percent of shared and non shared integers, strings, etc), it would also be very interesting. > There is no reason _not_ to reuse INT objects if we are doing it for other immutables to. There is at least one reason. This increases size of the refs table. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 18:40:10 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Nov 2012 17:40:10 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353346810.15.0.577857416433.issue16475@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I should also point out that the marshal protocol takes care to be > able to serialize lists, sets and frozensets correctly, the latter > being added in version 2.4. This despite the fact that code objects > don't make use of these. Code objects do use frozensets: >>> def f(x): ... return x in {1,2,3,4,5,6} ... >>> dis.dis(f) 2 0 LOAD_FAST 0 (x) 3 LOAD_CONST 7 (frozenset({1, 2, 3, 4, 5, 6})) 6 COMPARE_OP 6 (in) 9 RETURN_VALUE I don't think marshal supports any type that isn't (or hasn't been) used in code objects. > Obviously, this shows that marshal is still expected to work and be > useful even if not for pickling code objects. The module officially intended for general-purpose serialization is pickle; if you use marshal for such a purpose, you're on your own. If you think pickle is not good enough, your improvements are welcome. > As expected, there is no difference between version 3 and 4 unless > I employ the recode module to fold common subobjects. This brings > an additional saving of some 3% bringing the total reduction up to > 28% and 18% respectively. 3% doesn't sound like a worthwhile improvement at all. > The trick of using a bit flag on the type to indicate a slot > reservation in the instance list is one that has been in use in > CCP?s own "Marshal" format, a proprietary serialization format > based on marshal back in 2002 (adding many more special opcodes > and other stuff) Why don't you release your "proprietary marshal" on pypi? You would get feedback and a sense of whether people are interested in your approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 19:18:01 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 19 Nov 2012 18:18:01 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353349081.72.0.300201545597.issue16496@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 20:36:10 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 19 Nov 2012 19:36:10 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1353353770.43.0.583935654336.issue16499@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file28024/isolatemode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 20:36:18 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 19 Nov 2012 19:36:18 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1353353778.92.0.508305020102.issue16499@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file28036/isolatemode2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 20:55:58 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 19 Nov 2012 19:55:58 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1353354958.34.0.189471869884.issue16499@psf.upfronthosting.co.za> Christian Heimes added the comment: New patch with typo fixes and update for recent modification in the make_flags() function. Marc: The patch was motivated by use cases like Barry's issue with 3rd party software that accidentally messes with Python scripts like lsb_release. Your use case (testing) is valid but not the main focus here. Unmodified mode doesn't fit the bill either, Python can still import system wide packages or modifications from a venv. Apropos venv, I need to check how the option is affected by venv. ---------- Added file: http://bugs.python.org/file28043/isolatemode3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 21:29:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 19 Nov 2012 20:29:46 +0000 Subject: [issue16506] devguide should have table of contents In-Reply-To: <1353277477.34.0.0074204417651.issue16506@psf.upfronthosting.co.za> Message-ID: <3Y51qt1BhyzQQB@mail.python.org> Roundup Robot added the comment: New changeset 996b72dd1e31 by Chris Jerdonek in branch 'default': Unhide and move table of contents to bottom of home page (issue #16506). http://hg.python.org/devguide/rev/996b72dd1e31 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 21:31:35 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 19 Nov 2012 20:31:35 +0000 Subject: [issue16506] devguide should have table of contents In-Reply-To: <1353277477.34.0.0074204417651.issue16506@psf.upfronthosting.co.za> Message-ID: <1353357095.68.0.647691428695.issue16506@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 21:55:20 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 19 Nov 2012 20:55:20 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1353358520.66.0.154173493999.issue16500@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks Richard! My first reaction was YAGNI but after I read the two tickets I now understand the need for three different hooks. I suggest that we implement our own hooks like the http://linux.die.net/man/3/pthread_atfork function, especially the order of function calls: The parent and child fork handlers shall be called in the order in which they were established by calls to pthread_atfork(). The prepare fork handlers shall be called in the opposite order. I like to focus on three hooks + the Python API and leave the usage of the hooks to other developers. Proposal: * Introduce a new module called atfork (Modules/atforkmodule.c) that is build into the core. * Move PyOS_AfterFork to Modules/atforkmodule.c. * Add PyOS_BeforeFork() (or PyOS_PrepareFork() ?) and PyOS_AfterForkParent() * call the two new methods around the calls to fork() in the stdlib. I'm not yet sure how to implement the Python API. I could either implement six methods: atfork.register_before_fork(callable, *args, **kwargs) atfork.register_after_fork_child(callable, *args, **kwargs) atfork.register_after_fork_parent(callable, *args, **kwargs) atfork.unregister_before_fork(callable) atfork.unregister_after_fork_child(callable) atfork.unregister_after_fork_parent(callable) or two: atfork.register(prepare=None, parent=None, child=None, *args, **kwargs) atfork.unregister(prepare=None, parent=None, child=None) ---------- nosy: +gregory.p.smith, twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 22:00:49 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 19 Nov 2012 21:00:49 +0000 Subject: [issue16482] pdb.set_trace() clobbering traceback on error In-Reply-To: <1353002125.56.0.265106335805.issue16482@psf.upfronthosting.co.za> Message-ID: <1353358849.96.0.3507751882.issue16482@psf.upfronthosting.co.za> Xavier de Gaye added the comment: The top level frame line number is not updated because it has a local trace function while the global trace function is None. This is related to issue 7238. The following patch fixes the issue. The patch removes the local trace at the top level frame and makes sure it is not reinstalled when returning from the current trace function. diff --git a/Lib/bdb.py b/Lib/bdb.py --- a/Lib/bdb.py +++ b/Lib/bdb.py @@ -64,6 +64,10 @@ if self.stop_here(frame) or self.break_here(frame): self.user_line(frame) if self.quitting: raise BdbQuit + # Do not re-install the local trace when we are finished debugging, + # see issues 16482 and 7238. + if not sys.gettrace(): + return None return self.trace_dispatch def dispatch_call(self, frame, arg): @@ -231,8 +235,10 @@ # no breakpoints; run without debugger overhead sys.settrace(None) frame = sys._getframe().f_back - while frame and frame is not self.botframe: + while frame: del frame.f_trace + if frame is self.botframe: + break frame = frame.f_back def set_quit(self): The following code is a minimum implementation of pdb with the patch applied and the associated code to test it. class Bdb: def trace_dispatch(self, frame, event, arg): self.set_continue() if sys.gettrace(): return self.trace_dispatch def set_trace(self, frame): self.botframe = frame frame.f_trace = self.trace_dispatch sys.settrace(self.trace_dispatch) def set_continue(self): sys.settrace(None) del self.botframe.f_trace frame = sys._getframe() d = Bdb() d.set_trace(frame) y = "line of code not triggering an error" x = 1 assert x != 1 ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 22:05:45 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 19 Nov 2012 21:05:45 +0000 Subject: [issue7238] frame.f_lineno doesn't get updated after local trace function assigned to it In-Reply-To: <1256836618.71.0.0275056583438.issue7238@psf.upfronthosting.co.za> Message-ID: <1353359145.37.0.702054172892.issue7238@psf.upfronthosting.co.za> Xavier de Gaye added the comment: See also the related issue 16482. ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 22:54:52 2012 From: report at bugs.python.org (rurpy the second) Date: Mon, 19 Nov 2012 21:54:52 +0000 Subject: [issue16180] cannot quit pdb when there is a syntax error in the debuggee (must kill it) In-Reply-To: <1349811204.12.0.797224741983.issue16180@psf.upfronthosting.co.za> Message-ID: <1353362092.12.0.0688634033155.issue16180@psf.upfronthosting.co.za> rurpy the second added the comment: This continues to be a problem on Python-3.3.0 ---------- nosy: +rurpy2 versions: +Python 3.3 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 23:28:04 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Nov 2012 22:28:04 +0000 Subject: [issue3580] failures in test_os In-Reply-To: <1218991904.92.0.339312182303.issue3580@psf.upfronthosting.co.za> Message-ID: <1353364084.53.0.672639387508.issue3580@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't know. Anyway, it is not really a Python bug, so I suggest we close it. ---------- resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 23:29:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Nov 2012 22:29:42 +0000 Subject: [issue1284316] Win32: Security problem with default installation directory Message-ID: <1353364182.08.0.88073864082.issue1284316@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 19 23:43:50 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 19 Nov 2012 22:43:50 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1353365030.15.0.682380769379.issue16500@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Note that Gregory P. Smith has written http://code.google.com/p/python-atfork/ I also started a pure python patch but did not get round it posting it. (It also implements the fork lock idea.) I'll attach it here. How do you intend to handle the propagation of exceptions? I decided that after atfork.atfork(prepare1, parent1, child1) atfork.atfork(prepare2, parent2, child2) ... atfork.atfork(prepareN, parentN, childN) calling "pid = os.fork()" should be equivalent to pid = None prepareN() try: ... prepare2() try: prepare1() try: pid = posix.fork() finally: parent1() if pid != 0 else child1() finally: parent2() if pid != 0 else child2() ... finally: parentN() if pid != 0 else childN() ---------- keywords: +patch Added file: http://bugs.python.org/file28044/pure-python-atfork.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 00:59:25 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 19 Nov 2012 23:59:25 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353365030.15.0.682380769379.issue16500@psf.upfronthosting.co.za> Message-ID: Gregory P. Smith added the comment: I would not allow exceptions to propagate. No caller is expecting them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 01:13:31 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 20 Nov 2012 00:13:31 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: Message-ID: Gregory P. Smith added the comment: pthread_atfork() cannot be used to implement this. Another non-python thread started by a C extension module or the C application that is embedding Python within it is always free to call fork() on its own with zero knowledge that Python even exists at all. It's guaranteed that fork will be called while the Python GIL is held in this situation which would cause any pre-fork thing registered by Python to deadlock. At best, this can be implemented manually as we do with some of the before and after fork stuff today but it must come with the caveat warning that it cannot guarantee that these things are actually called before and after fork() other than direct os.fork() calls from Python code or extremely Python aware C extension modules that may call fork() (very rare, most C & C++ libraries an extension module may be using assume that they've got the run of the house). ie: this problem is unsolvable unless you control 100% of the code being used by your entire user application. On Mon, Nov 19, 2012 at 3:59 PM, Gregory P. Smith wrote: > > Gregory P. Smith added the comment: > > I would not allow exceptions to propagate. No caller is expecting them. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 01:52:11 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 20 Nov 2012 00:52:11 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1353372731.98.0.352773408024.issue16500@psf.upfronthosting.co.za> Christian Heimes added the comment: Meh! Exception handling takes all the fun of the API and is going to make it MUCH more complicated. pthread_atfork() ignores error handling for a good reason. It's going to be hard to get it right. :/ IFF we are going to walk the hard and rocky road of exception handling, then we are going to need at least four hooks and a register function that takres four callables as arguments: register(prepare, error, parent, child). Each prepare() call pushes an error handling onto a stack. In case of an exception in a prepare handler, the error stack is popped until all error handlers are called. This approach allows a prepare handler to actually prevent a fork() call from succeeding. The parent and child hooks are always called no matter what. Exception are recorded and a warning is emitted when at least one hook fails. We might raise an exception but it has to be a special exception that ships information if fork() has succeeded, if the code runs in child or parent and about the child's PID. I fear it's going to be *really* hard to get everything right. Gregory made a good point, too. We can rely on pthread_atfork() as we are unable to predict how third party code is using fork(): "Take cover, dead locks ahead!" :) A cooperative design of the C API with three function is my preferred way, too. PyOS_AfterForkParent() should take an argument to signal a failed fork() call. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 03:16:14 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 20 Nov 2012 02:16:14 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1353377774.6.0.760328537274.issue13538@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching new patch to address Ezio's further comments (for the convenience of comparing in Rietveld). I will be committing this. ---------- Added file: http://bugs.python.org/file28045/issue-13538-7-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 05:13:17 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Nov 2012 04:13:17 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1353384797.49.0.310734763645.issue13538@psf.upfronthosting.co.za> ?ric Araujo added the comment: I left a few remarks. The patch is very nice, thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 05:44:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 20 Nov 2012 04:44:36 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1353386676.81.0.594316194567.issue13538@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, ?ric! (And thanks also to Ezio who helped quite a bit with the improvements.) I replied to your comments on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 08:39:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 20 Nov 2012 07:39:47 +0000 Subject: [issue16508] include the "object" type in the lists of documented types In-Reply-To: <1353284081.12.0.684350303879.issue16508@psf.upfronthosting.co.za> Message-ID: <1353397187.27.0.00461986206546.issue16508@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- assignee: docs at python -> chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 10:11:23 2012 From: report at bugs.python.org (Trung Doan) Date: Tue, 20 Nov 2012 09:11:23 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE Message-ID: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> New submission from Trung Doan: In Python 2.5.4's config-main.cfg file, if [EditorWindow]'s width and height are left blank or set to zero, then IDLE window won't show. Uninstalling and re-installing Python didn't help. Problem solved only when the config-main.cfg file was manually edited to give non-zero values. ---------- components: IDLE messages: 175979 nosy: doanviettrung priority: normal severity: normal status: open title: IDLE configuration file: blank height and width fields trip up IDLE type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From amauryfa at gmail.com Tue Nov 20 10:11:48 2012 From: amauryfa at gmail.com (Amaury Forgeot d'Arc) Date: Tue, 20 Nov 2012 10:11:48 +0100 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353372731.98.0.352773408024.issue16500@psf.upfronthosting.co.za> References: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> <1353372731.98.0.352773408024.issue16500@psf.upfronthosting.co.za> Message-ID: 2012/11/20 Christian Heimes > IFF we are going to walk the hard and rocky road of exception handling, > then we are going to need at least four hooks and a register function that > takres four callables as arguments: register(prepare, error, parent, > child). Each prepare() call pushes an error handling onto a stack. In case > of an exception in a prepare handler, the error stack is popped until all > error handlers are called. This approach allows a prepare handler to > actually prevent a fork() call from succeeding. > FWIW, PyPy already has a notion of fork hooks: https://bitbucket.org/pypy/pypy/src/b4e4017909bac6c102fbc883ac8d2e42fa41553b/pypy/module/posix/interp_posix.py?at=default#cl-682 Various subsystems (threads cleanup, import lock, threading.local...) register their hook functions. You may want to experiment from there :-) A new "atfork" module would be easy to implement. -- Amaury Forgeot d'Arc -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Tue Nov 20 10:11:52 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 20 Nov 2012 09:11:52 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353372731.98.0.352773408024.issue16500@psf.upfronthosting.co.za> Message-ID: Amaury Forgeot d'Arc added the comment: 2012/11/20 Christian Heimes > IFF we are going to walk the hard and rocky road of exception handling, > then we are going to need at least four hooks and a register function that > takres four callables as arguments: register(prepare, error, parent, > child). Each prepare() call pushes an error handling onto a stack. In case > of an exception in a prepare handler, the error stack is popped until all > error handlers are called. This approach allows a prepare handler to > actually prevent a fork() call from succeeding. > FWIW, PyPy already has a notion of fork hooks: https://bitbucket.org/pypy/pypy/src/b4e4017909bac6c102fbc883ac8d2e42fa41553b/pypy/module/posix/interp_posix.py?at=default#cl-682 Various subsystems (threads cleanup, import lock, threading.local...) register their hook functions. You may want to experiment from there :-) A new "atfork" module would be easy to implement. ---------- nosy: +Amaury.Forgeot.d'Arc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 10:40:03 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 20 Nov 2012 09:40:03 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353404403.85.0.824767724161.issue16475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Antoine, I understand that _you_ may not see any need for object references in marshal streams. Also, I am not going to try to convince you it is a good idea, since I have long figured out that you are against any contributions from me on some sort of principle. However, even if you cannot agree that it is a good idea, can you explain to me how it is a BAD idea? How can expanding object references to strings to all objects, using the same mechanism, be bad? How can it be bad to make the marshal format more complete with minimal effort? Keep in mind that this change removes a number of warnings and caveats present both in the documentation and the in-line comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 10:56:18 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 20 Nov 2012 09:56:18 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353405378.05.0.0134089625239.issue16475@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I have long figured out that you are against any contributions from > me on some sort of principle. I suspect that Antoine's principles have very little to do with *who* the contributions originate from, and much more to do with the content of those contributions. We've all got the same overarching goal of improving and maintaining the quality of Python. Please can we not make this personal? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 11:14:56 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 20 Nov 2012 10:14:56 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353406496.97.0.397769351442.issue16475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Serhiy, to answer your questions: > Can you please measure the time of unmarshalling? Sure. Normally, I wouldn't consider time to be important here because for code objects, unmarshaling is done only once per run However, testing it is simple: I added timeit(number=100) for unmarshaling of the different version code. 0.09614 0.09605 0.582672 0.553599 0.05590 0.05628 0.293370 0.285517 0.05703 0.05754 0.294601 0.292070 The lines are version 2, 3, and 4(*) respectively. The columns are test_marshal.py, recode.intern(test_marshal.py), decimal.py and recode.intern(decimal.py) As you see, loading time is almost halfed with version 3 and 4 compared to 2. Version 3 is also slightly faster than 4 (*)verion 4 is a "special" version that only instances strings. > If you can count the statistics about marshalled types > (what percent of shared and non shared integers, strings, etc), > it would also be very interesting. That's more tricky, at least on a type=by-type basis, but I could do a global object count. Later. > There is at least one reason. This increases size of the refs table. I checked this, by printing out the size of the instance list when loads() was done: 457 1571 297 1163 429 1539 The columns are test_marshal.py and decimal.py the lines are version 3, version 4( only strings ) and special version5 which is like 3 but omits ints. As you see, the ints correspond to roughly 6% and 2% of the instances respectively. The bulk of the list is taken up by strings (65% and 74%) This shows that adding instancing of all other types on top of the strings does not typically expand the instance list more than 50% ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 11:21:20 2012 From: report at bugs.python.org (Joril) Date: Tue, 20 Nov 2012 10:21:20 +0000 Subject: [issue16512] imghdr doesn't support jpegs with an ICC profile Message-ID: <1353406880.2.0.236043197389.issue16512@psf.upfronthosting.co.za> New submission from Joril: imghdr doesn't support jpegs that include an ICC Profile. This is because imghdr looks for "JFIF" somewhere at the beginning of the file, but the ICC_PROFILE shifts that further. (The ICC spec is here http://www.color.org/specification/ICC1v43_2010-12.pdf, annex B) ---------- files: peanuts15.jpg messages: 175984 nosy: joril priority: normal severity: normal status: open title: imghdr doesn't support jpegs with an ICC profile type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file28046/peanuts15.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 12:15:14 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 20 Nov 2012 11:15:14 +0000 Subject: [issue16512] imghdr doesn't support jpegs with an ICC profile In-Reply-To: <1353406880.2.0.236043197389.issue16512@psf.upfronthosting.co.za> Message-ID: <1353410114.93.0.839717941886.issue16512@psf.upfronthosting.co.za> Ezio Melotti added the comment: Can you provide a patch? ---------- nosy: +ezio.melotti stage: -> needs patch versions: +Python 3.4 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 12:16:16 2012 From: report at bugs.python.org (Joril) Date: Tue, 20 Nov 2012 11:16:16 +0000 Subject: [issue16512] imghdr doesn't support jpegs with an ICC profile In-Reply-To: <1353406880.2.0.236043197389.issue16512@psf.upfronthosting.co.za> Message-ID: <1353410176.43.0.378558831267.issue16512@psf.upfronthosting.co.za> Joril added the comment: I can try, yes. I'll add one ASAP ---------- versions: +Python 2.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 12:30:05 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 20 Nov 2012 11:30:05 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353411005.96.0.200302137409.issue16475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: New patch, incorporating suggested fixes from review. ---------- Added file: http://bugs.python.org/file28047/marshalinstance.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 12:39:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Nov 2012 11:39:28 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353411568.4.0.33067312153.issue16475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you, Kristj?n, for the statistics. It makes your proposition more attractive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 14:44:34 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 20 Nov 2012 13:44:34 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353419074.95.0.843955549461.issue16475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: New patch with changes. ---------- Added file: http://bugs.python.org/file28048/marshalinstance.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 15:09:36 2012 From: report at bugs.python.org (moonflow) Date: Tue, 20 Nov 2012 14:09:36 +0000 Subject: [issue16513] SGMLParser processing which include two will have problem Message-ID: <1353420576.69.0.980129168556.issue16513@psf.upfronthosting.co.za> New submission from moonflow: if a include two or more,SGMLParser processing has a problem for example: CPAI-2012-809 CVE-2011-2089
SCADA ICONICS WebHMI ActiveX Stack Overflow (2011-2089) def start_a(self, attrs): if self.is_td: cve_href = [v for k, v in attrs if k == "target" and v == "_blank"] if cve_href: self.is_a = True self.is_cve = True #for SGMLParser maybe have a bug,a have two has problem vul_href = [v for k, v in attrs if k == "style"] print vul_href if vul_href: vul_href = "".join([v for k, v in attrs if k == "href"]) if vul_href.find("cve") == -1: self.href_name = vul_href else: self.href_name = "" here print vul_href but print nothing.Is it ok? ---------- components: Library (Lib) files: testbug.py messages: 175990 nosy: moonflow priority: normal severity: normal status: open title: SGMLParser processing which include two will have problem type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file28049/testbug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 15:09:47 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 20 Nov 2012 14:09:47 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <1353420587.14.0.94511122648.issue16511@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for the bug report. Are you in a position to test whether this is still an issue for Python 2.7? (Python 2.5 is no longer maintained.) ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 15:12:18 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 20 Nov 2012 14:12:18 +0000 Subject: [issue16513] SGMLParser processing which include two will have problem In-Reply-To: <1353420576.69.0.980129168556.issue16513@psf.upfronthosting.co.za> Message-ID: <1353420738.05.0.636803052868.issue16513@psf.upfronthosting.co.za> Ezio Melotti added the comment: Have you tried with HTMLParser? sgmllib is deprecated and has been removed in Python 3. HTMLParser is also much better at parsing (broken) HTML. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 15:18:07 2012 From: report at bugs.python.org (moonflow) Date: Tue, 20 Nov 2012 14:18:07 +0000 Subject: [issue16513] SGMLParser processing which include two will have problem In-Reply-To: <1353420576.69.0.980129168556.issue16513@psf.upfronthosting.co.za> Message-ID: <1353421087.02.0.837788903155.issue16513@psf.upfronthosting.co.za> moonflow added the comment: I haven't tried it, the problem will not process? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 15:25:52 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 20 Nov 2012 14:25:52 +0000 Subject: [issue16513] SGMLParser processing which include two will have problem In-Reply-To: <1353420576.69.0.980129168556.issue16513@psf.upfronthosting.co.za> Message-ID: <1353421552.36.0.839755884354.issue16513@psf.upfronthosting.co.za> Ezio Melotti added the comment: If what you are trying to do is extracting the link(s) that contain 'cve', you try the attached script. ---------- Added file: http://bugs.python.org/file28050/issue16513.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 15:35:50 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 20 Nov 2012 14:35:50 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1353422150.17.0.903046421632.issue16500@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 15:43:52 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 20 Nov 2012 14:43:52 +0000 Subject: [issue16513] SGMLParser processing which include two will have problem In-Reply-To: <1353420576.69.0.980129168556.issue16513@psf.upfronthosting.co.za> Message-ID: <1353422632.8.0.170653726289.issue16513@psf.upfronthosting.co.za> Ezio Melotti added the comment: Sorry, I misread your code, looks like you want the href *without* 'cve'. In that case change my code to use "'cve' not in attrs['href']" (also avoid using s.find('cve') == -1 , and use the more readable and idiomatic 'cve' not in s ). I think your original script doesn't work for two reasons: 1) you are looking for a table with class="tablesorter", but in the HTML the table doesn't have that class, so self.is_table is never set to True; 2) you are finding the href of the with a "style" attribute and correctly setting it to self.href_name, but the value is then replaced by "" when the following without "style" is found; That said, I still suggest you to abandon sgmllib and use HTMLParser, or possibly an external module like BeautifulSoup or LXML. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 15:59:07 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 20 Nov 2012 14:59:07 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1353423547.06.0.529547784222.issue16500@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- nosy: +amaury.forgeotdarc -Amaury.Forgeot.d'Arc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 16:17:15 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 20 Nov 2012 15:17:15 +0000 Subject: [issue16514] Cryptic traceback when sys.path[0] is None Message-ID: <1353424635.18.0.600046275263.issue16514@psf.upfronthosting.co.za> New submission from Barry A. Warsaw: When sys.path[0] is None, attempting to import a module produces a cryptic chained traceback. This is a regression from 3.2 where the import would succeed. The basic issue is that in 3.2's import.c, non-string/bytes items on sys.path are essentially ignored (see the loop in import.c:1708 find_module()) while they are not ignored in 3.3's importlib. This means that because zipimporter.zipimiporter is by default the first thing on sys.path_hooks, zipimporter.zipimporter(None) gets called. This raises a TypeError which starts the chained exception. Note that the fact that zipimporter.zipimporter(None) raises a TypeError is *not* a regression. The regression is that None makes its way to sys.path_hooks at all. I think this will be relatively easy to fix, if we agree that the current regressive behavior is a bug. ---------- assignee: barry components: Interpreter Core keywords: 3.3regression messages: 175996 nosy: barry priority: high severity: normal status: open title: Cryptic traceback when sys.path[0] is None type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 16:44:34 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 20 Nov 2012 15:44:34 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1353426274.57.0.0122851784982.issue16500@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > IFF we are going to walk the hard and rocky road of exception handling, > then we are going to need at least four hooks and a register function that > takres four callables as arguments: register(prepare, error, parent, > child). Each prepare() call pushes an error handling onto a stack. In case > of an exception in a prepare handler, the error stack is popped until all > error handlers are called. This approach allows a prepare handler to > actually prevent a fork() call from succeeding. I think there are two main options if a prepare callback fails: 1) The fork should not occur and the exception should be raised 2) The fork should occur and the exception should be only be printed I favour option 1 since, if they want, users can always wrap their prepare callbacks with try: ... except: sys.excepthook(*sys.exc_info()) With option 1 I don't see why error callbacks are necessary. Just unwind the stack of imaginary try...finally... clauses and let any exceptions propagate out using exception chaining if necessary. This is what pure-python-atfork.patch does. Note, however, that if the fork succeeds then any subsequent exception is only printed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 16:46:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Nov 2012 15:46:43 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353426403.86.0.990704370081.issue16475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Personally I don't like the use of macros inn this code. I think that without them the code would be clearer. If anyone is interested, here are the statistics for all the standard modules (Lib/__pycache__/*.pyc). UNICODE 105248 61% TUPLE 33193 19% STRING 13527 7.8% INT 7373 4.3% CODE 6438 3.7% NONE 5291 3.1% TRUE 474 0.27% FALSE 401 0.23% BINARY_FLOAT 340 0.2% LONG 60 0.035% FROZENSET 20 0.012% Strings (unicode and bytes), tuples, short ints, code objects and None in sum are 99% of all objects. Mutable collections, complex numbers, Ellipsis and StopIteration are not used at all. If size of compiled modules is a problem, we can get about 10% by using more compact representation for sizes (1- or 2-bytes). This requires additional codes for strings and collections (at least for unicode strings and tuples). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 17:11:22 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 20 Nov 2012 16:11:22 +0000 Subject: [issue8713] multiprocessing needs option to eschew fork() under Linux In-Reply-To: <1273853591.12.0.245920632829.issue8713@psf.upfronthosting.co.za> Message-ID: <1353427882.04.0.771750643833.issue8713@psf.upfronthosting.co.za> Richard Oudkerk added the comment: http://hg.python.org/sandbox/sbt#spawn now contains support for starting processes via a separate server process. This depends on fd passing support. This also solves the problem of mixing threads and processes, but is much faster than using fork+exec. It seems to be just as fast as using plain fork. I have tested it successfully on Linux and a MacOSX buildbot. (OpenSolaris does not seem to support fd passing.) At the begining of your program you write multiprocessing.set_start_method('forkserver') to use the fork server. Alternatively you can use multiprocessing.set_start_method('spawn') to use _posixsubprocess.fork_exec() with closefds=True on Unix or multiprocessing.set_start_method('fork') to use the standard fork method. This branch also stops child processes on Windows from automatically inheriting inheritable handles. The test suite can be run with the different start methods by doing python -m test.test_multiprocessing_fork python -m test.test_multiprocessing_spawn python -m test.test_multiprocessing_forkserver ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 17:13:09 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 20 Nov 2012 16:13:09 +0000 Subject: [issue16514] Cryptic traceback when sys.path[0] is None In-Reply-To: <1353424635.18.0.600046275263.issue16514@psf.upfronthosting.co.za> Message-ID: <1353427989.68.0.127898536963.issue16514@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Patch for 3.3, omitting the requisite importlib.h change. ---------- keywords: +patch Added file: http://bugs.python.org/file28051/16514.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 17:14:02 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 20 Nov 2012 16:14:02 +0000 Subject: [issue16514] Cryptic traceback when sys.path[0] is None In-Reply-To: <1353424635.18.0.600046275263.issue16514@psf.upfronthosting.co.za> Message-ID: <1353428042.43.0.0326534145999.issue16514@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Oh, the patch includes the removal of some unused imports from test_path.py, thanks to pyflakes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 17:20:42 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 20 Nov 2012 16:20:42 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1353428442.63.0.881675690516.issue16500@psf.upfronthosting.co.za> Christian Heimes added the comment: Amaury: PyPy doesn't handle exceptions in hooks. Is there a reason why PyPy goes for the simplistic approach? Richard: An error callback has the benefit that the API can notice the hooks that some error has occurred. We may not need it, though. I can think of six exception scenarios that must be handled: (1) exception in a prepare hook -> don't call the remaining prepare hooks, run all related parent hooks in FILO order, prevent fork() call (2) exception in parent hook during the handling of (1) -> print exception, continue with next parent hook (3) exception in fork() call -> run parent hooks in FILO order (4) exception in parent hook during the handling of (3) -> print exception, continue with next parent hook (5) exception in parent hook when fork() has succeeded -> print exception, continue with next parent hook (6) exception in child hook when fork() has succeeded -> print exception, continue with next child hook Do you agree? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 17:23:39 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 20 Nov 2012 16:23:39 +0000 Subject: [issue16514] Cryptic traceback when sys.path[0] is None In-Reply-To: <1353424635.18.0.600046275263.issue16514@psf.upfronthosting.co.za> Message-ID: <1353428619.91.0.927340926752.issue16514@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +brett.cannon, eric.smith, eric.snow, jason.coombs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 17:24:30 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 20 Nov 2012 16:24:30 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353428670.88.0.0722610336681.issue16475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Changes as suggested by Serhiy ---------- Added file: http://bugs.python.org/file28052/marshalinstance.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 17:29:10 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 20 Nov 2012 16:29:10 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1353428950.38.0.553053211459.issue16500@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > PyPy doesn't handle exceptions in hooks. > Is there a reason why PyPy goes for the simplistic approach? Probably because nobody thought about it. At the moment, there is only one 'before', one 'parent' hook (so the FILO order is simple), and three 'child' hooks. And if the _PyImport_ReleaseLock call fails, you'd better not ignore the error... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 17:32:55 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 20 Nov 2012 16:32:55 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353429175.16.0.662631249842.issue16475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: The size of the .pyc files is secondary. The size that is important is the memory footprint of loaded code objects, which can be done by stripping and folding code objects. This works springs out of work for embedding python on the PS3 console where every byte counts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 17:51:38 2012 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 20 Nov 2012 16:51:38 +0000 Subject: [issue16514] Cryptic traceback when sys.path[0] is None In-Reply-To: <1353424635.18.0.600046275263.issue16514@psf.upfronthosting.co.za> Message-ID: <1353430298.26.0.981980426696.issue16514@psf.upfronthosting.co.za> Eric V. Smith added the comment: I agree it's a bug. And the fix looks good to me. Having said that: I haven't looked at the import.c version to verify what is happening. Does the test pass under 3.2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 17:57:23 2012 From: report at bugs.python.org (Phil Elson) Date: Tue, 20 Nov 2012 16:57:23 +0000 Subject: [issue16382] Better warnings exception for bad category In-Reply-To: <1351779406.35.0.0813926106632.issue16382@psf.upfronthosting.co.za> Message-ID: <1353430643.51.0.531399731058.issue16382@psf.upfronthosting.co.za> Changes by Phil Elson : Added file: http://bugs.python.org/file28053/pelson_warnings_fix_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 17:57:35 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 20 Nov 2012 16:57:35 +0000 Subject: [issue16514] Cryptic traceback when sys.path[0] is None In-Reply-To: <1353424635.18.0.600046275263.issue16514@psf.upfronthosting.co.za> Message-ID: <1353430655.91.0.996965818728.issue16514@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Oh, btw, I intend to add documentation that makes explicit: * sys.path entries must be strings or bytes, everything else is ignored * path importers should expect strings or bytes * the encoding of bytes is left to the individual path hooks to define, however it it can't decode the bytes it should ignore the path entry or raise an ImportError (effectively ignoring it anyway). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 18:02:12 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 20 Nov 2012 17:02:12 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1353404403.85.0.824767724161.issue16475@psf.upfronthosting.co.za> Message-ID: <438438233.251416713.1353430926099.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > However, even if you cannot agree that it is a good idea, can you > explain to me how it is a BAD idea? How can expanding object > references to strings to all objects, using the same mechanism, be > bad? It is a bad idea because features have to be supported in the long-term, which means more maintenance effort. So, basically, this is the same reason we don't accept every feature request + patch that gets posted to the tracker. And, again, I think the string interning part is a good thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 18:17:39 2012 From: report at bugs.python.org (Joril) Date: Tue, 20 Nov 2012 17:17:39 +0000 Subject: [issue16512] imghdr doesn't support jpegs with an ICC profile In-Reply-To: <1353406880.2.0.236043197389.issue16512@psf.upfronthosting.co.za> Message-ID: <1353431859.11.0.535606533804.issue16512@psf.upfronthosting.co.za> Joril added the comment: Here it is... It is against the latest hg version, should I write one for 2.7 too? ---------- keywords: +patch Added file: http://bugs.python.org/file28054/imghdr_icc_jpeg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 18:31:24 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 20 Nov 2012 17:31:24 +0000 Subject: [issue16512] imghdr doesn't support jpegs with an ICC profile In-Reply-To: <1353406880.2.0.236043197389.issue16512@psf.upfronthosting.co.za> Message-ID: <1353432684.02.0.27233201896.issue16512@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks for the patch. > should I write one for 2.7 too? Not necessary, 2.7 only gets bugs fixes. OTOH it would be nice to have some tests for this new features (and for the module in general), but there doesn't seem to be any Lib/test/test_imghdr.py file. The module itself seems to contain some kind of tests at the end though. ---------- components: +Library (Lib) stage: needs patch -> patch review versions: +Python 3.4 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 18:43:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 20 Nov 2012 17:43:03 +0000 Subject: [issue16514] Cryptic traceback when sys.path[0] is None In-Reply-To: <1353424635.18.0.600046275263.issue16514@psf.upfronthosting.co.za> Message-ID: <1353433383.32.0.35174810147.issue16514@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 19:26:45 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 20 Nov 2012 18:26:45 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353436005.31.0.495872634643.issue16475@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, please follow PEP 8 in test_marshal.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 19:39:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Nov 2012 18:39:33 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353436773.77.0.783572397985.issue16475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is the statistics for all pyc-files (not only in Lib/__pycache__). This includes encoding tables and tests. I count also memory usage for some types (for tuples shared size is estimated upper limit). type count % size shared % UNICODE 622812 58% 26105085 14885090 57% TUPLE 224214 21% 8184848 3498300 43% STRING 90992 8.4% 6931342 832224 12% INT 52087 4.8% 715400 58666 8.2% CODE 42147 3.9% 2865996 0 0% NONE 39777 3.7% BINARY_FLOAT 3120 0.29% TRUE 2363 0.22% FALSE 1976 0.18% LONG 1012 0.094% ELLIPSIS 528 0.049% BINARY_COMPLEX 465 0.043% FROZENSET 24 0.0022% Total 1081517 100% 44802671 19274280 ~43% Yet some statistics. If we import all standard modules, we can save using object sharing 2.3 MB?of total 4.6 MB (50%) memory size for unicode objects, up to 0.47 MB?of 1.25 MB for tuples (approximate upper limit), 84 KB?of 117 KB (7%)?for bytes objects, and only 2 KB?of 101 KB?for integers (most integers already interned). None of code objects can be shared (because code object contains almost unique first line number). Therefore there is a sense to share unicode objects, tuples, and may be bytes objects. Most integers (in range -5..257) already interned. None of code objects can be shared (because code object contains almost unique first line number). Floats, complexes and frozensets unlikely save much of memory. ---------- Added file: http://bugs.python.org/file28055/marshalstat.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 19:41:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Nov 2012 18:41:00 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353436860.4.0.345216610973.issue16475@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- Removed message: http://bugs.python.org/msg176012 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 19:41:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Nov 2012 18:41:33 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353436893.39.0.132234501564.issue16475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is the statistics for all pyc-files (not only in Lib/__pycache__). This includes encoding tables and tests. I count also memory usage for some types (for tuples shared size is estimated upper limit). type count % size shared % UNICODE 622812 58% 26105085 14885090 57% TUPLE 224214 21% 8184848 3498300 43% STRING 90992 8.4% 6931342 832224 12% INT 52087 4.8% 715400 58666 8.2% CODE 42147 3.9% 2865996 0 0% NONE 39777 3.7% BINARY_FLOAT 3120 0.29% TRUE 2363 0.22% FALSE 1976 0.18% LONG 1012 0.094% ELLIPSIS 528 0.049% BINARY_COMPLEX 465 0.043% FROZENSET 24 0.0022% Total 1081517 100% 44802671 19274280 ~43% Therefore there is a sense to share unicode objects, tuples, and may be bytes objects. Most integers (in range -5..257) already interned. None of code objects can be shared (because code object contains almost unique first line number). Floats, complexes and frozensets unlikely save much of memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 19:54:34 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 20 Nov 2012 18:54:34 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1353436893.39.0.132234501564.issue16475@psf.upfronthosting.co.za> Message-ID: <1353437618.3349.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > Here is the statistics for all pyc-files (not only in > Lib/__pycache__). This includes encoding tables and tests. I count > also memory usage for some types (for tuples shared size is estimated > upper limit). Did you examine the sharing per file or among all files? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 20:07:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Nov 2012 19:07:13 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353438433.0.0.69428526176.issue16475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Per file. With total sharing: UNICODE 622812 58% 26105085 18262484 70% TUPLE 224214 21% 8184848 4007404 49% STRING 90992 8.4% 6931342 1361618 20% INT 52087 4.8% 715400 95666 13% CODE 42147 3.9% 2865996 0 0% ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 20:12:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Nov 2012 19:12:32 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353438752.93.0.796640930914.issue16475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Total size of all *.pyc files is 22 MB. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 20:24:12 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 20 Nov 2012 19:24:12 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1353429175.16.0.662631249842.issue16475@psf.upfronthosting.co.za> Message-ID: <50ABD8DB.8060900@v.loewis.de> Martin v. L?wis added the comment: Am 20.11.12 17:32, schrieb Kristj?n Valur J?nsson: > The size of the .pyc files is secondary. This really depends on whom you ask. When I did the string interning support, the primary concern *was* for the size of the pyc files, and there *was* a real project where it mattered (namely, code size in a frozen application). It may be secondary to *you* and *now*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 20:27:40 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 20 Nov 2012 19:27:40 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <438438233.251416713.1353430926099.JavaMail.root@zimbra10-e2.priv.proxad.net> Message-ID: <50ABD9AB.2000007@v.loewis.de> Martin v. L?wis added the comment: Am 20.11.12 18:02, schrieb Antoine Pitrou: > It is a bad idea because features have to be supported in the long-term, > which means more maintenance effort. So, basically, this is the same > reason we don't accept every feature request + patch that gets posted > to the tracker. For marshal, this actually is of less concern - we are free to change it whenever we please (and people actually did change it when they pleased). Of course, there still must be a demonstrated gain, and that must be significant enough to justify the size of the change (in diffstat). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 20:33:38 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 20 Nov 2012 19:33:38 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353428950.38.0.553053211459.issue16500@psf.upfronthosting.co.za> Message-ID: Gregory P. Smith added the comment: I think you are solving a non-problem if you want to expose exceptions from such hooks. Nobody needs it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 20:49:24 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 20 Nov 2012 19:49:24 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1353440964.0.0.436909860933.issue16500@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I think you are solving a non-problem if you want to expose exceptions from > such hooks. Nobody needs it. Agreed. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 21:01:37 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 20 Nov 2012 20:01:37 +0000 Subject: [issue16514] Cryptic traceback when sys.path In-Reply-To: <1353430298.26.0.981980426696.issue16514@psf.upfronthosting.co.za> Message-ID: <20121120150133.45ad381e@resist.wooz.org> Barry A. Warsaw added the comment: On Nov 20, 2012, at 04:51 PM, Eric V. Smith wrote: >I agree it's a bug. And the fix looks good to me. Thanks. >Having said that: I haven't looked at the import.c version to verify what is >happening. Does the test pass under 3.2? Yep. See below. When you take a look at the path_hooks iteration loop, you'll see why. -----snip snip----- import sys sys.path.insert(0, None) sys.path_importer_cache.pop(None, None) sys.modules.pop('email', None) import email print(email) -----snip snip----- % python3.2 /tmp/foo.py % python3.3 /tmp/foo.py Traceback (most recent call last): File "", line 1271, in _path_importer_cache KeyError: None During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/foo.py", line 7, in import email File "", line 1561, in _find_and_load File "", line 1519, in _find_and_load_unlocked File "", line 1473, in _find_module File "", line 1308, in find_module File "", line 1284, in _get_loader File "", line 1273, in _path_importer_cache File "", line 1254, in _path_hooks TypeError: 'NoneType' object is not iterable Error in sys.excepthook: Traceback (most recent call last): File "", line 1271, in _path_importer_cache KeyError: None During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 58, in apport_excepthook from cStringIO import StringIO File "", line 1561, in _find_and_load File "", line 1519, in _find_and_load_unlocked File "", line 1473, in _find_module File "", line 1308, in find_module File "", line 1284, in _get_loader File "", line 1273, in _path_importer_cache File "", line 1254, in _path_hooks TypeError: 'NoneType' object is not iterable Original exception was: Traceback (most recent call last): File "", line 1271, in _path_importer_cache KeyError: None During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/foo.py", line 7, in import email File "", line 1561, in _find_and_load File "", line 1519, in _find_and_load_unlocked File "", line 1473, in _find_module File "", line 1308, in find_module File "", line 1284, in _get_loader File "", line 1273, in _path_importer_cache File "", line 1254, in _path_hooks TypeError: 'NoneType' object is not iterable ---------- title: Cryptic traceback when sys.path[0] is None -> Cryptic traceback when sys.path _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 21:04:30 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 20 Nov 2012 20:04:30 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1353441870.74.0.549569825292.issue16500@psf.upfronthosting.co.za> Christian Heimes added the comment: Your suggestion is that the hooks are called as: for hook in hooks: try: hook() except: try: sys.excepthook(*sys.exc_info()) except: pass That makes the implementation much easier. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 21:14:40 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 20 Nov 2012 20:14:40 +0000 Subject: [issue16514] Cryptic traceback when sys.path[0] is None In-Reply-To: <1353424635.18.0.600046275263.issue16514@psf.upfronthosting.co.za> Message-ID: <1353442480.65.0.269924780322.issue16514@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- title: Cryptic traceback when sys.path -> Cryptic traceback when sys.path[0] is None _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 21:24:16 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 20 Nov 2012 20:24:16 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <1353443056.07.0.807705221284.issue16511@psf.upfronthosting.co.za> Roger Serwy added the comment: This is still a bug with 2.7 and 3.4. I just tried leaving the width and height fields in config-main.cfg and IDLE had raised the error: _tkinter.TclError: expected integer but got "" The width and height keys in the text_options dictionary in EditorWindow.py are set to blank strings instead of a number of a number as a string. IDLE not showing up is a symptom of issue13582. ---------- nosy: +serwy versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 21:25:15 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 20 Nov 2012 20:25:15 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <1353443115.51.0.342528531462.issue16511@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 21:34:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Nov 2012 20:34:37 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <1353443677.52.0.755034276287.issue16511@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: When width or height are 0, IDLE starts and show window with some minimal width or height. When width or height are empty or invalid IDLE can't start. The proposed patch makes IDLE more resistant against such broken configs. ---------- keywords: +patch nosy: +kbk, serhiy.storchaka versions: -Python 2.6, Python 3.1 Added file: http://bugs.python.org/file28056/idle_safe_getoption.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 21:35:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 20 Nov 2012 20:35:37 +0000 Subject: [issue16514] Cryptic traceback when sys.path[0] is None In-Reply-To: <1353424635.18.0.600046275263.issue16514@psf.upfronthosting.co.za> Message-ID: <3Y5dw85kRfzPwD@mail.python.org> Roundup Robot added the comment: New changeset 291406748217 by Barry Warsaw in branch '3.3': - Issue #16514: Fix regression causing a traceback when sys.path[0] is None http://hg.python.org/cpython/rev/291406748217 New changeset a82ee9a1457a by Barry Warsaw in branch 'default': - Issue #16514: Fix regression causing a traceback when sys.path[0] is None http://hg.python.org/cpython/rev/a82ee9a1457a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 21:54:47 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 20 Nov 2012 20:54:47 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <1353444887.16.0.79998141203.issue16511@psf.upfronthosting.co.za> Roger Serwy added the comment: Serhiy, I applied your patch and it works. However, the initial window size in IDLE Preferences->General are listed as "None" instead of a number. Perhaps if the userCfg has an invalid value then the defaultCfg should be returned? ---------- versions: +Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 21:55:30 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 20 Nov 2012 20:55:30 +0000 Subject: [issue16514] Cryptic traceback when sys.path[0] is None In-Reply-To: <1353424635.18.0.600046275263.issue16514@psf.upfronthosting.co.za> Message-ID: <1353444930.42.0.227163637774.issue16514@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 21:57:45 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 20 Nov 2012 20:57:45 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <1353445065.32.0.760763470079.issue16511@psf.upfronthosting.co.za> Roger Serwy added the comment: Changed from Crash to Behavior, as the interpreter is not crashing. Also undid my mistake of re-adding 2.6 and 3.1. ---------- type: crash -> behavior versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 22:10:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Nov 2012 21:10:34 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <1353445834.51.0.645152080468.issue16511@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Perhaps if the userCfg has an invalid value then the defaultCfg should be returned? Yes, you are right. Thanks for suggestion. ---------- Added file: http://bugs.python.org/file28057/idle_safe_getoption_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 22:10:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Nov 2012 21:10:52 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <1353445852.22.0.122096407418.issue16511@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28056/idle_safe_getoption.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 22:31:45 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 20 Nov 2012 21:31:45 +0000 Subject: [issue1160] Medium size regexp crashes python In-Reply-To: <1189670456.94.0.669298411185.issue1160@psf.upfronthosting.co.za> Message-ID: <3Y5g8w5m3VzPj4@mail.python.org> Roundup Robot added the comment: New changeset 10314c9b7c5a by Antoine Pitrou in branch '2.7': Issue #1160: Fix compiling large regular expressions on UCS2 builds. http://hg.python.org/cpython/rev/10314c9b7c5a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 22:38:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 20 Nov 2012 21:38:10 +0000 Subject: [issue1160] Medium size regexp crashes python In-Reply-To: <1189670456.94.0.669298411185.issue1160@psf.upfronthosting.co.za> Message-ID: <3Y5gJL0f41zM9W@mail.python.org> Roundup Robot added the comment: New changeset a3579d766fb6 by Antoine Pitrou in branch '3.2': Issue #1160: Fix compiling large regular expressions on UCS2 builds. http://hg.python.org/cpython/rev/a3579d766fb6 New changeset 8b73a069ae4f by Antoine Pitrou in branch '3.3': Merge test from issue #1160. http://hg.python.org/cpython/rev/8b73a069ae4f New changeset 10c1f9e05f4f by Antoine Pitrou in branch 'default': Merge test from issue #1160. http://hg.python.org/cpython/rev/10c1f9e05f4f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 22:39:45 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 20 Nov 2012 21:39:45 +0000 Subject: [issue1160] Medium size regexp crashes python In-Reply-To: <1189670456.94.0.669298411185.issue1160@psf.upfronthosting.co.za> Message-ID: <1353447585.16.0.217099249975.issue1160@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed the patch to 3.2 and 2.7, and added the test to 3.3 and default. Thank you! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 22:54:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Nov 2012 21:54:03 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <1353448443.21.0.790771327034.issue16511@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Added warning for case when user config broken. Thanks Roger for suggestion. ---------- Added file: http://bugs.python.org/file28058/idle_safe_getoption_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 23:08:05 2012 From: report at bugs.python.org (Paul A.) Date: Tue, 20 Nov 2012 22:08:05 +0000 Subject: [issue14525] ia64-hp-hpux11.31 won't compile Python-2.6.8rc2 without -D_TERMIOS_INCLUDED In-Reply-To: <1353268899.85.0.735460701967.issue14525@psf.upfronthosting.co.za> Message-ID: <20121120220805.GA26904@ma.sdf.org> Paul A. added the comment: On Sun, Nov 18, 2012 at 08:01:39PM +0000, Terry J. Reedy wrote: > I should have added 'please try compiling 3.x to make sure it has the same problem' since configure might behave differently. I'm fairly sure I did, that was quite a few months ago, so my memory could be faulty. I did eventually get both of 2.6.7 and 2.7.3 built, I really must submit my patches. I suppose it should go against the current 2.7 in the repo, correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 20 23:36:57 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 20 Nov 2012 22:36:57 +0000 Subject: [issue16515] TypeError message incorrect for max() with no args Message-ID: <1353451017.11.0.598123114389.issue16515@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The below should probably say something along the lines of "max expected 1 positional arguments" (since the foo value is an argument): >>> max(foo=1) Traceback (most recent call last): File "", line 1, in TypeError: max expected 1 arguments, got 0 I imagine this affects other functions, but I haven't looked into which ones. Here is an example of another built-in function that provides a better message: >>> sorted(foo=1) Traceback (most recent call last): File "", line 1, in TypeError: Required argument 'iterable' (pos 1) not found ---------- components: Interpreter Core messages: 176034 nosy: chris.jerdonek priority: normal severity: normal status: open title: TypeError message incorrect for max() with no args type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 00:03:31 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 20 Nov 2012 23:03:31 +0000 Subject: [issue14525] ia64-hp-hpux11.31 won't compile 2.7 without -D_TERMIOS_INCLUDED In-Reply-To: <1333850075.77.0.408518012212.issue14525@psf.upfronthosting.co.za> Message-ID: <1353452611.13.0.151228270132.issue14525@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes, and ditto for 3.x if the patch needs to be altered. ---------- title: ia64-hp-hpux11.31 won't compile Python-2.6.8rc2 without -D_TERMIOS_INCLUDED -> ia64-hp-hpux11.31 won't compile 2.7 without -D_TERMIOS_INCLUDED _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 00:11:14 2012 From: report at bugs.python.org (Stefan Krah) Date: Tue, 20 Nov 2012 23:11:14 +0000 Subject: [issue14525] ia64-hp-hpux11.31 won't compile 2.7 without -D_TERMIOS_INCLUDED In-Reply-To: <1333850075.77.0.408518012212.issue14525@psf.upfronthosting.co.za> Message-ID: <1353453074.72.0.24338701637.issue14525@psf.upfronthosting.co.za> Stefan Krah added the comment: I think I fixed this yesterday in #6308. Please try with a current 2.7, 3.3 or 3.4 clone. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 00:21:42 2012 From: report at bugs.python.org (Carl Meyer) Date: Tue, 20 Nov 2012 23:21:42 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1353453702.95.0.594710758786.issue16480@psf.upfronthosting.co.za> Carl Meyer added the comment: Here is the bug filed against virtualenv that led to the addition of the local/ directory: https://github.com/pypa/virtualenv/issues/118 As Vinay pointed out, the original fix was later modified to be friendlier to tools that dislike recursive symlinks. That's about all I know; I don't know if any of this is still needed in 3.3/3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 00:24:40 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 20 Nov 2012 23:24:40 +0000 Subject: [issue16515] TypeError message incorrect for max() with one keyword arg In-Reply-To: <1353451017.11.0.598123114389.issue16515@psf.upfronthosting.co.za> Message-ID: <1353453880.9.0.378321821464.issue16515@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- title: TypeError message incorrect for max() with no args -> TypeError message incorrect for max() with one keyword arg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 00:41:12 2012 From: report at bugs.python.org (Hans Larsen) Date: Tue, 20 Nov 2012 23:41:12 +0000 Subject: [issue16491] try-except-raise-bug In-Reply-To: <1353159907.88.0.684136139556.issue16491@psf.upfronthosting.co.za> Message-ID: <92BE089D68BA4979A853ABEA854F828A@HansPc> Hans Larsen added the comment: -----Oprindelig meddelelse----- From: Martin v. L?wis Sent: Saturday, November 17, 2012 2:45 PM To: jocjo at mail.dk Subject: [issue16491] try-except-raise-bug Martin v. L?wis added the comment: That looks like a bug/missing feature in PythonWin to me, which doesn't print __context__ properly. Note: I haven't tested PythonWin to confirm. Hans: is the output also incorrect in IDLE, or a command line shell? If no, then this isn't a bug in Python itself, but one in PythonWin. You can find the bug tracker at http://sourceforge.net/projects/pywin32/ Ramchandra: the bug report actually *is* in English, starting with "I has found ...". The first part is just Hans' postal address (which we don't really need here, but it doesn't hurt having it, either). I have tried it in Python IDLE, but it's the samme except that returns a TypeError instead! ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 02:56:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 21 Nov 2012 01:56:13 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <3Y5n223lp5zPt0@mail.python.org> Roundup Robot added the comment: New changeset f32f1cb508ad by Chris Jerdonek in branch '3.2': Improve str() and object.__str__() documentation (issue #13538). http://hg.python.org/cpython/rev/f32f1cb508ad New changeset 6630a1c42204 by Chris Jerdonek in branch '3.3': Null merge from 3.2 (issue #13538). http://hg.python.org/cpython/rev/6630a1c42204 New changeset 325f80d792b9 by Chris Jerdonek in branch '3.3': Improve str() and object.__str__() documentation (issue #13538). http://hg.python.org/cpython/rev/325f80d792b9 New changeset 59acd5cac8b5 by Chris Jerdonek in branch 'default': Merge from 3.3: Improve str() and object.__str__() docs (issue #13538). http://hg.python.org/cpython/rev/59acd5cac8b5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 03:17:59 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 21 Nov 2012 02:17:59 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <1353464279.82.0.672266053381.issue13538@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 04:28:27 2012 From: report at bugs.python.org (Joel Nothman) Date: Wed, 21 Nov 2012 03:28:27 +0000 Subject: [issue16516] argparse types (and actions) must be hashable Message-ID: <1353468507.9.0.0965555550975.issue16516@psf.upfronthosting.co.za> New submission from Joel Nothman: The argparse documentation states that "type= can take any callable that takes a single string argument and returns the converted value". The following is an exception: >>> import argparse >>> ap = argparse.ArgumentParser() >>> ap.add_argument('foo', type={}.get) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3/argparse.py", line 1294, in add_argument type_func = self._registry_get('type', action.type, action.type) File "/usr/lib/python3/argparse.py", line 1236, in _registry_get return self._registries[registry_name].get(value, default) TypeError: unhashable type: 'dict' Sadly, a method bound to an unhashable type is unhashable! (Of course, is trivial to use partial or lambda to make any function hashable.) The offending line in _registry_get is intended to look up named types (or actions), so it perhaps only relevant for string type= and action= values, which could be handled explicitly instead of using dict.get(x, x) to handle both cases. Alternatively, the TypeError could be caught and default returned. ---------- components: Library (Lib) messages: 176040 nosy: bethard, jnothman priority: normal severity: normal status: open title: argparse types (and actions) must be hashable type: behavior versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 06:32:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 21 Nov 2012 05:32:27 +0000 Subject: [issue16517] address merge conflicts in devguide null-merge instructions Message-ID: <1353475947.45.0.611310875151.issue16517@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The null-merge instructions in the devguide (in the "note" box in the section linked to below): http://docs.python.org/devguide/committing.html#porting-within-a-major-version are incomplete if the merge created conflicts. It would help to include instructions on how to resolve this scenario. Proposed patch attached. (Am I right that the `hg resolve` is required?) [Also adding David since this or a related topic came up with him on IRC a couple(?) months back.] ---------- assignee: chris.jerdonek components: Devguide files: issue-null-merge-1.patch keywords: easy, patch messages: 176041 nosy: chris.jerdonek, eric.araujo, ezio.melotti, ncoghlan, r.david.murray priority: normal severity: normal stage: patch review status: open title: address merge conflicts in devguide null-merge instructions type: enhancement Added file: http://bugs.python.org/file28059/issue-null-merge-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 07:03:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 21 Nov 2012 06:03:27 +0000 Subject: [issue16518] add "buffer protocol" to glossary Message-ID: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to add "buffer protocol" (or perhaps "buffer object") to the glossary. The concept is currently described here: http://docs.python.org/dev/c-api/buffer.html#buffer-protocol ?ric initially suggested doing this in the comments to issue 13538. Such a glossary entry would be useful because the buffer protocol (or buffer object) should likely be cited, for example, wherever a function accepts a bytes object, bytearray object, or any object that supports the buffer protocol. The str() constructor is one example where this is done: http://hg.python.org/cpython/file/59acd5cac8b5/Doc/library/functions.rst#l1275 "Buffer object" might be the more useful term to add to the glossary because it would help to have a briefer way of saying "any object that supports the buffer protocol." (I'm assuming this is what "buffer object" actually means.) The patch for this issue should also do a comprehensive review of occurrences of buffer object/protocol throughout the docs and add or update links and index entries where appropriate. ---------- assignee: docs at python components: Documentation messages: 176042 nosy: chris.jerdonek, docs at python, eric.araujo, ezio.melotti, pitrou priority: normal severity: normal status: open title: add "buffer protocol" to glossary type: enhancement versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 08:58:54 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 21 Nov 2012 07:58:54 +0000 Subject: [issue16519] site.venv() should use abspath(executable) Message-ID: <1353484734.27.0.00447607755708.issue16519@psf.upfronthosting.co.za> New submission from Christian Heimes: While I was testing #16499 I found a small bug in the venv code of the site module. The code in site.venv() doesn't use abspath() to sanitize the path to executable_dir. This leads to wrong behavior when a venv is created in the root of a hg checkout and the non-venv interpreter is called with a relative path: (venv) heimes at hamiller:~/dev/python/cpython/venv$ ../python -c "import sys; print(sys.path)" ['', '/usr/local/lib/python34.zip', '/home/heimes/dev/python/cpython/Lib', '/home/heimes/dev/python/cpython/Lib/plat-linux', '/home/heimes/dev/python/cpython/build/lib.linux-x86_64-3.4-pydebug', '/home/heimes/dev/python/cpython/venv/lib/python3.4/site-packages'] The fix is simple, straight forward and totally harmless: --- a/Lib/site.py +++ b/Lib/site.py @@ -484,7 +484,7 @@ executable = os.environ['__PYVENV_LAUNCHER__'] else: executable = sys.executable - executable_dir, executable_name = os.path.split(executable) + executable_dir, executable_name = os.path.split(os.path.abspath(executable)) site_prefix = os.path.dirname(executable_dir) sys._home = None if sys.platform == 'win32': ---------- components: Interpreter Core messages: 176043 nosy: christian.heimes priority: normal severity: normal status: open title: site.venv() should use abspath(executable) type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 09:18:06 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 21 Nov 2012 08:18:06 +0000 Subject: [issue16515] TypeError message incorrect for max() with one keyword arg In-Reply-To: <1353451017.11.0.598123114389.issue16515@psf.upfronthosting.co.za> Message-ID: <1353485886.4.0.516058587103.issue16515@psf.upfronthosting.co.za> Mark Dickinson added the comment: It would be nice to change 'arguments' to 'argument' in this case, too. :-) ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 09:19:12 2012 From: report at bugs.python.org (Joril) Date: Wed, 21 Nov 2012 08:19:12 +0000 Subject: [issue16512] imghdr doesn't support jpegs with an ICC profile In-Reply-To: <1353406880.2.0.236043197389.issue16512@psf.upfronthosting.co.za> Message-ID: <1353485952.42.0.669771034647.issue16512@psf.upfronthosting.co.za> Joril added the comment: It looks like the test just walks a directory recursively while trying to identify its files, there's no "classic" test of the "this is a JPEG, is it detected correctly"-type ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 09:31:45 2012 From: report at bugs.python.org (Marco Amadori) Date: Wed, 21 Nov 2012 08:31:45 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1353453702.95.0.594710758786.issue16480@psf.upfronthosting.co.za> Message-ID: Marco Amadori added the comment: 2012/11/21 Carl Meyer > > Carl Meyer added the comment: > > Here is the bug filed against virtualenv that led to the addition of the > local/ directory: https://github.com/pypa/virtualenv/issues/118 > > As Vinay pointed out, the original fix was later modified to be friendlier > to tools that dislike recursive symlinks. > I didn't used virtualenv but pyvenv-3.3, so if this is not a bug, my question become: how to proper install distribute and pip in python 3.3 venv since they installs in /local/bin and that /bin/activate does not include /local/bin in $PATH ? ---------- title: pyvenv 3.3 fails to create symlinks for /local/{bin,lib} to /{bin,lib} -> pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 09:45:12 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 21 Nov 2012 08:45:12 +0000 Subject: [issue16520] subprocess.Popen() TypeError message incorrect without args argument Message-ID: <1353487512.93.0.371965893186.issue16520@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The TypeError message when a call to subprocess.Popen() lacks the args argument is incorrect. For 3.3 and 3.4, the message incorrectly says that a positional argument is required when a keyword argument will do: >>> import subprocess >>> subprocess.Popen() Traceback (most recent call last): File "", line 1, in TypeError: __init__() missing 1 required positional argument: 'args' >>> subprocess.Popen(args=['test']) For 3.2 and 2.7, the problem is slightly different. It says that two arguments are needed and that two have been given: >>> subprocess.Popen() Traceback (most recent call last): File "", line 1, in TypeError: __init__() takes at least 2 arguments (1 given) >>> subprocess.Popen(shell=True) Traceback (most recent call last): File "", line 1, in TypeError: __init__() takes at least 2 arguments (2 given) I don't know if this issue affects other functions in the standard library, but I suspect it might. ---------- components: Library (Lib) messages: 176047 nosy: chris.jerdonek priority: normal severity: normal status: open title: subprocess.Popen() TypeError message incorrect without args argument type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 09:56:03 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 21 Nov 2012 08:56:03 +0000 Subject: [issue16520] subprocess.Popen() TypeError message incorrect without args argument In-Reply-To: <1353487512.93.0.371965893186.issue16520@psf.upfronthosting.co.za> Message-ID: <1353488163.89.0.0497476673474.issue16520@psf.upfronthosting.co.za> Mark Dickinson added the comment: I don't think the first part of the report has anything to do with subprocess.Popen: >>> def f(x): ... return ... >>> f() Traceback (most recent call last): File "", line 1, in TypeError: f() missing 1 required positional argument: 'x' See the related discussion starting at: http://mail.python.org/pipermail/python-dev/2012-September/121760.html ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 10:12:23 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 21 Nov 2012 09:12:23 +0000 Subject: [issue16520] subprocess.Popen() TypeError message incorrect without args argument In-Reply-To: <1353487512.93.0.371965893186.issue16520@psf.upfronthosting.co.za> Message-ID: <1353489143.73.0.336924778811.issue16520@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Also see the terminology-related issue 15990 created from that thread. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 11:20:03 2012 From: report at bugs.python.org (Trung Doan) Date: Wed, 21 Nov 2012 10:20:03 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353448443.21.0.790771327034.issue16511@psf.upfronthosting.co.za> Message-ID: Trung Doan added the comment: Suggestion: When Python is installed, it starts its configurations files afresh. Trung Doan ======= On Wed, Nov 21, 2012 at 8:54 AM, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > Patch updated. Added warning for case when user config broken. Thanks > Roger for suggestion. > > ---------- > Added file: http://bugs.python.org/file28058/idle_safe_getoption_3.patch > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 12:35:39 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 21 Nov 2012 11:35:39 +0000 Subject: [issue16517] address merge conflicts in devguide null-merge instructions In-Reply-To: <1353475947.45.0.611310875151.issue16517@psf.upfronthosting.co.za> Message-ID: <1353497739.16.0.19025037519.issue16517@psf.upfronthosting.co.za> Ezio Melotti added the comment: + hg resolve -am # needed only if the merge created conflicts IIUC it's necessary, but only if you had a conflict and hg didn't invoke a 3-way merge tool. Here I use kdiff3, and I rarely have to use hg resolve. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 13:18:21 2012 From: report at bugs.python.org (Jovik) Date: Wed, 21 Nov 2012 12:18:21 +0000 Subject: [issue16521] logging.basicConfig creates empty file when using handlers Message-ID: <1353500301.35.0.410282518937.issue16521@psf.upfronthosting.co.za> New submission from Jovik: Using logging.basicConfig() with Python 3.2.3 accepts handlers options without any errors. It creates an empty file. I don't think this should be default behaviour, sice it's very missleading (no exception thrown; no warning on standard output or in the file) ---------- components: Library (Lib) files: logginghandler.py messages: 176052 nosy: Jovik priority: normal severity: normal status: open title: logging.basicConfig creates empty file when using handlers type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file28060/logginghandler.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 13:23:28 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 21 Nov 2012 12:23:28 +0000 Subject: [issue16517] address merge conflicts in devguide null-merge instructions In-Reply-To: <1353475947.45.0.611310875151.issue16517@psf.upfronthosting.co.za> Message-ID: <1353500608.28.0.92797160857.issue16517@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, so I suppose you could add a footnote that says "using a three way merge tool generally makes this step unnecessary". Is there a bug report for this on the mercurial tracker? If so we could link to the bug report :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 13:27:41 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 21 Nov 2012 12:27:41 +0000 Subject: [issue16517] address merge conflicts in devguide null-merge instructions In-Reply-To: <1353475947.45.0.611310875151.issue16517@psf.upfronthosting.co.za> Message-ID: <1353500861.39.0.0251798474098.issue16517@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Is there a bug report for this on the mercurial tracker? Indeed there is -- by one of our own in fact :) http://bz.selenic.com/show_bug.cgi?id=2706 ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 13:49:05 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 21 Nov 2012 12:49:05 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1353502145.89.0.456188274253.issue15990@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is a proposed patch just to get the ball rolling on this. Note that I'm proposing that we let ourselves use the word "standard" in place of "positional-or-keyword" when talking about parameters. This is partly inspired by PEP 362, which says, "Parameter.POSITIONAL_OR_KEYWORD ... this is the standard binding behaviour for functions implemented in Python." This patch only takes an initial crack at the glossary entries. Once these are fleshed out, we can add additional :term: links and index directives. ---------- keywords: +patch stage: -> patch review versions: +Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28061/issue-15990-1-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 14:12:26 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 21 Nov 2012 13:12:26 +0000 Subject: [issue16517] address merge conflicts in devguide null-merge instructions In-Reply-To: <1353475947.45.0.611310875151.issue16517@psf.upfronthosting.co.za> Message-ID: <1353503546.62.0.163597269163.issue16517@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching new patch incorporating David's suggestions. ---------- Added file: http://bugs.python.org/file28062/issue-16517-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 14:19:33 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 21 Nov 2012 13:19:33 +0000 Subject: [issue16475] Support object instancing and recursion in marshal In-Reply-To: <1352969678.69.0.685980330217.issue16475@psf.upfronthosting.co.za> Message-ID: <1353503973.4.0.397231001072.issue16475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Code objects can indeed be shared. One thing that the "recode" module does, or allows you to do, is to strip file and line number information from code objects. This will theoretically allow them to be collapsed. Martin, I agree the .pyc size matters. You are right, priorities vary. I am mainly focused on memory use, while others may be looking at disk use. Disk use can of course be reduced by using tools like zip. And code objects can be re-optimized at load time too using special importers. But it is nice to be able to achieve both objectives by enabling the marshal format to preserve those optimizations that are performed on it prior to saving it. I'm currently working on the recode module. When its done, I'll report back and share it with you so that you can toy around with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 14:38:32 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 21 Nov 2012 13:38:32 +0000 Subject: [issue13538] Improve doc for str(bytesobject) In-Reply-To: <1323176202.72.0.939593464127.issue13538@psf.upfronthosting.co.za> Message-ID: <3Y64cR0jSqzRPk@mail.python.org> Roundup Robot added the comment: New changeset 5c39e3906ce9 by Chris Jerdonek in branch '3.2': Fix label in docs (from issue #13538). http://hg.python.org/cpython/rev/5c39e3906ce9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 14:39:39 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 21 Nov 2012 13:39:39 +0000 Subject: [issue16522] Add 'FAIL_FAST' flag to doctest Message-ID: <1353505179.63.0.615985281982.issue16522@psf.upfronthosting.co.za> New submission from R. David Murray: When debugging using tests or doing test driven development, I find it very useful to have the test run exit immediately on the first failure. Doctest currently has a feature to suppress all output after the first failure, but not to exit on the first failure. Exiting on the first failure in doctest is even more important than in unit test for me, since a typical way to debug using doctest is to add prints to sys.stderr to the code. If the doctest run continues, other tests that follow the same code path may also dump debugging output, making it harder to find the output related specifically to the test failure. The attached patch does the easy part: adds a FAIL_FAST flag. I don't have time right at the moment to finish the patch with docs and tests. If someone wants to work on this before I get back to it they should feel free (just post a note here that you are working on it). ---------- assignee: r.david.murray files: doctest_fail_fast.patch keywords: easy, patch messages: 176059 nosy: r.david.murray priority: normal severity: normal stage: needs patch status: open title: Add 'FAIL_FAST' flag to doctest type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28063/doctest_fail_fast.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 16:16:06 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 21 Nov 2012 15:16:06 +0000 Subject: [issue16523] attrgetter and itemgetter signatures in docs need cleanup Message-ID: <1353510966.46.0.566270540705.issue16523@psf.upfronthosting.co.za> New submission from R. David Murray: It looks like the use of the 'args' formal parameter was cut and pasted from the methodcaller docs, when it is not appropriate for itemgetter and attrgetter. http://docs.python.org/3/library/operator.html#operator.attrgetter ---------- assignee: docs at python components: Documentation messages: 176060 nosy: docs at python, r.david.murray priority: normal severity: normal stage: needs patch status: open title: attrgetter and itemgetter signatures in docs need cleanup type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 16:18:09 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 21 Nov 2012 15:18:09 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1353511089.03.0.786326520551.issue15990@psf.upfronthosting.co.za> Ezio Melotti added the comment: On one hand it's good to have individual entries that can be referenced. On the other hand I think it's important that people get the full picture, and having these definitions sparse in 4 or more distinct glossary entries doesn't help IMHO -- even if the reader follows all the cross-links. I think it would be better to have a single entry somewhere (e.g. in the FAQs -- maybe it's too "advanced" for the tutorial), that: * explains the difference between arguments (what you pass) and parameters (what the function accepts); * lists the 5 kinds of parameters, providing an example for each; * lists the 2 kinds of arguments, providing an example for each; I see 3 options here: 1) we make this section and keep stub entries that link to it; 2) we repeat the informations in both places (section and entries); 3) we just keep the glossary entries; If we pick 1 people might have to follow one more link. Having a single "parameters and arguments" entry in the glossary might make this better by avoiding a redirect. If we pick 2 there's duplication, and that's bad. If we pick 3 I think we could at least explain the kinds of arguments in the "argument" entry and having stubs for "keyword args" and "positional args". This will leave us with only two entries ("argument" and "parameter"), and with the initial problem that we don't know where to put the explanation of the difference between the two (in both? in a new entry? somewhere else? no parallel?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 16:31:10 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 21 Nov 2012 15:31:10 +0000 Subject: [issue16523] attrgetter and itemgetter signatures in docs need cleanup In-Reply-To: <1353510966.46.0.566270540705.issue16523@psf.upfronthosting.co.za> Message-ID: <1353511870.28.0.91320200111.issue16523@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 16:39:33 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 21 Nov 2012 15:39:33 +0000 Subject: [issue16515] TypeError message incorrect for max() with one keyword arg In-Reply-To: <1353451017.11.0.598123114389.issue16515@psf.upfronthosting.co.za> Message-ID: <1353512373.0.0.484672156139.issue16515@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 16:45:08 2012 From: report at bugs.python.org (Almar Klein) Date: Wed, 21 Nov 2012 15:45:08 +0000 Subject: [issue7833] bdist_wininst installers fail to load extensions built with Issue4120 patch In-Reply-To: <1265062373.01.0.461114831555.issue7833@psf.upfronthosting.co.za> Message-ID: <1353512708.41.0.719254709994.issue7833@psf.upfronthosting.co.za> Almar Klein added the comment: Just checking in to point out a possible problem with the code that strips the MSVCR dependency from the embedded manifest. The used regexpr is too greedy: the first bit can trigger on an earlier "assemblyIdentity" tag, so that after the removal the manifest is no longer valid XML. The key problem is that the "|)""", - re.DOTALL) + r"""|)""") It is well possible that the problem does not causes any problems for the intended usage of the code. I'm using the code to strip other DLL's and ran into this issue (with tk85.dll to be precise). - Almar ---------- nosy: +almar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 17:06:23 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 21 Nov 2012 16:06:23 +0000 Subject: [issue16515] TypeError message incorrect for max() with one keyword arg In-Reply-To: <1353451017.11.0.598123114389.issue16515@psf.upfronthosting.co.za> Message-ID: <1353513983.59.0.811591443088.issue16515@psf.upfronthosting.co.za> Ezio Melotti added the comment: Attached an initial patch: >>> max() TypeError: max() requires at least a positional argument >>> max(foo=3) TypeError: max() requires at least a positional argument >>> max(3, foo=3) TypeError: max() got an unexpected keyword argument >>> max(3, 4) 4 ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file28064/issue16515.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 17:18:02 2012 From: report at bugs.python.org (Antoine Brodin) Date: Wed, 21 Nov 2012 16:18:02 +0000 Subject: [issue16524] File access not always working with Python for Windows 32 bits on Windows 64 bits OS Message-ID: <1353514682.16.0.187525940709.issue16524@psf.upfronthosting.co.za> New submission from Antoine Brodin: I have a file: >dir c:\Windows\System32\scext.dll 14/07/2009 02:41 89?088 scext.dll With Python 32 bits it fails: >c:\Python27\python.exe Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.stat('c:\Windows\System32\scext.dll') Traceback (most recent call last): File "", line 1, in WindowsError: [Error 2] Le fichier sp?cifi? est introuvable: 'c:\\Windows\\Syste m32\\scext.dll' With Python 64bits it succeeds: >c:\Python27-x64\python.exe Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.stat('c:\Windows\System32\scext.dll') nt.stat_result(st_mode=33206, st_ino=0L, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=89088L, st_atime=1247527874L, st_mtime=1247535713L, st_ctime=1247527874L) ---------- components: Windows messages: 176064 nosy: Antoine.Brodin priority: normal severity: normal status: open title: File access not always working with Python for Windows 32 bits on Windows 64 bits OS type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 17:20:51 2012 From: report at bugs.python.org (Tim Golden) Date: Wed, 21 Nov 2012 16:20:51 +0000 Subject: [issue16524] File access not always working with Python for Windows 32 bits on Windows 64 bits OS In-Reply-To: <1353514682.16.0.187525940709.issue16524@psf.upfronthosting.co.za> Message-ID: <1353514851.5.0.752574314837.issue16524@psf.upfronthosting.co.za> Tim Golden added the comment: Not Python, but Windows. See here: http://msdn.microsoft.com/en-gb/library/windows/desktop/aa384187%28v=vs.85%29.aspx ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 17:39:44 2012 From: report at bugs.python.org (Antoine Brodin) Date: Wed, 21 Nov 2012 16:39:44 +0000 Subject: [issue16524] File access not always working with Python for Windows 32 bits on Windows 64 bits OS In-Reply-To: <1353514682.16.0.187525940709.issue16524@psf.upfronthosting.co.za> Message-ID: <1353515984.75.0.0613245378609.issue16524@psf.upfronthosting.co.za> Antoine Brodin added the comment: Ok, with Python 32 bits I can do: >>> os.stat('c:\windows\sysnative\scext.dll') nt.stat_result(st_mode=33206, st_ino=0L, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=89088L, st_atime=1247527874L, st_mtime=1247535713L, st_ctime=12475278 74L) I will try to use this workaround in my scripts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 18:51:24 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 21 Nov 2012 17:51:24 +0000 Subject: [issue16515] TypeError message incorrect for max() with one keyword arg In-Reply-To: <1353451017.11.0.598123114389.issue16515@psf.upfronthosting.co.za> Message-ID: <1353520284.61.0.525696318353.issue16515@psf.upfronthosting.co.za> Mark Dickinson added the comment: Would it make sense to adjust the error messages in PyArg_UnpackTuple instead? I suspect there are quite a lot of functions using it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 19:02:33 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 21 Nov 2012 18:02:33 +0000 Subject: [issue16515] TypeError message incorrect for max() with one keyword arg In-Reply-To: <1353451017.11.0.598123114389.issue16515@psf.upfronthosting.co.za> Message-ID: <1353520953.68.0.39471187733.issue16515@psf.upfronthosting.co.za> Ezio Melotti added the comment: PyArg_UnpackTuple could be fixed to say "positional argument" (see attached patch (maybe this should be a separate issue)). The error returned by max() is wrong because PyArg_UnpackTuple is used on the *args alone first, and it has no knowledge of the kwargs. If PyArg_UnpackTuple is used to parse the *args then adding "positional" should solve the problem, however for this specific case the error would still be incorrect, because max also accepts more positional args. ---------- Added file: http://bugs.python.org/file28065/issue16515-unpacktuple.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 19:06:01 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 21 Nov 2012 18:06:01 +0000 Subject: [issue16520] subprocess.Popen() TypeError message incorrect without args argument In-Reply-To: <1353487512.93.0.371965893186.issue16520@psf.upfronthosting.co.za> Message-ID: <1353521161.22.0.880353657992.issue16520@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 19:08:28 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 21 Nov 2012 18:08:28 +0000 Subject: [issue16520] subprocess.Popen() TypeError message incorrect without args argument In-Reply-To: <1353487512.93.0.371965893186.issue16520@psf.upfronthosting.co.za> Message-ID: <1353521308.25.0.0519902691407.issue16520@psf.upfronthosting.co.za> Mark Dickinson added the comment: By the way, I think this message from Nick is the closest to a resolution from that thread: "We've already had this terminology discussion and documented the results in PEP 362. The rest of the docs may require updates to be brought in line with that." (http://mail.python.org/pipermail/python-dev/2012-September/121791.html) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 19:12:21 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 21 Nov 2012 18:12:21 +0000 Subject: [issue16515] TypeError message incorrect for max() with one keyword arg In-Reply-To: <1353451017.11.0.598123114389.issue16515@psf.upfronthosting.co.za> Message-ID: <1353521541.22.0.463826089954.issue16515@psf.upfronthosting.co.za> Mark Dickinson added the comment: Yes, true: max is probably still going to have to be a special case, thanks to its schizophrenic signature. (max([1, 2, 3]) versus max(1, 2, 3)). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 19:46:07 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 21 Nov 2012 18:46:07 +0000 Subject: [issue16520] subprocess.Popen() TypeError message incorrect without args argument In-Reply-To: <1353487512.93.0.371965893186.issue16520@psf.upfronthosting.co.za> Message-ID: <1353523567.76.0.830364335344.issue16520@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > TypeError: __init__() missing 1 required positional argument: 'args' I think something like the following would be more correct: __init__() missing argument for parameter 'args' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 19:49:27 2012 From: report at bugs.python.org (Daniel Urban) Date: Wed, 21 Nov 2012 18:49:27 +0000 Subject: [issue16522] Add 'FAIL_FAST' flag to doctest In-Reply-To: <1353505179.63.0.615985281982.issue16522@psf.upfronthosting.co.za> Message-ID: <1353523767.01.0.0839782289667.issue16522@psf.upfronthosting.co.za> Daniel Urban added the comment: I've added some tests and documentation. English is not my first language, so the docs almost certainly need some correction. ---------- nosy: +daniel.urban Added file: http://bugs.python.org/file28066/doctest_fail_fast_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 19:53:51 2012 From: report at bugs.python.org (Daniel Urban) Date: Wed, 21 Nov 2012 18:53:51 +0000 Subject: [issue16522] Add 'FAIL_FAST' flag to doctest In-Reply-To: <1353505179.63.0.615985281982.issue16522@psf.upfronthosting.co.za> Message-ID: <1353524031.43.0.968040460804.issue16522@psf.upfronthosting.co.za> Changes by Daniel Urban : Removed file: http://bugs.python.org/file28066/doctest_fail_fast_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 19:54:37 2012 From: report at bugs.python.org (Daniel Urban) Date: Wed, 21 Nov 2012 18:54:37 +0000 Subject: [issue16522] Add 'FAIL_FAST' flag to doctest In-Reply-To: <1353505179.63.0.615985281982.issue16522@psf.upfronthosting.co.za> Message-ID: <1353524077.09.0.578685385933.issue16522@psf.upfronthosting.co.za> Daniel Urban added the comment: I'm sorry, I forgot the versionadded directive. The fixed patch is attached. ---------- Added file: http://bugs.python.org/file28067/doctest_fail_fast_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 20:04:24 2012 From: report at bugs.python.org (Carl Meyer) Date: Wed, 21 Nov 2012 19:04:24 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1353524664.84.0.541628316114.issue16480@psf.upfronthosting.co.za> Carl Meyer added the comment: What OS are you on, Marco? It looks to me like pyvenv probably does need the same hack as virtualenv here, to deal with OSes who set posix_local as the default installation scheme. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 21:09:51 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 21 Nov 2012 20:09:51 +0000 Subject: [issue16522] Add 'FAIL_FAST' flag to doctest In-Reply-To: <1353505179.63.0.615985281982.issue16522@psf.upfronthosting.co.za> Message-ID: <3Y6FHz0M4dzRNj@mail.python.org> Roundup Robot added the comment: New changeset 966432a0734c by R David Murray in branch 'default': #16522: Add FAIL_FAST flag to doctest. http://hg.python.org/cpython/rev/966432a0734c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 21:11:08 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 21 Nov 2012 20:11:08 +0000 Subject: [issue16522] Add 'FAIL_FAST' flag to doctest In-Reply-To: <1353505179.63.0.615985281982.issue16522@psf.upfronthosting.co.za> Message-ID: <1353528668.25.0.32843582437.issue16522@psf.upfronthosting.co.za> R. David Murray added the comment: Looks great, I didn't think any changes were needed. Thanks a bunch, Daniel. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 21:13:47 2012 From: report at bugs.python.org (Sebastian Kraft) Date: Wed, 21 Nov 2012 20:13:47 +0000 Subject: [issue16525] wave file module does not support 32bit float format Message-ID: <1353528827.37.0.543069044809.issue16525@psf.upfronthosting.co.za> New submission from Sebastian Kraft: The wave module cannot read audio WAV files containing 32bit float values. This is a very common file type for professional audio! There has already been a patch some years ago which works fine but was finally not applied. I can confirm that it does not break anything and only adds support for a new number format. http://bugs.python.org/issue1144504 ---------- components: Extension Modules, IO messages: 176077 nosy: Sebastian.Kraft priority: normal severity: normal status: open title: wave file module does not support 32bit float format type: enhancement versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 21:34:04 2012 From: report at bugs.python.org (Marco Amadori) Date: Wed, 21 Nov 2012 20:34:04 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1353524664.84.0.541628316114.issue16480@psf.upfronthosting.co.za> Message-ID: <201211212134.02443.marco.amadori@gmail.com> Marco Amadori added the comment: On Wednesday 21 November 2012 21:32:57 Carl Meyer wrote: > Carl Meyer added the comment: > > What OS are you on, Marco? Linux. Debian GNU/Linux amd64 sid/experimental. > It looks to me like pyvenv probably does need the same hack as virtualenv > here, to deal with OSes who set posix_local as the default installation > scheme. nice! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 22:14:56 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 21 Nov 2012 21:14:56 +0000 Subject: [issue16234] Implement correct block_size and tests for HMAC-SHA3 In-Reply-To: <1350245755.11.0.901944251293.issue16234@psf.upfronthosting.co.za> Message-ID: <1353532496.44.0.924423334277.issue16234@psf.upfronthosting.co.za> Christian Heimes added the comment: HMAC-SHA3 hasn't been standardized yet. I'm not even sure their will be an official HMAC-SHA3 standard anytime soon. Keccak uses a sponge design that isn't vulnerable to length extension attacks like Merkle?Damg?rd based hashing algorithms (MD5, SHA-1, SHA-2). My standalone package now contains some experimental code and tests based on http://www.di-mgt.com.au/hmac_sha3_testvectors.html . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 22:47:07 2012 From: report at bugs.python.org (Berker Peksag) Date: Wed, 21 Nov 2012 21:47:07 +0000 Subject: [issue16525] wave file module does not support 32bit float format In-Reply-To: <1353528827.37.0.543069044809.issue16525@psf.upfronthosting.co.za> Message-ID: <1353534427.78.0.936002781601.issue16525@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: -Python 2.6, Python 3.1, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 21 22:58:04 2012 From: report at bugs.python.org (Lothsahn) Date: Wed, 21 Nov 2012 21:58:04 +0000 Subject: [issue16526] Python does not cross compile properly Message-ID: <1353535083.98.0.533437922947.issue16526@psf.upfronthosting.co.za> New submission from Lothsahn: Python doesn't really support cross compilation. I've created a patch for Python 2.7.3 which compiles nearly all of Python (except a couple modules). Patches for Python 3 are also included, but I didn't have anything to do with them. My patch allows for cross compilation as well as the building of modules. The only issue I'm aware of is that the ELFCLASS of the modules that are to be built must be the same. This is because python uses sys.platform to determine which folder to generate the modules in, and so the sys.platform is always that of the host system. When generating the modules, we should probably generate them twice, once for the host system (using sys.platform), and once for the cross-compiled system (using the cross-compiled system's sys.platform). The patches can be found here: http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html Given the rise of embedded systems, it's a big drawback that cross compiling Python is so difficult. ---------- components: Build, Cross-Build messages: 176080 nosy: Lothsahn priority: normal severity: normal status: open title: Python does not cross compile properly type: compile error versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 00:41:01 2012 From: report at bugs.python.org (Alexis Daboville) Date: Wed, 21 Nov 2012 23:41:01 +0000 Subject: [issue16527] (very) long list of elif causes segfault Message-ID: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> New submission from Alexis Daboville: Hi, It looks like using a very long list of elif makes CPython segfault. You can try it with the attached file, which looks like this: if False: pass elif False: pass # thousands of elifs elif False: pass $ python elif_segfault.py Segmentation fault. CPython versions tested: 3.x (all segfaults): 3.1 on Debian 3.2 on Arch Linux 3.3 on Windows 2.6 on Debian: segfaults with a longer list of elifs than the one in the attached file. The PyPy behaviour seems better: it raises 'RuntimeError: maximum recursion depth exceeded'. A possible cause (if I understood well) is that there are no elif nodes in the AST, elif are just plain ifs which are stored recursively in the else part of the previous if. (I'm not sure if that's an issue as it's not a real use case, but it makes CPython segfault and I was advised on #python-fr to report it anyway.) ---------- files: elif_segfault.py messages: 176081 nosy: alexis.d priority: normal severity: normal status: open title: (very) long list of elif causes segfault versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file28068/elif_segfault.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 00:42:32 2012 From: report at bugs.python.org (Alexis Daboville) Date: Wed, 21 Nov 2012 23:42:32 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> Message-ID: <1353541352.02.0.617254539777.issue16527@psf.upfronthosting.co.za> Changes by Alexis Daboville : ---------- components: +Interpreter Core type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 00:50:51 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 21 Nov 2012 23:50:51 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> Message-ID: <1353541851.68.0.970566250408.issue16527@psf.upfronthosting.co.za> Christian Heimes added the comment: Nice catch! How did you notice the issue? I hope you didn't use thousands of elifs in some code. It's going to perform horrible slow with O(n). I'll see if we can fix the problem easily. As this is clearly a pathological case I consider a patch as "nice to have" and not as "required". Nobody sane write a elif chain with nearly 25 thousands elif. ;) ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 00:53:53 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 21 Nov 2012 23:53:53 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> Message-ID: <1353542033.74.0.794124357366.issue16527@psf.upfronthosting.co.za> Christian Heimes added the comment: Interesting, a debug build of Python doesn't segfault. $ 3.3/python elif_segfault.py RuntimeError: maximum recursion depth exceeded during compilation [41897 refs] $ python3.3 elif_segfault.py Speicherzugriffsfehler (Speicherabzug geschrieben) Backtrace: #0 0x00000000004cfd9c in _Py_Mangle (privateobj=, ident=) at Python/compile.c:207 #1 0x0000000000509225 in symtable_add_def (st=0x7fe146388860, name=0x7fe14647f450, flag=16) at Python/symtable.c:955 #2 0x000000000050ba59 in symtable_visit_expr (st=0x7fe146388860, e=0x23ea600) at Python/symtable.c:1370 #3 0x000000000050a52c in symtable_visit_stmt (st=0x7fe146388860, s=0x23ea690) at Python/symtable.c:1158 #4 0x000000000050a632 in symtable_visit_stmt (st=0x7fe146388860, s=0x23ea778) at Python/symtable.c:1161 #5 0x000000000050a632 in symtable_visit_stmt (st=0x7fe146388860, s=0x23ea860) at Python/symtable.c:1161 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 00:57:18 2012 From: report at bugs.python.org (Alexis Daboville) Date: Wed, 21 Nov 2012 23:57:18 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> Message-ID: <1353542238.06.0.77781289552.issue16527@psf.upfronthosting.co.za> Alexis Daboville added the comment: I had the feeling that there was a possible issue when reading how elifs were represented in the AST. I'm not insane enough to write so many elifs in a real program ;). I totally agree on the 'nice to have' part rather than 'required'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 01:38:00 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 22 Nov 2012 00:38:00 +0000 Subject: [issue16517] address merge conflicts in devguide null-merge instructions In-Reply-To: <1353475947.45.0.611310875151.issue16517@psf.upfronthosting.co.za> Message-ID: <1353544680.68.0.224348353772.issue16517@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 02:03:12 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 22 Nov 2012 01:03:12 +0000 Subject: [issue16525] wave file module does not support 32bit float format In-Reply-To: <1353528827.37.0.543069044809.issue16525@psf.upfronthosting.co.za> Message-ID: <1353546192.54.0.226361895014.issue16525@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: This is a new feature. Targeting Python 3.4. ---------- nosy: +jcea versions: -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 02:09:29 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 22 Nov 2012 01:09:29 +0000 Subject: [issue1144504] Add IEEE Float support to wave.py Message-ID: <1353546569.71.0.858310655716.issue1144504@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- superseder: -> wave file module does not support 32bit float format _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 02:12:19 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 22 Nov 2012 01:12:19 +0000 Subject: [issue16525] wave file module does not support 32bit float format In-Reply-To: <1353528827.37.0.543069044809.issue16525@psf.upfronthosting.co.za> Message-ID: <1353546739.43.0.553440365527.issue16525@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Can somebody point to a floating point WAVE specification?. I think the issues raised in the original bug still stands. Also, support for writing should be provided too. http://web.archive.org/web/20080924064943/http://ccrma.stanford.edu/CCRMA/Courses/422/projects/WaveFormat/ http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 02:19:23 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 22 Nov 2012 01:19:23 +0000 Subject: [issue16526] Python does not cross compile properly In-Reply-To: <1353535083.98.0.533437922947.issue16526@psf.upfronthosting.co.za> Message-ID: <1353547163.92.0.8284484652.issue16526@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: This is 3.4 material. Could you possibly work with us to properly integrate in 3.4?. ---------- nosy: +jcea versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 02:23:56 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 22 Nov 2012 01:23:56 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> Message-ID: <1353547436.59.0.586034812236.issue16527@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 02:31:21 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 22 Nov 2012 01:31:21 +0000 Subject: [issue16507] Patch selectmodule.c to support WSAPoll on Windows In-Reply-To: <1353277974.19.0.012295377293.issue16507@psf.upfronthosting.co.za> Message-ID: <1353547881.56.0.427524436632.issue16507@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 02:54:58 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 22 Nov 2012 01:54:58 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1353549298.49.0.523743387237.issue16510@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 03:08:18 2012 From: report at bugs.python.org (Kiet Tran) Date: Thu, 22 Nov 2012 02:08:18 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1353550098.74.0.0399039219713.issue16438@psf.upfronthosting.co.za> Kiet Tran added the comment: I was trying to fix this, but I ran into a couple questions. 1) Once I put, say, "x + y" and "x - y" into the same table cell, what would a good format be? My preferred format is to have them on separate lines in the cell, but after a lot of googling on the syntax of reST (and trials and errors), I'm still unable to figure out how to do it. Using bullet points would mean I have to align elements in the "Notes" column with the ones in the "Operation" column somehow. Alternatively, I can separate them by comma, but the table would look a bit cluttered. 2) Should the functions abs, int, etc., belong in the same table that's meant to list operators by precedence? ---------- nosy: +ktt3ja _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 03:10:28 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 22 Nov 2012 02:10:28 +0000 Subject: [issue16517] address merge conflicts in devguide null-merge instructions In-Reply-To: <1353475947.45.0.611310875151.issue16517@psf.upfronthosting.co.za> Message-ID: <1353550228.45.0.598638666008.issue16517@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Addressed by: http://hg.python.org/devguide/rev/78a69b929ab7 (I accidentally left the issue number out of the commit message.) ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 03:30:09 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 22 Nov 2012 02:30:09 +0000 Subject: [issue16528] 3.2 docs not updating on docs.python.org Message-ID: <1353551409.71.0.725216455531.issue16528@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The 3.2 docs haven't updated since Oct 28, 2012: http://docs.python.org/3.2/ The commits for the Doc folder around that time are as follows. I observed that the top commit was not built, but I'm not sure about the ones previous: $ hg log -b 3.2 Doc | more changeset: 80018:40aedc7da30f branch: 3.2 parent: 79798:16493102f9b1 user: Andrew Svetlov date: Sun Oct 28 14:10:30 2012 +0200 summary: Issue #14570: Document json sort_keys parameter properly. changeset: 79996:e02d49db3f5b branch: 3.2 parent: 79989:f6d04f5cff31 user: Georg Brandl date: Sun Oct 28 07:59:42 2012 +0100 summary: #8040: fix jQuery incompatibility changeset: 79984:36a35b86e3b0 branch: 3.2 parent: 79980:740be7346c92 user: Ezio Melotti date: Sat Oct 27 23:12:48 2012 +0300 summary: #8040: fix the version. changeset: 79980:740be7346c92 branch: 3.2 parent: 79976:35a2a0e166d0 user: Ezio Melotti date: Sat Oct 27 22:28:48 2012 +0300 summary: #8040: enable the versionswitcher for the autobuild-dev target. changeset: 79976:35a2a0e166d0 branch: 3.2 parent: 79972:abbfb89055d3 user: Ezio Melotti date: Sat Oct 27 22:09:16 2012 +0300 summary: #8040: add a version switcher to the documentation. Patch by Yury Selivanov. ---------- assignee: docs at python components: Documentation messages: 176090 nosy: chris.jerdonek, docs at python, ezio.melotti, georg.brandl priority: normal severity: normal status: open title: 3.2 docs not updating on docs.python.org type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 03:40:01 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 22 Nov 2012 02:40:01 +0000 Subject: [issue16514] Cryptic traceback when sys.path[0] is None In-Reply-To: <1353424635.18.0.600046275263.issue16514@psf.upfronthosting.co.za> Message-ID: <1353552001.06.0.832917761597.issue16514@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 03:49:23 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 22 Nov 2012 02:49:23 +0000 Subject: [issue16528] 3.2 docs not updating on docs.python.org In-Reply-To: <1353551409.71.0.725216455531.issue16528@psf.upfronthosting.co.za> Message-ID: <1353552563.33.0.19025606757.issue16528@psf.upfronthosting.co.za> R. David Murray added the comment: This is intentional. Only 2.7, 3.3, and 3.4 auto-update now that 3.3 is out. There will be a final rebuild of the 3.2 docs when 3.2 final is released. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 03:50:57 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 22 Nov 2012 02:50:57 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1353552657.88.0.13288466691.issue15990@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I like option (3). I attached a new patch using this approach. As suggested, I made the glossary entries for "keyword argument" and "positional argument" into stubs. So now there are just two substantive entries: one for "argument" and one for "parameter." I also included in the parameter entry an example for each of the five parameter types. ---------- Added file: http://bugs.python.org/file28069/issue-15990-2-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 03:54:23 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 22 Nov 2012 02:54:23 +0000 Subject: [issue16528] 3.2 docs not updating on docs.python.org In-Reply-To: <1353551409.71.0.725216455531.issue16528@psf.upfronthosting.co.za> Message-ID: <1353552863.05.0.0902955033723.issue16528@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for the info. Is this information reflected somewhere online? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 04:21:20 2012 From: report at bugs.python.org (Meador Inge) Date: Thu, 22 Nov 2012 03:21:20 +0000 Subject: [issue2454] sha and md5 fixer In-Reply-To: <1206147643.89.0.60936055638.issue2454@psf.upfronthosting.co.za> Message-ID: <1353554480.17.0.239433987083.issue2454@psf.upfronthosting.co.za> Meador Inge added the comment: Attached is a refreshed patch that works for all active branches. The only real change from the original is ?ric's suggestion to s/hash/hashlib/. The 'u' prefix isn't an issue any longer because of PEP 414. Benjamin, does the attached look OK to you? If so, then I will commit it. ---------- assignee: benjamin.peterson -> meador.inge versions: +Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28070/issue2454-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 05:58:29 2012 From: report at bugs.python.org (Todd Rovito) Date: Thu, 22 Nov 2012 04:58:29 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1353560309.23.0.116800287919.issue16278@psf.upfronthosting.co.za> Todd Rovito added the comment: Attached is patch with the final formatting for the documentation updates. I fixed the :exc:`OSError` problems that I had before and used indents to denote Unix behavior VS Windows behavior. Please let me know if I can do anything else to help get this issue resolved. Thanks! ---------- Added file: http://bugs.python.org/file28071/OSRenameDocs3point4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 06:00:35 2012 From: report at bugs.python.org (Todd Rovito) Date: Thu, 22 Nov 2012 05:00:35 +0000 Subject: [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1353560435.13.0.80125279599.issue16278@psf.upfronthosting.co.za> Changes by Todd Rovito : Removed file: http://bugs.python.org/file27640/OSRenameTest3point4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 06:15:34 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 22 Nov 2012 05:15:34 +0000 Subject: =?utf-8?q?=5Bissue13424=5D_Add_examples_for_open=E2=80=99s_new_opener_arg?= =?utf-8?q?ument?= In-Reply-To: <1321609933.89.0.531165464334.issue13424@psf.upfronthosting.co.za> Message-ID: <3Y6TPd2Gf1zQ7y@mail.python.org> Roundup Robot added the comment: New changeset bf1bf3bf3fe2 by ?ric Araujo in branch '3.3': Address reviews for open?s opener argument doc patch (#13424). http://hg.python.org/cpython/rev/bf1bf3bf3fe2 New changeset 8ca6f4953c4b by ?ric Araujo in branch 'default': Merge #13424 followup from 3.3 http://hg.python.org/cpython/rev/8ca6f4953c4b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 06:17:30 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 22 Nov 2012 05:17:30 +0000 Subject: =?utf-8?q?=5Bissue13424=5D_Add_examples_for_open=E2=80=99s_new_opener_arg?= =?utf-8?q?ument?= In-Reply-To: <1321609933.89.0.531165464334.issue13424@psf.upfronthosting.co.za> Message-ID: <1353561450.12.0.377658895395.issue13424@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for all comments. If you think of a better example to show the usage of the argument, feel free to change it. ---------- assignee: docs at python -> eric.araujo resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 06:21:07 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 22 Nov 2012 05:21:07 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1353561667.56.0.286376570371.issue16480@psf.upfronthosting.co.za> ?ric Araujo added the comment: Is it impossible to edit the install scheme when run in a venv, so that the workaround becomes unnecessary? We are the upstream after all :) ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 07:03:08 2012 From: report at bugs.python.org (Yongzhi Pan) Date: Thu, 22 Nov 2012 06:03:08 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1353564188.76.0.751117342755.issue16438@psf.upfronthosting.co.za> Yongzhi Pan added the comment: One possible solution: We do not list priorities of the operations, instead link to the precedence table in the language reference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 08:15:36 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 22 Nov 2012 07:15:36 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> Message-ID: <1353568536.38.0.260610486838.issue16527@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 09:06:05 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 22 Nov 2012 08:06:05 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> Message-ID: <50ADDCE7.1020804@egenix.com> Marc-Andre Lemburg added the comment: On 22.11.2012 00:41, Alexis Daboville wrote: > > A possible cause (if I understood well) is that there are no elif nodes in the AST, elif are just plain ifs which are stored recursively in the else part of the previous if. This is likely the cause. It's possible that the Python compiler uses too much stack space, causing the stack to underrun, if the default recursion limit is too high. You should be able to check this by setting the recursion limit to a lower value: http://docs.python.org/3/library/sys.html?highlight=setrecursion#sys.setrecursionlimit It defaults to 1000. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 22 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 09:49:45 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 22 Nov 2012 08:49:45 +0000 Subject: [issue16529] Compiler error when trying to compile ceval.c on OpenSUSE 11.3 Message-ID: <1353574185.01.0.323738312876.issue16529@psf.upfronthosting.co.za> New submission from Marc-Andre Lemburg: When trying to compile the hg checkout (2012-11-22), I'm getting a compiler error from GCC when trying to compile ceval.c on OpenSUSE 11.3 x64: gcc -pthread -c -Wno-unused-result -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/ceval.o Python/ceval.c Python/ceval.c: In function PyEval_EvalFrameEx: Python/ceval.c:3168:1: internal compiler error: in save_call_clobbered_regs, at caller-save.c:911 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. make: *** [Python/ceval.o] Error 1 Here's the gcc version info: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.5/lto-wrapper Target: x86_64-suse-linux Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.5 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.5 --enable-linux-futex --without-system-libunwind --enable-gold --with-plugin-ld=/usr/bin/gold --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux Thread model: posix gcc version 4.5.0 20100604 [gcc-4_5-branch revision 160292] (SUSE Linux) Interestingly, this error does not happen when compiling the 3.3.0 release version. It looks similar to these two bugs that are related to some optimization bug in GCC: * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45259 (I can't reproduce this one) * https://bugzilla.redhat.com/show_bug.cgi?id=622060 (This was detected in Fedora for Python 3.1.2) I guess you could say that the compiler is broken, but I still think that Python's configure script should detect this and then disable --with-computed-gotos. ---------- components: Build, Interpreter Core messages: 176101 nosy: lemburg priority: normal severity: normal status: open title: Compiler error when trying to compile ceval.c on OpenSUSE 11.3 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 10:26:29 2012 From: report at bugs.python.org (Alexis Daboville) Date: Thu, 22 Nov 2012 09:26:29 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> Message-ID: <1353576389.89.0.259129969651.issue16527@psf.upfronthosting.co.za> Alexis Daboville added the comment: I don't think it can be "fixed" with sys.setrecursionlimit for a few reasons: * I think the issue arises when the AST is built. Otherwise if we put code before the if it would execute. But that's not the case (try putting a print('hello') before the if and it won't print anything). - This also means that you cannot directly call sys.setrecursionlimit in the file with the elifs. - Though we can set recursion limit using a second file which will then import the elifs file: I tried with different limits and CPython still crash in the same way (and always with the same number of elifs, roughly, because I didn't binary search for the exact amount of elifs). - sys.setrecursionlimit controls the stack size of the running Python program, while here we break C stack directly before running Python bytecode. * When recursion limit is hit, an exception is raised, there's no segfault: >>> def f(): ... f() ... >>> f() # plenty of omitted lines RuntimeError: maximum recursion depth exceeded >>> * Having a RuntimeError raised would be nice, though 'maximum recursion depth exceeded' may not be the best possible error message as from a 'Python user' POV there's no recursion here. --- A possible solution would be, I guess, to store elifs as excepts are stored. Instead of storing elifs recursively, the else part would just contain a list of if nodes (and if there is a else, well just store an if True node). Though I don't know how difficult it would be to implement that, or if it's likely to break a lot of things which relies on ifs/elifs to be stored that way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 10:59:38 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 22 Nov 2012 09:59:38 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353576389.89.0.259129969651.issue16527@psf.upfronthosting.co.za> Message-ID: <50ADF784.6010403@egenix.com> Marc-Andre Lemburg added the comment: On 22.11.2012 10:26, Alexis Daboville wrote: > > Alexis Daboville added the comment: > > I don't think it can be "fixed" with sys.setrecursionlimit for a few reasons: I think you misunderstood. The suggestion was to use the sys function to check whether the segfault is indeed caused by the stack and where a more suitable would be. In order to check this, you need to set a new limit and then compile the example script. If this results in a RuntimeError instead of a segfault for some new value of the limit, we'd know that the problem is caused by the stack use of the compiler. > * I think the issue arises when the AST is built. Otherwise if we put code before the if it would execute. But that's not the case (try putting a print('hello') before the if and it won't print anything). > - This also means that you cannot directly call sys.setrecursionlimit in the file with the elifs. > - Though we can set recursion limit using a second file which will then import the elifs file: I tried with different limits and CPython still crash in the same way (and always with the same number of elifs, roughly, because I didn't binary search for the exact amount of elifs). > - sys.setrecursionlimit controls the stack size of the running Python program, while here we break C stack directly before running Python bytecode. It is also used by the compiler. From symtable.c: /* When compiling the use of C stack is probably going to be a lot lighter than when executing Python code but still can overflow and causing a Python crash if not checked (e.g. eval("()"*300000)). Using the current recursion limit for the compiler seems too restrictive (it caused at least one test to fail) so a factor is used to allow deeper recursion when compiling an expression. Using a scaling factor means this should automatically adjust when the recursion limit is adjusted for small or large C stack allocations. */ #define COMPILER_STACK_FRAME_SCALE 3 We may have to adjust that scaling factor. > * When recursion limit is hit, an exception is raised, there's no segfault: >>>> def f(): > ... f() > ... >>>> f() > # plenty of omitted lines > RuntimeError: maximum recursion depth exceeded >>>> > * Having a RuntimeError raised would be nice, though 'maximum recursion depth exceeded' may not be the best possible error message as from a 'Python user' POV there's no recursion here. You should be seeing "maximum recursion depth exceeded during compilation" if the RuntimeError is generated by the compiler - as Christian did for debug builds. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 22 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 11:43:08 2012 From: report at bugs.python.org (Phil Elson) Date: Thu, 22 Nov 2012 10:43:08 +0000 Subject: [issue16382] Better warnings exception for bad category In-Reply-To: <1351779406.35.0.0813926106632.issue16382@psf.upfronthosting.co.za> Message-ID: <1353580988.07.0.674205494127.issue16382@psf.upfronthosting.co.za> Changes by Phil Elson : Added file: http://bugs.python.org/file28072/pelson_warnings_fix_3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 11:53:45 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 22 Nov 2012 10:53:45 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> Message-ID: <1353581625.88.0.294187320881.issue16527@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I think the issue arises when the AST is built. It's occurring when generating a code object from the AST, after the AST is built: Python 3.3.0+ (3.3:bf1bf3bf3fe2, Nov 22 2012, 10:45:24) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> code = "el".join(['if False: pass\n']*10000) >>> import ast >>> tree = ast.parse(code) >>> code_obj = compile(tree, 'noname.py', 'exec') Traceback (most recent call last): File "", line 1, in RuntimeError: maximum recursion depth exceeded during compilation I don't know why you're getting a segfault rather than the above RuntimeError, though: on my machine this goes straight from working to the RuntimeError: >>> code = "el".join(['if False: pass\n']*2996) >>> code_obj = compile(ast.parse(code), 'noname.py', 'exec') >>> code = "el".join(['if False: pass\n']*2997) >>> code_obj = compile(ast.parse(code), 'noname.py', 'exec') Traceback (most recent call last): File "", line 1, in RuntimeError: maximum recursion depth exceeded during compilation Crys: do you still see the segfault if COMPILER_STACK_FRAME_SCALE is #define'd to be 2 rather than 3? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 12:23:00 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 22 Nov 2012 11:23:00 +0000 Subject: [issue16522] Add 'FAIL_FAST' flag to doctest In-Reply-To: <1353505179.63.0.615985281982.issue16522@psf.upfronthosting.co.za> Message-ID: <3Y6dYX4hbbzNCN@mail.python.org> Roundup Robot added the comment: New changeset e456da396ad9 by R David Murray in branch 'default': #16522: s/always 1/at most 1/. http://hg.python.org/cpython/rev/e456da396ad9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 12:29:27 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 22 Nov 2012 11:29:27 +0000 Subject: [issue16528] 3.2 docs not updating on docs.python.org In-Reply-To: <1353551409.71.0.725216455531.issue16528@psf.upfronthosting.co.za> Message-ID: <1353583767.51.0.916269092395.issue16528@psf.upfronthosting.co.za> R. David Murray added the comment: I don't know. If it is would be in wherever "documenting Python" is these days. The policy is that only the versions in active maintenance are automatically rebuilt. 3.2 is technically no longer in maintenance, it's just that there are reasons that we are delaying the final release. But I remember Georg answering this question on one forum or another, saying that the switch in which versions get built happens when the new version's pages move from default to release. (So, it is always somewhat before the final release of the previous maintenance version.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 13:09:16 2012 From: report at bugs.python.org (David Villa Alises) Date: Thu, 22 Nov 2012 12:09:16 +0000 Subject: [issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins In-Reply-To: <1353123389.46.0.245856363901.issue16490@psf.upfronthosting.co.za> Message-ID: <1353586156.58.0.371451111454.issue16490@psf.upfronthosting.co.za> Changes by David Villa Alises : ---------- nosy: +David.Villa.Alises _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 15:10:16 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 22 Nov 2012 14:10:16 +0000 Subject: [issue12614] Allow to explicitly set the method of urllib.request.Request In-Reply-To: <1311357087.35.0.723496130819.issue12614@psf.upfronthosting.co.za> Message-ID: <1353593416.09.0.929365762228.issue12614@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Hello Miki Tebeka, The change requested by this issue (and provided by the patch) is already in place in 3.3. This was committed as part of issue1673007 has the same behavior too. I am closing this as duplicate. Thank you, Senthil ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 15:52:08 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 22 Nov 2012 14:52:08 +0000 Subject: [issue16464] urllib.request: opener not resetting content-length In-Reply-To: <1352771853.32.0.535718799021.issue16464@psf.upfronthosting.co.za> Message-ID: <1353595928.19.0.279182161005.issue16464@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I'm agree with solution, see my comments in review for the patch. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 15:52:55 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 22 Nov 2012 14:52:55 +0000 Subject: [issue16464] urllib.request: opener not resetting content-length In-Reply-To: <1352771853.32.0.535718799021.issue16464@psf.upfronthosting.co.za> Message-ID: <1353595975.71.0.446256279717.issue16464@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Perhaps it's a bit new behavior and should be applied to 3.4 only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 16:21:46 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 22 Nov 2012 15:21:46 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1353597706.55.0.997971498797.issue15990@psf.upfronthosting.co.za> Ezio Melotti added the comment: I modified the last patch to use bullet lists and include more examples, and also added a FAQ entry to explain the difference between args and parameters. I'll leave further comments on rietveld. ---------- nosy: +eric.araujo Added file: http://bugs.python.org/file28073/issue-15990-3-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 17:15:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 22 Nov 2012 16:15:50 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> Message-ID: <1353600950.26.0.451414888537.issue16527@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This may be a duplicate of issue5765. ---------- nosy: +serhiy.storchaka resolution: -> duplicate superseder: -> stack overflow evaluating eval("()" * 30000) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 17:22:49 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 22 Nov 2012 16:22:49 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> Message-ID: <1353601369.78.0.510246721522.issue16527@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 17:28:58 2012 From: report at bugs.python.org (George Yoshida) Date: Thu, 22 Nov 2012 16:28:58 +0000 Subject: [issue16530] documentation of os.wait3 Message-ID: <1353601738.51.0.504098475316.issue16530@psf.upfronthosting.co.za> New submission from George Yoshida: Documentation defines os.wait3 function as : > os.wait3([options]) but, this argument is required(no default options are set), so > os.wait3(options) is the correct definition. http://docs.python.org/3.3/library/os.html#os.wait3 ---------- assignee: docs at python components: Documentation keywords: easy messages: 176112 nosy: docs at python, quiver priority: low severity: normal status: open title: documentation of os.wait3 type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 17:38:15 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 22 Nov 2012 16:38:15 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353600950.26.0.451414888537.issue16527@psf.upfronthosting.co.za> Message-ID: <50AE54F1.6040609@egenix.com> Marc-Andre Lemburg added the comment: On 22.11.2012 17:15, Serhiy Storchaka wrote: > > This may be a duplicate of issue5765. It's certainly similar, but this ticket is not about expressions, it's about statements that are meant to be repeated often, so in a way less artificial :-) It would be interesting to see whether the scaling factor 3 is small enough to catch this case as well. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 22 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 18:03:00 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Thu, 22 Nov 2012 17:03:00 +0000 Subject: [issue16464] urllib.request: opener not resetting content-length In-Reply-To: <1352771853.32.0.535718799021.issue16464@psf.upfronthosting.co.za> Message-ID: <1353603780.54.0.538819496467.issue16464@psf.upfronthosting.co.za> Alexey Kachayev added the comment: Fixed patch is attached. Documentation is updated. ---------- Added file: http://bugs.python.org/file28074/issue16464_fixed.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 18:04:11 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 22 Nov 2012 17:04:11 +0000 Subject: [issue16528] 3.2 docs not updating on docs.python.org In-Reply-To: <1353551409.71.0.725216455531.issue16528@psf.upfronthosting.co.za> Message-ID: <1353603851.43.0.385234605758.issue16528@psf.upfronthosting.co.za> Georg Brandl added the comment: That's correct. "Documenting Python" is in the devguide now; feel free to remark this somewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 18:34:37 2012 From: report at bugs.python.org (Daniel Urban) Date: Thu, 22 Nov 2012 17:34:37 +0000 Subject: [issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains In-Reply-To: <1319611391.89.0.610441716125.issue13266@psf.upfronthosting.co.za> Message-ID: <1353605677.68.0.218492062202.issue13266@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 18:50:42 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 22 Nov 2012 17:50:42 +0000 Subject: [issue16528] 3.2 docs not updating on docs.python.org In-Reply-To: <1353551409.71.0.725216455531.issue16528@psf.upfronthosting.co.za> Message-ID: <1353606642.09.0.728193227791.issue16528@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > The policy is that only the versions in active maintenance are automatically rebuilt. 3.2 is technically no longer in maintenance, it's just that there are reasons that we are delaying the final release. Okay, below the devguide says it is still in maintenance. Should that be changed? "There are 6 open branches right now in the Mercurial repository: * the default branch holds the future 3.4 version and descends from 3.3 * the 3.3 branch holds bug fixes for future 3.3.x maintenance releases and descends from 3.2 * the 3.2 branch holds bug fixes for an upcoming final 3.2.4 maintenance release and then for future 3.2.x security releases * the 3.1 branch holds security fixes for future 3.1.x security releases ..." (from http://docs.python.org/devguide/devcycle.html#summary ) Perhaps that was the source of confusion for me. I was wondering if there was some other policy about when not to rebuild branches still in maintenance mode. But given that it's not really in maintenance mode any longer, that answers my question. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 19:20:46 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 22 Nov 2012 18:20:46 +0000 Subject: [issue16528] 3.2 docs not updating on docs.python.org In-Reply-To: <1353551409.71.0.725216455531.issue16528@psf.upfronthosting.co.za> Message-ID: <1353608446.16.0.341551814325.issue16528@psf.upfronthosting.co.za> Georg Brandl added the comment: 3.2 is still in maintenance, but the docs are not rebuilt daily for any past stable version, whether they are in maintenance or not. Maybe it's not such a big deal at all? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 19:28:21 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 22 Nov 2012 18:28:21 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> Message-ID: <1353608901.63.0.772393734145.issue16527@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm unable to reproduce the issue with 3.3 and default head. With v3.3.0 the script causes a segfault. I guess Serhiy has a point, the fix for #5765 also fixes this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 19:31:02 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 22 Nov 2012 18:31:02 +0000 Subject: [issue16528] 3.2 docs not updating on docs.python.org In-Reply-To: <1353551409.71.0.725216455531.issue16528@psf.upfronthosting.co.za> Message-ID: <1353609062.55.0.779049508756.issue16528@psf.upfronthosting.co.za> Chris Jerdonek added the comment: It's not. Thanks for the clarification and info. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 19:36:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 22 Nov 2012 18:36:44 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> Message-ID: <1353609404.62.0.0928278881824.issue16527@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 19:44:51 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 22 Nov 2012 18:44:51 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1353609891.31.0.302702900469.issue15990@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I have a number of comments but it is a holiday this weekend so I might not be able to get to it for a day or two. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 20:08:10 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 22 Nov 2012 19:08:10 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1353611290.05.0.790265308245.issue16499@psf.upfronthosting.co.za> Christian Heimes added the comment: How shall I handle venv? I'm reluctant to disable venv in site.py although it allows a user to modify sys.path. However it's only an issue under two circumstances: (1) The user either needs write permissions to the parent directory of the python executable. (2) The script doesn't hard code the path to the interpreter in its shebang. Point 1 allows the user to mess with the system in more serious ways. The second point can be avoided with a correctly written shebang line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 20:29:43 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 22 Nov 2012 19:29:43 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353611290.05.0.790265308245.issue16499@psf.upfronthosting.co.za> Message-ID: <1353612526.3321.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > How shall I handle venv? I'm reluctant to disable venv in site.py > although it allows a user to modify sys.path. However it's only an > issue under two circumstances: > > (1) The user either needs write permissions to the parent directory of > the python executable. > (2) The script doesn't hard code the path to the interpreter in its > shebang. > > Point 1 allows the user to mess with the system in more serious ways. > The second point can be avoided with a correctly written shebang line. I agree that venv shouldn't be a problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 21:19:42 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 22 Nov 2012 20:19:42 +0000 Subject: [issue14525] ia64-hp-hpux11.31 won't compile 2.7 without -D_TERMIOS_INCLUDED In-Reply-To: <1333850075.77.0.408518012212.issue14525@psf.upfronthosting.co.za> Message-ID: <1353615582.48.0.339724977563.issue14525@psf.upfronthosting.co.za> Stefan Krah added the comment: Closing, since this is fixed on the buildslave. ---------- components: +Extension Modules -Build keywords: +buildbot resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> termios fix for QNX breaks HP-UX type: enhancement -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 21:45:22 2012 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 22 Nov 2012 20:45:22 +0000 Subject: [issue1690840] xmlrpclib methods submit call on __str__, __repr__ Message-ID: <1353617122.41.0.659496012134.issue1690840@psf.upfronthosting.co.za> anatoly techtonik added the comment: I'd say this one worthy to be backported. ---------- nosy: +techtonik status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 22:06:46 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 22 Nov 2012 21:06:46 +0000 Subject: [issue3580] failures in test_os In-Reply-To: <1218991904.92.0.339312182303.issue3580@psf.upfronthosting.co.za> Message-ID: <1353618406.19.0.82230572798.issue3580@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 22:09:29 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 22 Nov 2012 21:09:29 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1353618569.06.0.550097054089.issue4473@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > where? In `caps=self.capa()` (you need a space around the assignment operator). > Here I'm following: at :ref:`pop3-objects` in Doc/library/poplib.rst, Ah, ok. Then I agree it makes sense to call it stls(). No need for an alias, IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 22:33:24 2012 From: report at bugs.python.org (Kiet Tran) Date: Thu, 22 Nov 2012 21:33:24 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1353620004.71.0.0022671867447.issue16438@psf.upfronthosting.co.za> Kiet Tran added the comment: Good idea. ---------- keywords: +patch Added file: http://bugs.python.org/file28075/16438.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 22:38:11 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 22 Nov 2012 21:38:11 +0000 Subject: [issue13057] Thread not working for python 2.7.1 built with HP Compiler on HP-UX 11.31 ia64 In-Reply-To: <02EA6D704E30CE499C5071776509A925F59F04@039-SN1MPN1-003.039d.mgd.msft.net> Message-ID: <3Y6vCQ5jyqzMTJ@mail.python.org> Roundup Robot added the comment: New changeset b4f6cd5f9ab7 by Stefan Krah in branch '2.7': Issue #13057: Include stdio.h when NULL is used in configure.ac. http://hg.python.org/cpython/rev/b4f6cd5f9ab7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 22:59:01 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 22 Nov 2012 21:59:01 +0000 Subject: [issue13057] Thread not working for python 2.7.1 built with HP Compiler on HP-UX 11.31 ia64 In-Reply-To: <02EA6D704E30CE499C5071776509A925F59F04@039-SN1MPN1-003.039d.mgd.msft.net> Message-ID: <3Y6vgS5L66zRHj@mail.python.org> Roundup Robot added the comment: New changeset f0baa6be2bf1 by Stefan Krah in branch '3.3': Issue #13057: Include stdio.h when NULL is used in configure.ac. http://hg.python.org/cpython/rev/f0baa6be2bf1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 22:59:26 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 22 Nov 2012 21:59:26 +0000 Subject: [issue16531] Allow IPNetwork to take a tuple Message-ID: <1353621566.3.0.0992835206333.issue16531@psf.upfronthosting.co.za> New submission from Antoine Pitrou: I am in a situation where I'm building an IPNetwork from separate address and mask information. So roughly I'd like to write either: addr = IPAddress('192.168.0.0') network = IPNetwork((addr, '255.255.0.0')) or addr = '192.168.0.0' network = IPNetwork((addr, '255.255.0.0')) Of course it seems like this would be equivalent to: network = IPNetwork('%s/%s' % (addr, '255.255.0.0.')) (but more user-friendly :-)) ---------- components: Library (Lib) messages: 176129 nosy: ncoghlan, pitrou, pmoody priority: low severity: normal status: open title: Allow IPNetwork to take a tuple type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 23:09:49 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 22 Nov 2012 22:09:49 +0000 Subject: [issue16306] Multiple error line for unknown command line parameter In-Reply-To: <1351036031.44.0.0447945169816.issue16306@psf.upfronthosting.co.za> Message-ID: <1353622189.44.0.989144347847.issue16306@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You broke the Ubuntu Shared buildbot, could you fix it? http://buildbot.python.org/all/buildslaves/bolen-ubuntu ---------- nosy: +pitrou status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 23:11:24 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 22 Nov 2012 22:11:24 +0000 Subject: [issue16532] AMD64 Windows 7 build failures Message-ID: <1353622284.34.0.503862642537.issue16532@psf.upfronthosting.co.za> New submission from Antoine Pitrou: The AMD64 Windows 7 buildbot shows weird build failures in ctypes: http://buildbot.python.org/all/buildslaves/kloth-win64 ---------- keywords: buildbot messages: 176131 nosy: jeremy.kloth, jkloth, pitrou priority: high severity: normal status: open title: AMD64 Windows 7 build failures versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 23:18:32 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 22 Nov 2012 22:18:32 +0000 Subject: [issue16533] HPUX: Unable to fork() in thread Message-ID: <1353622712.14.0.676507060266.issue16533@psf.upfronthosting.co.za> New submission from Stefan Krah: There's an error on the HPUX-IA64 buildbot that might be due to some kernel limits. Trent, could you check if the following helps (requires root)? http://zensonic.dk/?p=326 test_forkinthread (test.test_thread.TestForkInThread) ... Fatal Python error: Invalid thread state for this thread test test_thread failed -- Traceback (most recent call last): File "/home/cpython/buildslave/2.7.snakebite-hpux11iv3-ia64-1/build/Lib/test/test_support.py", line 1265, in decorator return func(*args) File "/home/cpython/buildslave/2.7.snakebite-hpux11iv3-ia64-1/build/Lib/test/test_thread.py", line 246, in test_forkinthread "Unable to fork() in thread") AssertionError: Unable to fork() in thread ---------- components: Tests messages: 176132 nosy: skrah, trent priority: normal severity: normal status: open title: HPUX: Unable to fork() in thread type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 23:23:46 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 22 Nov 2012 22:23:46 +0000 Subject: [issue16534] test_float failure on IA64 (HPUX) Message-ID: <1353623026.18.0.63278964149.issue16534@psf.upfronthosting.co.za> New submission from Stefan Krah: There's a test_float failure on HPUX (and many compiler warnings): test test_float failed -- Traceback (most recent call last): File "/home/cpython/buildslave/2.7.snakebite-hpux11iv3-ia64-1/build/Lib/test/test_float.py", line 622, in test_format_testfile self.assertEqual(fmt % arg, rhs) AssertionError: '9999999999999999464902769475481793200000000000000' != '9999999999999999464902769475481793196872414789632' ---------- components: Tests messages: 176133 nosy: mark.dickinson, skrah priority: normal severity: normal status: open title: test_float failure on IA64 (HPUX) type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 23:25:01 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 22 Nov 2012 22:25:01 +0000 Subject: [issue13057] Thread not working for python 2.7.1 built with HP Compiler on HP-UX 11.31 ia64 In-Reply-To: <02EA6D704E30CE499C5071776509A925F59F04@039-SN1MPN1-003.039d.mgd.msft.net> Message-ID: <1353623101.98.0.0202898266375.issue13057@psf.upfronthosting.co.za> Stefan Krah added the comment: Fixed in 2.7, 3.3 and 3.4. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 23:45:38 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 22 Nov 2012 22:45:38 +0000 Subject: [issue16535] json encoder unable to handle decimal Message-ID: <1353624338.46.0.574343718645.issue16535@psf.upfronthosting.co.za> New submission from ?ric Araujo: In 2.7 and other versions, the json module has incomplete support for decimals: >>> json.loads('0.2', parse_float=Decimal) Decimal('0.2') >>> json.dumps(json.loads('0.2', parse_float=Decimal)) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/json/__init__.py", line 231, in dumps return _default_encoder.encode(obj) File "/usr/lib/python2.7/json/encoder.py", line 201, in encode chunks = self.iterencode(o, _one_shot=True) File "/usr/lib/python2.7/json/encoder.py", line 264, in iterencode return _iterencode(o, 0) File "/usr/lib/python2.7/json/encoder.py", line 178, in default raise TypeError(repr(o) + " is not JSON serializable") TypeError: Decimal('0.2') is not JSON serializable simplejson encodes decimals out of the box, but json can?t round-trip. ---------- messages: 176135 nosy: eric.araujo, ezio.melotti, pitrou, rhettinger priority: normal severity: normal status: open title: json encoder unable to handle decimal type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 22 23:47:49 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 22 Nov 2012 22:47:49 +0000 Subject: [issue16535] json encoder unable to handle decimal In-Reply-To: <1353624338.46.0.574343718645.issue16535@psf.upfronthosting.co.za> Message-ID: <1353624468.99.0.427848496231.issue16535@psf.upfronthosting.co.za> ?ric Araujo added the comment: See lengthy discussion that lead to inclusion in simplejson here: http://code.google.com/p/simplejson/issues/detail?id=34 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 00:06:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 22 Nov 2012 23:06:48 +0000 Subject: [issue15474] Differentiate decorator and decorator factory in docs In-Reply-To: <1343416207.69.0.71696747041.issue15474@psf.upfronthosting.co.za> Message-ID: <1353625608.9.0.00691200566106.issue15474@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 00:07:29 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 22 Nov 2012 23:07:29 +0000 Subject: [issue16535] json encoder unable to handle decimal In-Reply-To: <1353624338.46.0.574343718645.issue16535@psf.upfronthosting.co.za> Message-ID: <1353625649.03.0.321386745995.issue16535@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 00:17:45 2012 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 22 Nov 2012 23:17:45 +0000 Subject: [issue16531] Allow IPNetwork to take a tuple In-Reply-To: <1353621566.3.0.0992835206333.issue16531@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Sounds reasonable, especially as it also allows networks and interfaces with prefixes other than "/32" or "/128" to be easily constructed based on integer address values. Should we also allow integers as the second argument, with the same prefix length meaning as the corresponding string? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 00:20:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 22 Nov 2012 23:20:48 +0000 Subject: [issue15474] Differentiate decorator and decorator factory in docs In-Reply-To: <1343416207.69.0.71696747041.issue15474@psf.upfronthosting.co.za> Message-ID: <1353626448.98.0.91127425084.issue15474@psf.upfronthosting.co.za> Ezio Melotti added the comment: The tutorial doesn't seem to mention decorators, do you think this should be covered there? FWIW while explaining decorators I usually use 3 examples: 1) a simple decorator that accepts a function, does something, and returns the same function; 2) a decorator that defines and returns an inner function; 3) a decorator factory, that defines two nested inner functions Not sure if it's necessary to include the first example though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 00:36:53 2012 From: report at bugs.python.org (Piotr Dobrogost) Date: Thu, 22 Nov 2012 23:36:53 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1353627413.57.0.871106538302.issue3244@psf.upfronthosting.co.za> Changes by Piotr Dobrogost : ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 00:38:38 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 22 Nov 2012 23:38:38 +0000 Subject: [issue16536] test_cmd_line: failure on Ubuntu Shared Message-ID: <1353627518.27.0.770445773645.issue16536@psf.upfronthosting.co.za> New submission from Stefan Krah: ====================================================================== FAIL: test_unknown_options (test.test_cmd_line.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_cmd_line.py", line 393, in test_unknown_options self.assertIn(b'Unknown option', err) AssertionError: b'Unknown option' not found in b'/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/python: error while loading shared libraries: libpython3.4dm.so.1.0: cannot open shared object file: No such file or directory' ---------------------------------------------------------------------- ---------- components: Tests messages: 176139 nosy: skrah priority: normal severity: normal status: open title: test_cmd_line: failure on Ubuntu Shared type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 00:42:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 22 Nov 2012 23:42:48 +0000 Subject: [issue16536] test_cmd_line: failure on Ubuntu Shared In-Reply-To: <1353627518.27.0.770445773645.issue16536@psf.upfronthosting.co.za> Message-ID: <1353627768.19.0.0934200808887.issue16536@psf.upfronthosting.co.za> Ezio Melotti added the comment: Already reported in #16306. (Also it's easier if you add a link to the failing buildbot.) ---------- nosy: +ezio.melotti resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Multiple error line for unknown command line parameter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 00:51:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 22 Nov 2012 23:51:35 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <3Y6y9M1JhyzRV2@mail.python.org> Roundup Robot added the comment: New changeset 803e5a732331 by Ezio Melotti in branch 'default': #16309: avoid using deprecated method and turn docstring in a comment. http://hg.python.org/cpython/rev/803e5a732331 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 02:14:17 2012 From: report at bugs.python.org (Jonathan Hosmer) Date: Fri, 23 Nov 2012 01:14:17 +0000 Subject: [issue16537] setup.py throws a ValueError when self.extensions is empty Message-ID: <1353633257.31.0.391670680901.issue16537@psf.upfronthosting.co.za> New submission from Jonathan Hosmer: When disabled_module_list contains all the module names that are not built by Modules/Setup.dist, self.extensions in setup.py will be an empty list and when build_extensions tries to determine the max length of all extension names it raises a ValueError with the following traceback: Traceback (most recent call last): File "./setup.py", line 2143, in main() File "./setup.py", line 2138, in main 'Lib/smtpd.py'] File "/Users/pythonforios/Python_for_iOS/trunk/Python_for_iOS/python2.7/Lib/distutils/core.py", line 152, in setup dist.run_commands() File "/Users/pythonforios/Python_for_iOS/trunk/Python_for_iOS/python2.7/Lib/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/Users/pythonforios/Python_for_iOS/trunk/Python_for_iOS/python2.7/Lib/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/Users/pythonforios/Python_for_iOS/trunk/Python_for_iOS/python2.7/Lib/distutils/command/build.py", line 127, in run self.run_command(cmd_name) File "/Users/pythonforios/Python_for_iOS/trunk/Python_for_iOS/python2.7/Lib/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/Users/pythonforios/Python_for_iOS/trunk/Python_for_iOS/python2.7/Lib/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/Users/pythonforios/Python_for_iOS/trunk/Python_for_iOS/python2.7/Lib/distutils/command/build_ext.py", line 339, in run self.build_extensions() File "./setup.py", line 282, in build_extensions longest = max([len(e.name) for e in self.extensions]) ValueError: max() arg is an empty sequence make: *** [sharedmods] Error 1 ~~~ An example disabled_module_list from setup.py: ~~~ disabled_module_list = [ # Modules not compatible/not applicable for the iOS 'dl', 'nis', 'gdbm', 'spwd', '_bsddb', '_curses', '_tkinter', 'readline', 'bsddb185', 'ossaudiodev', 'sunaudiodev', '_curses_panel', 'linuxaudiodev', # Modules appended to inittab before embedded initialization '_multiprocessing', 'future_builtins', '_ctypes_test', '_testcapi', '_sqlite3', '_hashlib', '_hotshot', '_scproxy', '_pybsddb', 'imageop', '_ctypes', '_lsprof', '_heapq', '_yaml', '_json', 'math', 'zlib', '_io', 'bz2', 'dbm' ] ~~~ Example Modules/Setup.dist: ~~~ DESTLIB=$(LIBDEST) MACHDESTLIB=$(BINLIBDEST) DESTPATH= SITEPATH= TESTPATH= MACHDEPPATH=:plat-$(MACHDEP) EXTRAMACHDEPPATH= TKPATH=:lib-tk OLDPATH=:lib-old COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)$(TKPATH)$(OLDPATH) PYTHONPATH=$(COREPYTHONPATH) *static* posix posixmodule.c errno errnomodule.c pwd pwdmodule.c _sre _sre.c _codecs _codecsmodule.c zipimport zipimport.c _symtable symtablemodule.c array arraymodule.c cmath cmathmodule.c _math.c _struct _struct.c time timemodule.c -lm operator operator.c _weakref _weakref.c _random _randommodule.c _collections _collectionsmodule.c itertools itertoolsmodule.c strop stropmodule.c _functools _functoolsmodule.c _elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c datetime datetimemodule.c _bisect _bisectmodule.c unicodedata unicodedata.c _locale _localemodule.c fcntl fcntlmodule.c grp grpmodule.c select selectmodule.c mmap mmapmodule.c _csv _csv.c _socket socketmodule.c SSL=/usr/local/OpenSSL_for_iOS _ssl _ssl.c -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl -L$(SSL)/lib -lssl -lcrypto crypt cryptmodule.c termios termios.c resource resource.c audioop audioop.c imageop imageop.c _md5 md5module.c md5.c _sha shamodule.c _sha256 sha256module.c _sha512 sha512module.c timing timingmodule.c syslog syslogmodule.c binascii binascii.c parser parsermodule.c cStringIO cStringIO.c cPickle cPickle.c fpectl fpectlmodule.c fpetest fpetestmodule.c pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _multibytecodec cjkcodecs/multibytecodec.c _codecs_cn cjkcodecs/_codecs_cn.c _codecs_hk cjkcodecs/_codecs_hk.c _codecs_iso2022 cjkcodecs/_codecs_iso2022.c _codecs_kr cjkcodecs/_codecs_kr.c _codecs_tw cjkcodecs/_codecs_tw.c _codecs_jp cjkcodecs/_codecs_jp.c xxsubtype xxsubtype.c ---------- components: Build messages: 176142 nosy: jhosmer priority: normal severity: normal status: open title: setup.py throws a ValueError when self.extensions is empty type: compile error versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 02:15:44 2012 From: report at bugs.python.org (Jonathan Hosmer) Date: Fri, 23 Nov 2012 01:15:44 +0000 Subject: [issue16537] setup.py throws a ValueError when self.extensions is empty In-Reply-To: <1353633257.31.0.391670680901.issue16537@psf.upfronthosting.co.za> Message-ID: <1353633344.72.0.578481744099.issue16537@psf.upfronthosting.co.za> Changes by Jonathan Hosmer : ---------- keywords: +patch Added file: http://bugs.python.org/file28076/Python-2.6.8-setup.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 02:16:08 2012 From: report at bugs.python.org (Jonathan Hosmer) Date: Fri, 23 Nov 2012 01:16:08 +0000 Subject: [issue16537] setup.py throws a ValueError when self.extensions is empty In-Reply-To: <1353633257.31.0.391670680901.issue16537@psf.upfronthosting.co.za> Message-ID: <1353633368.71.0.223957131864.issue16537@psf.upfronthosting.co.za> Jonathan Hosmer added the comment: setup.py patch for 2.7.3 ---------- Added file: http://bugs.python.org/file28077/Python-2.7.3-setup.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 02:16:27 2012 From: report at bugs.python.org (Jonathan Hosmer) Date: Fri, 23 Nov 2012 01:16:27 +0000 Subject: [issue16537] setup.py throws a ValueError when self.extensions is empty In-Reply-To: <1353633257.31.0.391670680901.issue16537@psf.upfronthosting.co.za> Message-ID: <1353633387.24.0.276597960078.issue16537@psf.upfronthosting.co.za> Jonathan Hosmer added the comment: setup.py patch for 3.0.1 ---------- Added file: http://bugs.python.org/file28078/Python-3.0.1-setup.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 02:16:49 2012 From: report at bugs.python.org (Jonathan Hosmer) Date: Fri, 23 Nov 2012 01:16:49 +0000 Subject: [issue16537] setup.py throws a ValueError when self.extensions is empty In-Reply-To: <1353633257.31.0.391670680901.issue16537@psf.upfronthosting.co.za> Message-ID: <1353633409.55.0.749750067051.issue16537@psf.upfronthosting.co.za> Jonathan Hosmer added the comment: setup.py patch for 3.1.5 ---------- Added file: http://bugs.python.org/file28079/Python-3.1.5-setup.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 02:17:07 2012 From: report at bugs.python.org (Jonathan Hosmer) Date: Fri, 23 Nov 2012 01:17:07 +0000 Subject: [issue16537] setup.py throws a ValueError when self.extensions is empty In-Reply-To: <1353633257.31.0.391670680901.issue16537@psf.upfronthosting.co.za> Message-ID: <1353633427.45.0.203948250086.issue16537@psf.upfronthosting.co.za> Jonathan Hosmer added the comment: setup.py patch for 3.2.3 ---------- Added file: http://bugs.python.org/file28080/Python-3.2.3-setup.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 02:17:19 2012 From: report at bugs.python.org (Jonathan Hosmer) Date: Fri, 23 Nov 2012 01:17:19 +0000 Subject: [issue16537] setup.py throws a ValueError when self.extensions is empty In-Reply-To: <1353633257.31.0.391670680901.issue16537@psf.upfronthosting.co.za> Message-ID: <1353633439.27.0.557671003766.issue16537@psf.upfronthosting.co.za> Jonathan Hosmer added the comment: setup.py patch for 3.3.0 ---------- Added file: http://bugs.python.org/file28081/Python-3.3.0-setup.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 02:27:38 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 01:27:38 +0000 Subject: [issue16537] setup.py throws a ValueError when self.extensions is empty In-Reply-To: <1353633257.31.0.391670680901.issue16537@psf.upfronthosting.co.za> Message-ID: <1353634058.78.0.789248229396.issue16537@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks for the patches. 3.1 and 2.6 only receive security fixes, and 3.0 is not maintained anymore, so I removed them from the versions. Usually it's enough to upload a single patch, especially if the fix is the same on all branches. The patch should also include tests if possible. Is also not necessary to add a comment when you add a file. ---------- nosy: +ezio.melotti stage: -> patch review versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 03:52:13 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 23 Nov 2012 02:52:13 +0000 Subject: [issue15474] Differentiate decorator and decorator factory in docs In-Reply-To: <1343416207.69.0.71696747041.issue15474@psf.upfronthosting.co.za> Message-ID: <1353639133.75.0.503597468163.issue15474@psf.upfronthosting.co.za> Nick Coghlan added the comment: No, using decorators needs to be in the tutorial, but writing your own is a metaprogramming task that's beyond the tutorial's scope. A HOWTO guide would be appropriate, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 04:16:51 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 23 Nov 2012 03:16:51 +0000 Subject: [issue16527] (very) long list of elif causes segfault In-Reply-To: <1353541261.75.0.656206042402.issue16527@psf.upfronthosting.co.za> Message-ID: <1353640611.9.0.538325166912.issue16527@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 05:11:25 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 23 Nov 2012 04:11:25 +0000 Subject: [issue2454] sha and md5 fixer In-Reply-To: <1206147643.89.0.60936055638.issue2454@psf.upfronthosting.co.za> Message-ID: <1353643885.87.0.795940816201.issue2454@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm not sure how much this is needed considering hashlib has been around, since 2.5. I hope people aren't having to port from before then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 07:55:00 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 23 Nov 2012 06:55:00 +0000 Subject: [issue16531] Allow IPNetwork to take a tuple In-Reply-To: Message-ID: <1353653642.3317.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > Sounds reasonable, especially as it also allows networks and interfaces > with prefixes other than "/32" or "/128" to be easily constructed based on > integer address values. > > Should we also allow integers as the second argument, with the same prefix > length meaning as the corresponding string? IMO, yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 08:36:49 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Nov 2012 07:36:49 +0000 Subject: [issue16534] test_float failure on IA64 (HPUX) In-Reply-To: <1353623026.18.0.63278964149.issue16534@psf.upfronthosting.co.za> Message-ID: <1353656209.55.0.748939448071.issue16534@psf.upfronthosting.co.za> Mark Dickinson added the comment: What's sys.float_repr_style on that machine? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 08:50:55 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Nov 2012 07:50:55 +0000 Subject: [issue16534] test_float failure on IA64 (HPUX) In-Reply-To: <1353623026.18.0.63278964149.issue16534@psf.upfronthosting.co.za> Message-ID: <1353657055.07.0.517818046195.issue16534@psf.upfronthosting.co.za> Mark Dickinson added the comment: >From the buildbot configure output: checking whether C doubles are little-endian IEEE 754 binary64... no checking whether C doubles are big-endian IEEE 754 binary64... yes checking whether C doubles are ARM mixed-endian IEEE 754 binary64... no checking whether we can use gcc inline assembler to get and set x87 control word... no checking for x87-style double rounding... yes Judging by that, it'll probably be using the legacy float repr, since the configure script didn't find a way to set the FPU control word. In that case this is just an overeager test: we expect 50 digits of accuracy but the system-supplied formatting only gives us 35. But it would also be good to try to find a way to enable the short float repr on that box. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 09:33:37 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Nov 2012 08:33:37 +0000 Subject: [issue16534] test_float failure on IA64 (HPUX) In-Reply-To: <1353623026.18.0.63278964149.issue16534@psf.upfronthosting.co.za> Message-ID: <1353659617.41.0.0208908126802.issue16534@psf.upfronthosting.co.za> Mark Dickinson added the comment: Without having looked too hard, the many warnings are almost certainly from our definition of Py_NAN. That's been fixed in the default branch. I'm not sure whether it's worth backporting just to fix warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 10:04:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 09:04:25 +0000 Subject: [issue16306] Multiple error line for unknown command line parameter In-Reply-To: <1351036031.44.0.0447945169816.issue16306@psf.upfronthosting.co.za> Message-ID: <1353661465.2.0.845642260487.issue16306@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, it's my fault. Here is a patch which should fix the bug. ---------- nosy: +skrah Added file: http://bugs.python.org/file28082/test_unknown_option.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 10:07:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 09:07:08 +0000 Subject: [issue16306] Multiple error line for unknown command line parameter In-Reply-To: <1351036031.44.0.0447945169816.issue16306@psf.upfronthosting.co.za> Message-ID: <1353661628.37.0.8845807353.issue16306@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually 2.7 tests should not be broken, but this patch unify 2.7 and 3.x code. ---------- Added file: http://bugs.python.org/file28083/test_unknown_option-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 10:10:57 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 23 Nov 2012 09:10:57 +0000 Subject: [issue4080] unittest: display time used by each test case In-Reply-To: <1223497696.14.0.913391715353.issue4080@psf.upfronthosting.co.za> Message-ID: <1353661857.6.0.861980450755.issue4080@psf.upfronthosting.co.za> anatoly techtonik added the comment: pyunit_time.patch is invalid - missing space on the last line. ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 10:32:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 09:32:56 +0000 Subject: [issue16535] json encoder unable to handle decimal In-Reply-To: <1353624338.46.0.574343718645.issue16535@psf.upfronthosting.co.za> Message-ID: <1353663176.04.0.304458206702.issue16535@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The json module already has too many options. No need for yet one such specialized. >>> class number_str(float): ... def __init__(self, o): ... self.o = o ... def __repr__(self): ... return str(self.o) ... >>> def decimal_serializer(o): ... if isinstance(o, decimal.Decimal): ... return number_str(o) ... raise TypeError(repr(o) + " is not JSON serializable") ... >>> print(json.dumps([decimal.Decimal('0.20000000000000001')], default=decimal_serializer)) [0.20000000000000001] You can extend this to support complex numbers, fractions, date and time, and many other custom types. Have specialized options for this would be cumbersome. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 10:38:04 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 23 Nov 2012 09:38:04 +0000 Subject: [issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation In-Reply-To: <1322181994.22.0.955887054946.issue13475@psf.upfronthosting.co.za> Message-ID: <1353663484.2.0.513852040934.issue13475@psf.upfronthosting.co.za> Changes by Kristj?n Valur J?nsson : ---------- nosy: +kristjan.jonsson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 10:38:40 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 23 Nov 2012 09:38:40 +0000 Subject: [issue14803] Add feature to allow code execution prior to __main__ invocation In-Reply-To: <1336981419.55.0.280530546632.issue14803@psf.upfronthosting.co.za> Message-ID: <1353663520.43.0.678420931883.issue14803@psf.upfronthosting.co.za> Changes by Kristj?n Valur J?nsson : ---------- nosy: +kristjan.jonsson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 10:50:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 09:50:47 +0000 Subject: [issue16531] Allow IPNetwork to take a tuple In-Reply-To: <1353621566.3.0.0992835206333.issue16531@psf.upfronthosting.co.za> Message-ID: <1353664246.99.0.358963315735.issue16531@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: How about ipaddress.IPv4Network((3232235520, 16)), ipaddress.IPv4Network((3232235520, 65535)) and ipaddress.IPv4Network((3232235520, 4294901760))? >>> ipaddress.IPv4Address(3232235520) IPv4Address('192.168.0.0') >>> ipaddress.IPv4Address(65535) IPv4Address('0.0.255.255') >>> ipaddress.IPv4Address(4294901760) IPv4Address('255.255.0.0') >>> ipaddress.IPv4Network('192.168.0.0/0.0.255.255') IPv4Network('192.168.0.0/16') >>> ipaddress.IPv4Network('192.168.0.0/255.255.0.0') IPv4Network('192.168.0.0/16') ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 10:52:39 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 23 Nov 2012 09:52:39 +0000 Subject: [issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation In-Reply-To: <1322181994.22.0.955887054946.issue13475@psf.upfronthosting.co.za> Message-ID: <1353664359.4.0.420204082777.issue13475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Butting in here: Early on in the startup, a search is made for "site.py" using automatic sys.path settings. Do the suggestions here propose to override this? I know there is a -s flag, but all these flags start to be confusing. I have been looking for ways to completely ignore automatic settings for sys.path, either from internal heuristics (either build environment or installed environment) or PYTHONPATH. The reason for this is that as a developer in a large project, one that has many branches, each with their potentially different version of python compiled and with their own libraries, and where a "standard" python distribution may even be installed on the machine as well, we still want to be able to run scripts with each branch' own python with relative simplicity with some sort of guarantee that we are not inadvertently pulling in modules from other, unrelated branches, or god forbid, the "installed" python. PEP 405 seemed to go a long way, although it didn't provide a means in the pyvenv.cfg to completely override sys.path from the startup. I wonder if there isn't a synergy here with PEP 405, e.g. would it make sense to have a pyvenv.cfg file next to the __main__.py file? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 11:13:05 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Nov 2012 10:13:05 +0000 Subject: [issue16535] json encoder unable to handle decimal In-Reply-To: <1353624338.46.0.574343718645.issue16535@psf.upfronthosting.co.za> Message-ID: <1353665585.73.0.390211259634.issue16535@psf.upfronthosting.co.za> Mark Dickinson added the comment: Judging by the discussion that ?ric points to, and by the various stackoverflow questions on the topic ([1], [2]), this is a common enough need that I think it would make sense to have some support for it in the std. lib. There's a sense in which Decimal is the 'right' type for json, and we shouldn't make it harder for people to do the right thing with respect to (e.g.) financial data in databases. [1] http://stackoverflow.com/questions/4019856/decimal-to-json [2] http://stackoverflow.com/questions/1960516/python-json-serialize-a-decimal-object ---------- nosy: +mark.dickinson stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 11:19:08 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 23 Nov 2012 10:19:08 +0000 Subject: [issue11797] 2to3 does not correct "reload" In-Reply-To: <1302191844.85.0.922084217825.issue11797@psf.upfronthosting.co.za> Message-ID: <1353665948.51.0.113533919347.issue11797@psf.upfronthosting.co.za> Berker Peksag added the comment: Here's a patch that adds tests and updates the documentation. ---------- nosy: +berker.peksag Added file: http://bugs.python.org/file28084/issue11797.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 12:03:51 2012 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 23 Nov 2012 11:03:51 +0000 Subject: [issue16532] AMD64 Windows 7 build failures In-Reply-To: <1353622284.34.0.503862642537.issue16532@psf.upfronthosting.co.za> Message-ID: Jeremy Kloth added the comment: On Thu, Nov 22, 2012 at 3:11 PM, Antoine Pitrou wrote: > The AMD64 Windows 7 buildbot shows weird build failures in ctypes: > http://buildbot.python.org/all/buildslaves/kloth-win64 The _ctypes_d.pyd was considered to be in use by the system (although Process Explorer could not the file handle for it). I've since rebooted the machine (it had system updates pending anyway) so the problem should be fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 12:40:54 2012 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Fri, 23 Nov 2012 11:40:54 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1353670854.15.0.132124320537.issue4473@psf.upfronthosting.co.za> Lorenzo M. Catucci added the comment: OK, I'm uploading poplib_03_starttls_v5.diff; I only changed the "caps=self.capa()" into "caps = self.capa()" in the "@@ -352,21 +360,42 @@ class POP3:" hunk. Thank you for pointing at the line; I tried to run pep8.py on poplib.py, but failed to find the line, since I was overwhelmed by the reported pre-existing pep8 inconsistencies... I'm tempted to open a pep8 issue on poplib after we finish with stls... Thank you very much for reviewing! ---------- Added file: http://bugs.python.org/file28085/poplib_03_starttls_v5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 12:41:13 2012 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Fri, 23 Nov 2012 11:41:13 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1353670873.8.0.034647217572.issue4473@psf.upfronthosting.co.za> Changes by Lorenzo M. Catucci : Removed file: http://bugs.python.org/file28026/poplib_03_starttls_v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 13:38:16 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 12:38:16 +0000 Subject: [issue16491] try-except-raise-bug In-Reply-To: <9C3C06E7F0934B209166A3DC454F8D19@HansPc> Message-ID: <1353674296.8.0.791156459168.issue16491@psf.upfronthosting.co.za> Ezio Melotti added the comment: Can you paste the traceback you get with IDLE and also try the same from the command line? ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 14:09:19 2012 From: report at bugs.python.org (Daniel Urban) Date: Fri, 23 Nov 2012 13:09:19 +0000 Subject: [issue16538] The docs doesn't describe MAKE_CLOSURE correctly Message-ID: <1353676159.67.0.844924036734.issue16538@psf.upfronthosting.co.za> New submission from Daniel Urban: The documentation of the dis module describes the MAKE_CLOSURE opcode incorrectly. The description of MAKE_FUNCTION was updated in 242d3f8e8c50 (issue14349) to include the qualified name, but MAKE_CLOSURE wan't. A patch is attched. ---------- assignee: docs at python components: Documentation files: make_closure.patch keywords: needs review, patch messages: 176166 nosy: daniel.urban, docs at python priority: normal severity: normal stage: patch review status: open title: The docs doesn't describe MAKE_CLOSURE correctly versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28086/make_closure.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 14:29:59 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 23 Nov 2012 13:29:59 +0000 Subject: [issue16538] The docs doesn't describe MAKE_CLOSURE correctly In-Reply-To: <1353676159.67.0.844924036734.issue16538@psf.upfronthosting.co.za> Message-ID: <3Y7JKf2brHzQNb@mail.python.org> Roundup Robot added the comment: New changeset 5d1e7912e23e by Andrew Svetlov in branch '3.3': Issue #16538: correctly describe MAKE_CLOSURE in docs. http://hg.python.org/cpython/rev/5d1e7912e23e New changeset 8fff40a7c5b5 by Andrew Svetlov in branch 'default': Merge issue #16538: correctly describe MAKE_CLOSURE in docs. http://hg.python.org/cpython/rev/8fff40a7c5b5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 14:30:36 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 23 Nov 2012 13:30:36 +0000 Subject: [issue16538] The docs doesn't describe MAKE_CLOSURE correctly In-Reply-To: <1353676159.67.0.844924036734.issue16538@psf.upfronthosting.co.za> Message-ID: <1353677436.43.0.62883683236.issue16538@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- nosy: +asvetlov resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 14:43:15 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Nov 2012 13:43:15 +0000 Subject: [issue16534] test_float failure on IA64 (HPUX) In-Reply-To: <1353623026.18.0.63278964149.issue16534@psf.upfronthosting.co.za> Message-ID: <1353678195.86.0.859565731995.issue16534@psf.upfronthosting.co.za> Mark Dickinson added the comment: I wonder whether adding "-fpeval=float" to the CFLAGS would fix this. There's a lot of information at http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=0008a22194f02110a22194f02110275d6e10RCRD but I don't know whether it's relevant to this machine. Trent? ---------- nosy: +trent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 14:53:28 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 23 Nov 2012 13:53:28 +0000 Subject: [issue16539] Turn off 'No handlers could be found for logger' message Message-ID: <1353678808.84.0.584809464228.issue16539@psf.upfronthosting.co.za> New submission from anatoly techtonik: It is very annoying. Take this as an example. 'patch' is a module (library) that is meant to be used from other programs. Therefore it can not (should not) setup handlers for itself. >>> import patch >>> patch.PatchSet().parse('7745') No handlers could be found for logger "patch" Is it the same for Python 3? ---------- components: Library (Lib) messages: 176170 nosy: techtonik, vinay.sajip priority: normal severity: normal status: open title: Turn off 'No handlers could be found for logger' message versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 15:14:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 14:14:10 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <1353680050.54.0.994031471896.issue16511@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 15:23:09 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 23 Nov 2012 14:23:09 +0000 Subject: [issue16539] Turn off 'No handlers could be found for logger' message In-Reply-To: <1353678808.84.0.584809464228.issue16539@psf.upfronthosting.co.za> Message-ID: <1353680589.58.0.821455534093.issue16539@psf.upfronthosting.co.za> anatoly techtonik added the comment: Forgot to mention that bundled NullHandler doesn't work in Python 2.7 and from what I can see it is not covered with tests for this version. Traceback (most recent call last): File "", line 1, in File "patch.py", line 124, in fromstring return PatchSet( StringIO(s) ) File "patch.py", line 196, in __init__ self.parse(stream) File "patch.py", line 512, in parse warning("error: no patch data found!") File "C:\Python27\lib\logging\__init__.py", line 1152, in warning self._log(WARNING, msg, args, **kwargs) File "C:\Python27\lib\logging\__init__.py", line 1258, in _log self.handle(record) File "C:\Python27\lib\logging\__init__.py", line 1268, in handle self.callHandlers(record) File "C:\Python27\lib\logging\__init__.py", line 1307, in callHandlers if record.levelno >= hdlr.level: AttributeError: type object 'NullHandler' has no attribute 'level' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 15:25:22 2012 From: report at bugs.python.org (Meador Inge) Date: Fri, 23 Nov 2012 14:25:22 +0000 Subject: [issue2454] sha and md5 fixer In-Reply-To: <1206147643.89.0.60936055638.issue2454@psf.upfronthosting.co.za> Message-ID: <1353680722.19.0.482075260359.issue2454@psf.upfronthosting.co.za> Meador Inge added the comment: > I'm not sure how much this is needed considering hashlib has been around, since 2.5. > I hope people aren't having to port from before then. Martin alluded to that when he opened the issue saying this wasn't necessary, but a nice to have. However, it has been over four years since the issue was opened. Maybe it should just be closed. I don't really have an opinion either way. Martin, are you still interested in this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 15:29:12 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 23 Nov 2012 14:29:12 +0000 Subject: [issue16539] Turn off 'No handlers could be found for logger' message In-Reply-To: <1353678808.84.0.584809464228.issue16539@psf.upfronthosting.co.za> Message-ID: <1353680952.95.0.983043166565.issue16539@psf.upfronthosting.co.za> anatoly techtonik added the comment: Nevermind the last message - I was specifying NullHandler as a class, not as an instance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 15:36:16 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 23 Nov 2012 14:36:16 +0000 Subject: [issue14273] distutils2: logging handler not properly initialized In-Reply-To: <1331592978.94.0.127505196077.issue14273@psf.upfronthosting.co.za> Message-ID: <1353681376.34.0.543806318137.issue14273@psf.upfronthosting.co.za> anatoly techtonik added the comment: More specifically, you need to copy NullHandler code if you want to run it with Python 2.x < 2.7 ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 16:02:54 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 15:02:54 +0000 Subject: [issue16306] Multiple error line for unknown command line parameter In-Reply-To: <1351036031.44.0.0447945169816.issue16306@psf.upfronthosting.co.za> Message-ID: <1353682974.01.0.468329961099.issue16306@psf.upfronthosting.co.za> Ezio Melotti added the comment: The new patch doesn't seem to be correct: without the patch: $ ./python -a -z Unknown option: -a Unknown option: -z usage: ./python [option] ... [-c cmd | -m mod | file | -] [arg] ... with the patch: $ ./python -a -z Unknown option: -a usage: ./python [option] ... [-c cmd | -m mod | file | -] [arg] ... A test case for this should also be added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 16:28:48 2012 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 23 Nov 2012 15:28:48 +0000 Subject: [issue16539] Turn off 'No handlers could be found for logger' message In-Reply-To: <1353678808.84.0.584809464228.issue16539@psf.upfronthosting.co.za> Message-ID: <1353684528.95.0.709318766524.issue16539@psf.upfronthosting.co.za> Vinay Sajip added the comment: This is not a valid issue. The approach to use is documented: http://docs.python.org/2.6/library/logging.html#configuring-logging-for-a-library http://docs.python.org/2.7/howto/logging.html#configuring-logging-for-a-library ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 16:50:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 15:50:40 +0000 Subject: [issue16306] Multiple error line for unknown command line parameter In-Reply-To: <1351036031.44.0.0447945169816.issue16306@psf.upfronthosting.co.za> Message-ID: <1353685840.11.0.40223931391.issue16306@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks, Ezio, for point. > without the patch: > $ ./python -a -z > Unknown option: -a > Unknown option: -z > usage: ./python [option] ... [-c cmd | -m mod | file | -] [arg] ... This behavior isn't correct. Try also "-E -a -z" and "-a -E -z" (also with 3.3.0). However I?found an error in the test in my patch (actually previous test for 2.7 was correct, but not full). Patch updated, new tests added. ---------- Added file: http://bugs.python.org/file28087/test_unknown_option_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 16:51:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 15:51:29 +0000 Subject: [issue16306] Multiple error line for unknown command line parameter In-Reply-To: <1351036031.44.0.0447945169816.issue16306@psf.upfronthosting.co.za> Message-ID: <1353685889.21.0.287997366454.issue16306@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28088/test_unknown_option_2-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 16:56:24 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 15:56:24 +0000 Subject: [issue16306] Multiple error line for unknown command line parameter In-Reply-To: <1351036031.44.0.0447945169816.issue16306@psf.upfronthosting.co.za> Message-ID: <1353686184.6.0.922952762525.issue16306@psf.upfronthosting.co.za> Ezio Melotti added the comment: > This behavior isn't correct. Shouldn't python report all the invalid flags passed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 16:59:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 15:59:01 +0000 Subject: [issue16306] Multiple error line for unknown command line parameter In-Reply-To: <1351036031.44.0.0447945169816.issue16306@psf.upfronthosting.co.za> Message-ID: <1353686341.11.0.0881759730515.issue16306@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Should not. It happened unintentionally (and inconsistently). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 17:02:38 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 23 Nov 2012 16:02:38 +0000 Subject: [issue16529] Compiler error when trying to compile ceval.c on OpenSUSE 11.3 In-Reply-To: <1353574185.01.0.323738312876.issue16529@psf.upfronthosting.co.za> Message-ID: <1353686558.68.0.525787985898.issue16529@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Could you possibly locate the problematic changeset? Could be doable by bisection. ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 17:10:12 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 23 Nov 2012 16:10:12 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1239838657.22.0.326859227165.issue5765@psf.upfronthosting.co.za> Message-ID: <1353687012.7.0.332848479357.issue5765@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 17:24:33 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 23 Nov 2012 16:24:33 +0000 Subject: [issue16529] Compiler error when trying to compile ceval.c on OpenSUSE 11.3 In-Reply-To: <1353686558.68.0.525787985898.issue16529@psf.upfronthosting.co.za> Message-ID: <50AFA339.2050508@egenix.com> Marc-Andre Lemburg added the comment: On 23.11.2012 17:02, Jes?s Cea Avi?n wrote: > > Could you possibly locate the problematic changeset? Could be doable by bisection. I'll try to find the changeset. There were only 4 checkins related to ceval.c since the 3.3.0 release, so one of those will have to have triggered the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 17:48:23 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 23 Nov 2012 16:48:23 +0000 Subject: [issue16529] Compiler error when trying to compile ceval.c on OpenSUSE 11.3 In-Reply-To: <50AFA339.2050508@egenix.com> Message-ID: <50AFA8D0.9000306@egenix.com> Marc-Andre Lemburg added the comment: On 23.11.2012 17:24, M.-A. Lemburg wrote: > On 23.11.2012 17:02, Jes?s Cea Avi?n wrote: >> >> Could you possibly locate the problematic changeset? Could be doable by bisection. > > I'll try to find the changeset. There were only 4 checkins > related to ceval.c since the 3.3.0 release, so one of those > will have to have triggered the problem. This changeset triggered the problem: changeset: 79693:ac30a1b1cf17 user: Benjamin Peterson date: Fri Oct 12 11:34:51 2012 -0400 summary: ceval cleanup It's fairly large (http://hg.python.org/cpython/rev/ac30a1b1cf17), so I can't easily tell which part might be worth looking at more closely. I do notice that the logic for error handling was changed from doing a "break" to doing a "goto error". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 17:51:40 2012 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 23 Nov 2012 16:51:40 +0000 Subject: [issue16540] Make itertools count, cycle, and repeat objects subscriptable like range. Message-ID: <1353689500.44.0.874231567129.issue16540@psf.upfronthosting.co.za> New submission from Neil Girdhar: When using sequence types polymorphically, range, list, and tuple are both iterable and subscriptable. Unfortunately, itertools.count, cycle, and repeat objects are not subscriptable, although this is not a hard change. Please consider making these objects subscriptable for polymorphic usage. ---------- components: Library (Lib) messages: 176183 nosy: Neil.Girdhar priority: normal severity: normal status: open title: Make itertools count, cycle, and repeat objects subscriptable like range. type: enhancement versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 17:55:51 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 16:55:51 +0000 Subject: [issue16540] Make itertools count, cycle, and repeat objects subscriptable like range. In-Reply-To: <1353689500.44.0.874231567129.issue16540@psf.upfronthosting.co.za> Message-ID: <1353689751.8.0.294627690833.issue16540@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +rhettinger stage: -> needs patch versions: -Python 3.1, Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:01:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 17:01:23 +0000 Subject: [issue16540] Make itertools count, cycle, and repeat objects subscriptable like range. In-Reply-To: <1353689500.44.0.874231567129.issue16540@psf.upfronthosting.co.za> Message-ID: <1353690083.35.0.702669862397.issue16540@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Range, list, and tuple are iterables, but itertools.count, cycle, and repeat objects are iterators. Subscripting is not a part of iterator protocol. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:01:56 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 23 Nov 2012 17:01:56 +0000 Subject: [issue16306] Multiple error line for unknown command line parameter In-Reply-To: <1351036031.44.0.0447945169816.issue16306@psf.upfronthosting.co.za> Message-ID: <3Y7P2C22VQzRCr@mail.python.org> Roundup Robot added the comment: New changeset 6a79e3beb854 by Ezio Melotti in branch '2.7': #16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/6a79e3beb854 New changeset 654a628f5f00 by Ezio Melotti in branch '3.2': #16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/654a628f5f00 New changeset 421a8a5ffbb2 by Ezio Melotti in branch '3.3': #16306: merge with 3.2. http://hg.python.org/cpython/rev/421a8a5ffbb2 New changeset 51caa0820fad by Ezio Melotti in branch 'default': #16306: merge with 3.3. http://hg.python.org/cpython/rev/51caa0820fad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:11:22 2012 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 23 Nov 2012 17:11:22 +0000 Subject: [issue16540] Make itertools count, cycle, and repeat objects subscriptable like range. In-Reply-To: <1353689500.44.0.874231567129.issue16540@psf.upfronthosting.co.za> Message-ID: <1353690682.8.0.126266578383.issue16540@psf.upfronthosting.co.za> Neil Girdhar added the comment: Apologies if this is a bad question, but why do count, cycle, and repeat return iterators rather than iterables? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:12:47 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 23 Nov 2012 17:12:47 +0000 Subject: [issue16474] More code coverage for imp module In-Reply-To: <1352938470.43.0.179582544246.issue16474@psf.upfronthosting.co.za> Message-ID: <1353690767.8.0.512675019809.issue16474@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:13:20 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Nov 2012 17:13:20 +0000 Subject: =?utf-8?q?=5Bissue16537=5D_Python=E2=80=99s_setup=2Epy_raises_a_ValueErro?= =?utf-8?q?r_when_self=2Eextensions_is_empty?= In-Reply-To: <1353633257.31.0.391670680901.issue16537@psf.upfronthosting.co.za> Message-ID: <1353690800.74.0.810751240418.issue16537@psf.upfronthosting.co.za> ?ric Araujo added the comment: LGTM. ---------- nosy: +eric.araujo title: setup.py throws a ValueError when self.extensions is empty -> Python?s setup.py raises a ValueError when self.extensions is empty _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:14:24 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Nov 2012 17:14:24 +0000 Subject: [issue16526] Python does not cross compile properly In-Reply-To: <1353535083.98.0.533437922947.issue16526@psf.upfronthosting.co.za> Message-ID: <1353690864.62.0.851754360677.issue16526@psf.upfronthosting.co.za> ?ric Araujo added the comment: See also: http://bugs.python.org/issue3754 cross-compilation support for python build http://bugs.python.org/issue1006238 cross compile patch http://bugs.python.org/issue1597850 Cross compiling patches for MINGW (superseder of http://bugs.python.org/issue1339673, cross compile and mingw support) http://bugs.python.org/issue3871 cross and native build of python for mingw32 with distutils http://bugs.python.org/issue3718 environment variable MACHDEP and python build system http://bugs.python.org/issue10782 Not possible to cross-compile due to poor detection of %lld support in printf ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:15:28 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Nov 2012 17:15:28 +0000 Subject: [issue16519] site.venv() should use abspath(executable) In-Reply-To: <1353484734.27.0.00447607755708.issue16519@psf.upfronthosting.co.za> Message-ID: <1353690928.6.0.507064447453.issue16519@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo, vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:15:58 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 23 Nov 2012 17:15:58 +0000 Subject: [issue16477] tarfile fails to close file handles in case of exception In-Reply-To: <1352983787.27.0.404679122442.issue16477@psf.upfronthosting.co.za> Message-ID: <1353690958.34.0.430991385768.issue16477@psf.upfronthosting.co.za> Andrew Svetlov added the comment: LGTM ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:16:44 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 17:16:44 +0000 Subject: [issue16508] include the "object" type in the lists of documented types In-Reply-To: <1353284081.12.0.684350303879.issue16508@psf.upfronthosting.co.za> Message-ID: <1353691003.99.0.0219439935343.issue16508@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:18:16 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 17:18:16 +0000 Subject: [issue16509] sqlite3 docs do not explain check_same_thread In-Reply-To: <1353310851.97.0.745365364193.issue16509@psf.upfronthosting.co.za> Message-ID: <1353691096.27.0.508585215308.issue16509@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ghaering stage: -> needs patch versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:19:13 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 17:19:13 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <1353691153.93.0.584435655216.issue16518@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:20:01 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Nov 2012 17:20:01 +0000 Subject: [issue16540] Make itertools count, cycle, and repeat objects subscriptable like range. In-Reply-To: <1353689500.44.0.874231567129.issue16540@psf.upfronthosting.co.za> Message-ID: <1353691201.95.0.833024789338.issue16540@psf.upfronthosting.co.za> ?ric Araujo added the comment: The point of itertools is to implement building blocks for iterators, which are memory-efficient and can sometimes be infinite, contrary to sequences. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:20:03 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 23 Nov 2012 17:20:03 +0000 Subject: [issue16539] Turn off 'No handlers could be found for logger' message In-Reply-To: <1353678808.84.0.584809464228.issue16539@psf.upfronthosting.co.za> Message-ID: <1353691203.11.0.551894592824.issue16539@psf.upfronthosting.co.za> anatoly techtonik added the comment: I'd say this is a pretty valid issue with "won't fix" or "workaround available" resolution. The question - is the same behavior preserved for Python 3? ---------- resolution: invalid -> wont fix status: closed -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:20:35 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 23 Nov 2012 17:20:35 +0000 Subject: [issue16488] Add context manager support to epoll object In-Reply-To: <1353078849.09.0.752588026545.issue16488@psf.upfronthosting.co.za> Message-ID: <1353691235.8.0.195414443013.issue16488@psf.upfronthosting.co.za> Andrew Svetlov added the comment: +0 for patch ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:24:51 2012 From: report at bugs.python.org (Helmut Jarausch) Date: Fri, 23 Nov 2012 17:24:51 +0000 Subject: [issue16541] tk_setPalette doesn't accept keyword parameters Message-ID: <1353691491.46.0.777146427691.issue16541@psf.upfronthosting.co.za> New submission from Helmut Jarausch: import tkinter as Tk root= Tk.Tk() root.tk_setPalette(background = 'AntiqueWhite1', foreground = 'blue') but python-3.3:0+ (3.3:27cb1a3d57c8+) gives Traceback (most recent call last): File "Matr_Select.py", line 174, in root.tk_setPalette(background = 'AntiqueWhite1', foreground = 'blue') File "/usr/lib64/python3.3/tkinter/__init__.py", line 390, in tk_setPalette + _flatten(args) + _flatten(kw.items())) TypeError: argument must be sequence Thanks for looking into it, Helmut. ---------- components: Tkinter messages: 176193 nosy: HJarausch priority: normal severity: normal status: open title: tk_setPalette doesn't accept keyword parameters type: compile error versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:38:36 2012 From: report at bugs.python.org (joko suwito) Date: Fri, 23 Nov 2012 17:38:36 +0000 Subject: [issue16542] http//bugs.python/joko.suwito Message-ID: New submission from joko suwito: thank you ---------- messages: 176194 nosy: joko.suwito priority: normal severity: normal status: open title: http//bugs.python/joko.suwito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:41:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 17:41:22 +0000 Subject: [issue16541] tk_setPalette doesn't accept keyword parameters In-Reply-To: <1353691491.46.0.777146427691.issue16541@psf.upfronthosting.co.za> Message-ID: <1353692482.77.0.834679855219.issue16541@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are two ways to fix this issue: 1. Fix tk_setPalette() (just wrap kw.items() with list() or tuple()). 2. Fix C?implementation of _flatten() for work with any iterators. ---------- nosy: +gpolo, serhiy.storchaka stage: -> needs patch type: compile error -> behavior versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:41:39 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 17:41:39 +0000 Subject: [issue16523] attrgetter and itemgetter signatures in docs need cleanup In-Reply-To: <1353510966.46.0.566270540705.issue16523@psf.upfronthosting.co.za> Message-ID: <1353692499.34.0.97757775681.issue16523@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +patch nosy: +chris.jerdonek stage: needs patch -> patch review versions: +Python 3.2 Added file: http://bugs.python.org/file28089/issue16523.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:42:45 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 17:42:45 +0000 Subject: [issue16542] http//bugs.python/joko.suwito In-Reply-To: Message-ID: <1353692565.43.0.689826887681.issue16542@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:45:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 17:45:49 +0000 Subject: [issue16540] Make itertools count, cycle, and repeat objects subscriptable like range. In-Reply-To: <1353689500.44.0.874231567129.issue16540@psf.upfronthosting.co.za> Message-ID: <1353692749.76.0.95866350796.issue16540@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Apologies if this is a bad question, but why do count, cycle, and repeat return iterators rather than iterables? Actually they are iterables too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:47:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 23 Nov 2012 17:47:02 +0000 Subject: [issue16530] documentation of os.wait3 In-Reply-To: <1353601738.51.0.504098475316.issue16530@psf.upfronthosting.co.za> Message-ID: <3Y7Q2F5yYwzRHt@mail.python.org> Roundup Robot added the comment: New changeset a2038edb51cd by Ezio Melotti in branch '2.7': #16530: the "options" arg of os.wait3 is required. http://hg.python.org/cpython/rev/a2038edb51cd New changeset 1cf1194a443e by Ezio Melotti in branch '3.2': #16530: the "options" arg of os.wait3 is required. http://hg.python.org/cpython/rev/1cf1194a443e New changeset 7359ade2ab0b by Ezio Melotti in branch '3.3': #16530: merge with 3.2. http://hg.python.org/cpython/rev/7359ade2ab0b New changeset a728056347ec by Ezio Melotti in branch 'default': #16530: merge with 3.3. http://hg.python.org/cpython/rev/a728056347ec ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:47:33 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 17:47:33 +0000 Subject: [issue16530] documentation of os.wait3 In-Reply-To: <1353601738.51.0.504098475316.issue16530@psf.upfronthosting.co.za> Message-ID: <1353692852.99.0.747123580555.issue16530@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:49:00 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 17:49:00 +0000 Subject: [issue16531] Allow IPNetwork to take a tuple In-Reply-To: <1353621566.3.0.0992835206333.issue16531@psf.upfronthosting.co.za> Message-ID: <1353692940.14.0.947687245902.issue16531@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:54:13 2012 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 23 Nov 2012 17:54:13 +0000 Subject: [issue16541] tk_setPalette doesn't accept keyword parameters In-Reply-To: <1353691491.46.0.777146427691.issue16541@psf.upfronthosting.co.za> Message-ID: <1353693253.83.0.199459481971.issue16541@psf.upfronthosting.co.za> Guilherme Polo added the comment: If doing list(kw.items()) works, I'm fine with that. If it does not, then ttk._format_optdict(kw) should. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:55:40 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 23 Nov 2012 17:55:40 +0000 Subject: [issue16539] Turn off 'No handlers could be found for logger' message In-Reply-To: <1353678808.84.0.584809464228.issue16539@psf.upfronthosting.co.za> Message-ID: <1353693340.07.0.901446696442.issue16539@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Python 3 has exactly the same documentation: http://docs.python.org/3.3/howto/logging.html#configuring-logging-for-a-library ---------- nosy: +amaury.forgeotdarc resolution: wont fix -> works for me status: languishing -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 18:58:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 23 Nov 2012 17:58:20 +0000 Subject: [issue16523] attrgetter and itemgetter signatures in docs need cleanup In-Reply-To: <1353510966.46.0.566270540705.issue16523@psf.upfronthosting.co.za> Message-ID: <1353693500.81.0.114462951814.issue16523@psf.upfronthosting.co.za> Chris Jerdonek added the comment: +.. function:: attrgetter(attr[, attr2, attr3, ...]) Why not reword to use the *attr notation? It is even already being used below: + The function is equivalent to:: def attrgetter(*items): if any(not isinstance(item, str) for item in items): ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:03:13 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 18:03:13 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple Message-ID: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> New submission from Ezio Melotti: This came up in #16515. While using PyArg_UnpackTuple to parse the positional arguments in a function that receives both positional and keyword arguments, the error message returned when the number of arguments is incorrect is misleading, e.g.: >>> max(foo=1) TypeError: max expected 1 arguments, got 0 This can be fixed by adding "positional" before "arguments" in the error message. The attached patch fixes this and the pluralization of "argument(s)". ---------- assignee: ezio.melotti components: Interpreter Core files: unpacktuple.diff keywords: patch messages: 176202 nosy: ezio.melotti priority: normal severity: normal stage: test needed status: open title: Use "positional arguments" in PyArg_UnpackTuple type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28090/unpacktuple.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:05:01 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 18:05:01 +0000 Subject: [issue16523] attrgetter and itemgetter signatures in docs need cleanup In-Reply-To: <1353510966.46.0.566270540705.issue16523@psf.upfronthosting.co.za> Message-ID: <1353693901.62.0.0385224325456.issue16523@psf.upfronthosting.co.za> Ezio Melotti added the comment: I thought about that, but wanted to make a distinction between the form that accepts only 1 arg and returns an item and the form that receives 2+ args and returns a tuple. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:07:53 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 18:07:53 +0000 Subject: [issue16515] TypeError message incorrect for max() with one keyword arg In-Reply-To: <1353451017.11.0.598123114389.issue16515@psf.upfronthosting.co.za> Message-ID: <1353694073.94.0.996072213911.issue16515@psf.upfronthosting.co.za> Ezio Melotti added the comment: I created #16543 for PyArg_UnpackTuple. Once that is fixed we can continue with this. ---------- dependencies: +Use "positional arguments" in PyArg_UnpackTuple _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:15:37 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Nov 2012 18:15:37 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353694537.59.0.933223963129.issue16543@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:20:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 18:20:24 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353694824.93.0.265395841195.issue16543@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > + (min == 1 ? "" : "s"), l); In second part of patch should be "max". Reformat the code so that `min` and `(min == 1 ? "" : "s")` will be in one line and it will be more clear. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:27:48 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 23 Nov 2012 18:27:48 +0000 Subject: [issue16523] attrgetter and itemgetter signatures in docs need cleanup In-Reply-To: <1353510966.46.0.566270540705.issue16523@psf.upfronthosting.co.za> Message-ID: <1353695267.99.0.915531096709.issue16523@psf.upfronthosting.co.za> Chris Jerdonek added the comment: You can also make that distinction using *. For example: .. function:: attrgetter(attr, *attrs) or .. function:: attrgetter(attr) attrgetter(attr1, attr2, *attrs) (cf. http://docs.python.org/dev/library/functions.html#max ) Elsewhere we started to prefer using two signature lines where two or more "behaviors" are possible, which might be good to do in any case. With the "..." notation, this would look like: .. function:: attrgetter(attr) attrgetter(attr1, attr2, ...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:29:40 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Nov 2012 18:29:40 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353695380.36.0.296580213739.issue16543@psf.upfronthosting.co.za> Mark Dickinson added the comment: Now that I look at uses of PyArg_UnpackTuple, I'm wondering whether this needs to be fixed at all. Apart from `max` and `min`, do you know of any other cases where this gives a misleading error message? Almost all the uses I can find are for simple functions/methods where all arguments are positional-only. (Ex: range, pow, slice, dict.pop). max and min *do* clearly need an error message fix. (Apologies: I know it was me who suggested that PyArg_UnpackTuple needed fixing in the first place. But now I'm not sure that's true.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:30:14 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Nov 2012 18:30:14 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353695414.19.0.575878943605.issue16543@psf.upfronthosting.co.za> Mark Dickinson added the comment: Of course, the 'arguments' -> 'argument' fix would still be nice to have. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:36:06 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 18:36:06 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353695766.23.0.0206793377869.issue16543@psf.upfronthosting.co.za> Ezio Melotti added the comment: > do you know of any other cases where this gives a misleading error message? Actually my concern was about cases where the new error might be wrong/misleading, but I haven't checked yet. If there are no such cases I think we should fix it; the error message will be better in the few cases we have in the stdlib and for all the external libs that are using the function. Another thing that I haven't checked is if there are similar functions (e.g. to parse kwargs) that needs the same treatment (#16520 might be one such example). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:37:51 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Nov 2012 18:37:51 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353695871.21.0.699498677591.issue16543@psf.upfronthosting.co.za> Mark Dickinson added the comment: One more thing: I'm not sure this is the right terminology. Here we're using 'positional' to refer to parameters that PEP 362 calls "POSITIONAL_ONLY", whereas the regular TypeErrors (e.g. produced for user-defined functions) use 'positional' to mean what PEP 362 calls "POSITIONAL_OR_KEYWORD". This seems like it'll only increase the current confusion between different parameter types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:38:38 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 23 Nov 2012 18:38:38 +0000 Subject: [issue16528] 3.2 docs not updating on docs.python.org In-Reply-To: <1353551409.71.0.725216455531.issue16528@psf.upfronthosting.co.za> Message-ID: <3Y7R9n1Wc4zRMj@mail.python.org> Roundup Robot added the comment: New changeset 31bb42754962 by Chris Jerdonek in branch 'default': Clarify that only the latest maintenance branches are rebuilt (issue #16528). http://hg.python.org/devguide/rev/31bb42754962 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:40:23 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 23 Nov 2012 18:40:23 +0000 Subject: [issue16528] 3.2 docs not updating on docs.python.org In-Reply-To: <1353551409.71.0.725216455531.issue16528@psf.upfronthosting.co.za> Message-ID: <1353696023.62.0.307185355067.issue16528@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- keywords: +easy resolution: invalid -> fixed type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:44:47 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Nov 2012 18:44:47 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353696287.16.0.252679114999.issue16543@psf.upfronthosting.co.za> Mark Dickinson added the comment: > If there are no such cases I think we should fix it. Okay, but what exactly is this fixing? I can't find any examples apart from max and min where the new error messages seem any better than the old. Your first message talks about "a function that receives both positional and keyword arguments", by which I guess you mean 'both required and optional arguments'; in any case, I can't find any such function (apart from max and min) that uses PyArg_ParseTuple. So it seems to me that there's not actually any problem to be solved. (And I think max and min probably need to be reworked to not use PyArg_ParseTuple at all.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:47:59 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 18:47:59 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353696479.35.0.845005336868.issue16543@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Okay, but what exactly is this fixing? If the function parses positional args, it should say so in the error message. If the function is never used (except for min/max) or if the error is never reported, then we have a different problem. Even if this code is not used I don't think we can remove it, since this it's a public function, and even if we are not using it someone might be using it and benefit from the improved error message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 19:50:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 23 Nov 2012 18:50:27 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353696627.66.0.104118296368.issue16543@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:03:33 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 23 Nov 2012 19:03:33 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1353697413.46.0.939808160219.issue4473@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you Lorenzo. Your patch lacks a couple of details, such as "versionadded" and "versionchanged" tags, but I can handle this myself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:14:32 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 19:14:32 +0000 Subject: [issue16306] Multiple error line for unknown command line parameter In-Reply-To: <1351036031.44.0.0447945169816.issue16306@psf.upfronthosting.co.za> Message-ID: <1353698072.38.0.781400907559.issue16306@psf.upfronthosting.co.za> Ezio Melotti added the comment: Buildbots are happy, closing. Thanks Serhiy for the patches! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:15:06 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 23 Nov 2012 19:15:06 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <3Y7Rzs71NLzNGF@mail.python.org> Roundup Robot added the comment: New changeset 79e33578dc05 by Antoine Pitrou in branch 'default': Issue #4473: Ensure the socket is shutdown cleanly in POP3.close(). http://hg.python.org/cpython/rev/79e33578dc05 New changeset d30fd9834cec by Antoine Pitrou in branch 'default': Issue #4473: Add a POP3.capa() method to query the capabilities advertised by the POP3 server. http://hg.python.org/cpython/rev/d30fd9834cec New changeset 2329f9198d7f by Antoine Pitrou in branch 'default': Issue #4473: Add a POP3.stls() to switch a clear-text POP3 session into an encrypted POP3 session, on supported servers. http://hg.python.org/cpython/rev/2329f9198d7f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:19:19 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 23 Nov 2012 19:19:19 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1353698359.27.0.861392114621.issue4473@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patches committed. Thank you very much! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:20:32 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 23 Nov 2012 19:20:32 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353698432.53.0.448566470189.issue16543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Here we're using 'positional' to refer to parameters that PEP 362 calls "POSITIONAL_ONLY", whereas the regular TypeErrors (e.g. produced for user-defined functions) use 'positional' to mean what PEP 362 calls "POSITIONAL_OR_KEYWORD". Here the error message is about "positional arguments," which are different from parameters. (As you know, issue 15990 is to document this distinction in the glossary.) Incidentally, it looks like the documentation for several of the functions in this part of the C API should probably be updated in this regard, for example: http://docs.python.org/dev/c-api/arg.html#PyArg_UnpackTuple http://docs.python.org/dev/c-api/arg.html#PyArg_ParseTuple The PyArg_UnpackTuple documentation says, for example: "A simpler form of parameter retrieval which does not use a format string to specify the types of the arguments. Functions which use this method to retrieve their parameters..." The two occurrences of "parameter" here should be changed to "argument." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:22:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 23 Nov 2012 19:22:49 +0000 Subject: [issue16519] site.venv() should use abspath(executable) In-Reply-To: <1353484734.27.0.00447607755708.issue16519@psf.upfronthosting.co.za> Message-ID: <3Y7S8m6TrGzPyg@mail.python.org> Roundup Robot added the comment: New changeset fe2200c1c2d3 by Vinay Sajip in branch '3.3': Issue #16519: Used os.path.abspath, removed unnecessary code for executable_name. http://hg.python.org/cpython/rev/fe2200c1c2d3 New changeset a874c4a6ad5f by Vinay Sajip in branch 'default': Closes #16519: Merged fix from 3.3. http://hg.python.org/cpython/rev/a874c4a6ad5f ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:23:50 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 23 Nov 2012 19:23:50 +0000 Subject: [issue16532] AMD64 Windows 7 build failures In-Reply-To: <1353622284.34.0.503862642537.issue16532@psf.upfronthosting.co.za> Message-ID: <1353698630.65.0.585667307054.issue16532@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ah, thank you! There is a test failure on 3.2, but it's probably unrelated. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:35:32 2012 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 23 Nov 2012 19:35:32 +0000 Subject: [issue16540] Make itertools count, cycle, and repeat objects subscriptable like range. In-Reply-To: <1353689500.44.0.874231567129.issue16540@psf.upfronthosting.co.za> Message-ID: <1353699332.8.0.0698193049337.issue16540@psf.upfronthosting.co.za> Neil Girdhar added the comment: My suggestion is then to update collection.abc to have an InfiniteSequence, which inherits from Iterable, and adds abstract methods __getitem__ and mixin methods __iter__. Then, itertools count, cycle, and repeat could implement collection.abc.InfiniteSequence, and collections.abc.Iterator (for backwards-compatibility). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:39:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 19:39:46 +0000 Subject: [issue16540] Make itertools count, cycle, and repeat objects subscriptable like range. In-Reply-To: <1353689500.44.0.874231567129.issue16540@psf.upfronthosting.co.za> Message-ID: <1353699586.34.0.12996387625.issue16540@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What kind of problem you want to solve? I'm sure there is a simple enough solution without changing itertools objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:44:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 23 Nov 2012 19:44:38 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353699878.24.0.63884372879.issue16543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > This can be fixed by adding "positional" before "arguments" in the error message. Do we know for sure that the values in the args argument in a call to PyArg_UnpackTuple always correspond to the positional arguments of a call to a Python function? Can PyArg_UnpackTuple be used in other ways? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:44:44 2012 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 23 Nov 2012 19:44:44 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1353699884.77.0.86014542768.issue16480@psf.upfronthosting.co.za> Vinay Sajip added the comment: IIUC, Debian Experimental is not a complete distribution. Are there other, non-experimental OS variants where posix_local is used with Python 3.x? On my Ubuntu Oneiric and Precise 64-bit machines, the default install scheme on the official Python 3.2 - as determined by sysconfig._get_default_scheme() - is "posix_prefix". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:45:01 2012 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 23 Nov 2012 19:45:01 +0000 Subject: [issue16540] Make itertools count, cycle, and repeat objects subscriptable like range. In-Reply-To: <1353689500.44.0.874231567129.issue16540@psf.upfronthosting.co.za> Message-ID: <1353699901.93.0.552914021908.issue16540@psf.upfronthosting.co.za> Neil Girdhar added the comment: My code looks like this: presignal_abd = [[], [0.1, 0.6], []] tarsignal_abd = [[], [0.4, 0.9], []] diagsignal_abd = [[], [0.1, 0.6, 0.7, 0.8], []] # etc. for (filename, observations, presignals, tarsignals, diagsignals, diagram_type) in zip(['events-deduction', 'events-abduction', 'events-accomodation', 'events-learning', 'events-learning-2'], [observations_ded, observations_abd, observations_tra, observations_tra1, observations_tra], [repeat_([]), presignal_abd, presignal_tra, repeat_([]), presignal_tra], [repeat_([]), tarsignal_abd, tarsignal_tra, repeat_([]), tarsignal_tra], [repeat_([]), diagsignal_abd, diagsignal_tra, repeat_([]), diagsignal_tra], [0, 1, 2, 3, 3]): second_set_of_events = presignals[1] I am using repeat_ objects (itertools.repeat objects) to fill as dummies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:53:42 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Nov 2012 19:53:42 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353700422.77.0.861058643985.issue16543@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Here the error message is about "positional arguments," which are > different from parameters. Okay. So is it also planned to change the existing error messages for user-defined functions? E.g.: >>> def f(a, b=1): ... pass ... >>> f() Traceback (most recent call last): File "", line 1, in TypeError: f() missing 1 required positional argument: 'a' If yes, then I think all these changes need to be coordinated, and that probably involves submitting a proposal to the mailing list. If no, then I think the change proposed in this issue is not an improvement, since it makes the error messages overall inconsistent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:54:11 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Nov 2012 19:54:11 +0000 Subject: [issue16491] IDLE and except: raise from In-Reply-To: <9C3C06E7F0934B209166A3DC454F8D19@HansPc> Message-ID: <1353700451.81.0.0981315783992.issue16491@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I marked this as 3.3+ bug because double reporting is new in 3.x and 'from None' is new in 3.3 (it causes a TypeError in the raise statement ;-). Command prompt output appears 'correct' (as intended). [I added blank lines before each try: for reading ease] Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)] on win32 >>> try: ... 1/0 ... except ZeroDivisionError as exp: ... raise TypeError('Divided by 0') ... Traceback (most recent call last): File "", line 2, in ZeroDivisionError: division by zero During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 4, in TypeError: Divided by 0 >>> try: ... 1/0 ... except ZeroDivisionError as exp: ... raise TypeError('Divided by 0') from exp ... Traceback (most recent call last): File "", line 2, in ZeroDivisionError: division by zero The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 4, in TypeError: Divided by 0 >>> try: ... 1/0 ... except ZeroDivisionError as exp: ... raise TypeError('Divided by 0') from None ... Traceback (most recent call last): File "", line 4, in TypeError: Divided by 0 --------------------------------------------------- In IDLE on Win 7 64, all three give Traceback (most recent call last): File "F:\Python\mypy\tem.py", line 4, in raise TypeError('Divided by 0') # except for change here TypeError: Divided by 0 We need to see non-Windows IDLE output to see if problem is limited to running with pythonw. Here is copy-paste code. try: 1/0 except ZeroDivisionError as exp: raise TypeError('Divided by 0') from None ---------- nosy: +serwy, terry.reedy stage: -> needs patch title: try-except-raise-bug -> IDLE and except: raise from versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 20:56:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 19:56:28 +0000 Subject: [issue16540] Make itertools count, cycle, and repeat objects subscriptable like range. In-Reply-To: <1353689500.44.0.874231567129.issue16540@psf.upfronthosting.co.za> Message-ID: <1353700588.01.0.210624816183.issue16540@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Why not use `dummy = [[]] *?3` as dummy? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:00:50 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 20:00:50 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353700850.4.0.031773847627.issue16543@psf.upfronthosting.co.za> Ezio Melotti added the comment: Maybe we should follow a more systematic approach and collect the different errors raised in the different situations, and then come up with error messages that are accurate and follow the terminology that we are adopting in #15990. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:00:53 2012 From: report at bugs.python.org (Piotr Dobrogost) Date: Fri, 23 Nov 2012 20:00:53 +0000 Subject: [issue8109] Server-side support for TLS Server Name Indication extension In-Reply-To: <1268234047.5.0.702223567094.issue8109@psf.upfronthosting.co.za> Message-ID: <1353700853.43.0.0166667946582.issue8109@psf.upfronthosting.co.za> Changes by Piotr Dobrogost : ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:02:57 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 23 Nov 2012 20:02:57 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353700977.31.0.225941082844.issue16543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > TypeError: f() missing 1 required positional argument: 'a' Yes, I think this should also be changed because passing "a" as a keyword argument is okay: >>> f(a=1) I would suggest something like-- TypeError: f() missing argument for parameter 'a' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:05:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 20:05:42 +0000 Subject: [issue16491] IDLE and except: raise from In-Reply-To: <9C3C06E7F0934B209166A3DC454F8D19@HansPc> Message-ID: <1353701142.01.0.718898109727.issue16491@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On Linux the result is the same. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:06:25 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 20:06:25 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353701185.0.0.584223737591.issue16543@psf.upfronthosting.co.za> Ezio Melotti added the comment: I would be fine with just dropping "positional" there, and say "required argument". With no further specification it means the "default" type of argument, i.e. positional or keyword. See also the end of msg170876. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:06:56 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 23 Nov 2012 20:06:56 +0000 Subject: [issue2454] sha and md5 fixer In-Reply-To: <1353680722.19.0.482075260359.issue2454@psf.upfronthosting.co.za> Message-ID: Gregory P. Smith added the comment: Any code conversion is useful. This will help with old libraries and is even good for just updating old 2.4 code to 2.7 best practices. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:08:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 20:08:21 +0000 Subject: [issue10712] 2to3 fixer for deprecated unittest method names In-Reply-To: <1292441796.9.0.018359428873.issue10712@psf.upfronthosting.co.za> Message-ID: <1353701301.04.0.438671176292.issue10712@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +gregory.p.smith versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:08:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 23 Nov 2012 20:08:38 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353701318.8.0.369869610213.issue16543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > TypeError: f() missing 1 required positional argument: 'a' By the way, changing this message is the subject of issue 16520 (which should probably be retitled). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:09:53 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Nov 2012 20:09:53 +0000 Subject: [issue16504] IDLE - fatal error when opening a file with certain tokenizing errors In-Reply-To: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za> Message-ID: <1353701393.36.0.389564187337.issue16504@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:11:17 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Nov 2012 20:11:17 +0000 Subject: [issue16508] include the "object" type in the lists of documented types In-Reply-To: <1353284081.12.0.684350303879.issue16508@psf.upfronthosting.co.za> Message-ID: <1353701477.42.0.359773592617.issue16508@psf.upfronthosting.co.za> Terry J. Reedy added the comment: good idea ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:11:23 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 20:11:23 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353701483.16.0.284424193837.issue16543@psf.upfronthosting.co.za> Ezio Melotti added the comment: #16520 could be assimilated by this issue, if we decide to widen its scope as I suggested in msg176229. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:12:00 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Nov 2012 20:12:00 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353701520.0.0.967123284498.issue16543@psf.upfronthosting.co.za> Mark Dickinson added the comment: +1 to msg176229 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:13:02 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Nov 2012 20:13:02 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1353701582.45.0.727843864372.issue16510@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:16:02 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Nov 2012 20:16:02 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <1353701762.08.0.395654564732.issue16518@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I would use the term that is currently used in some error messages. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:19:02 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Nov 2012 20:19:02 +0000 Subject: [issue16524] File access not always working with Python for Windows 32 bits on Windows 64 bits OS In-Reply-To: <1353514682.16.0.187525940709.issue16524@psf.upfronthosting.co.za> Message-ID: <1353701942.55.0.227668083013.issue16524@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:20:32 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 23 Nov 2012 20:20:32 +0000 Subject: [issue16544] Add external link to ast docs Message-ID: <1353702032.57.0.687396127567.issue16544@psf.upfronthosting.co.za> New submission from Andrew Svetlov: http://greentreesnakes.readthedocs.org/en/latest/index.html is excellent and comprehensive documentation for ast tree structures. It would be nice to incorporate that docs into stdlib documentation, but adding *see also* section is good enoigh as first step. ---------- assignee: docs at python components: Documentation keywords: easy messages: 176239 nosy: asvetlov, docs at python priority: normal severity: normal stage: needs patch status: open title: Add external link to ast docs versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:23:46 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 20:23:46 +0000 Subject: [issue16544] Add external link to ast docs In-Reply-To: <1353702032.57.0.687396127567.issue16544@psf.upfronthosting.co.za> Message-ID: <1353702226.77.0.0892332470896.issue16544@psf.upfronthosting.co.za> Ezio Melotti added the comment: I would suggest to contact the author and ask him if he wants to contribute those docs to Python. They could be then be merged to the current docs or included as a separate HOWTO. ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:23:57 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 23 Nov 2012 20:23:57 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353702237.19.0.269482456534.issue16543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I would keep any "global" discussion (for decision and coordination purposes) as part of a single meta-issue, but retain individual instances that need to be corrected as separate issues. I don't think we should try to fix them all as part of one patch or issue. I'm okay with the discussion happening here, or with opening a fresh issue that points to the various issues (including this one). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:26:14 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 23 Nov 2012 20:26:14 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <1353702374.09.0.930065244331.issue16518@psf.upfronthosting.co.za> Antoine Pitrou added the comment: "Buffer protocol" is the right term. "Buffer object" doesn't mean anything in Python 3 and, furthermore, it might be mixed up with the Python 2 `buffer` type. As for the error messages, they are generally very bad on this topic, so I would vote to change them :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:27:23 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 20:27:23 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353702443.43.0.864987651196.issue16543@psf.upfronthosting.co.za> Ezio Melotti added the comment: Using this as meta-issue is fine -- there are already enough issues :) The issues can probably be fixed in a single patch too, since it should just be a matter of changing the text of a few error messages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:28:29 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 23 Nov 2012 20:28:29 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <1353702509.07.0.885628848998.issue16518@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Do we have a recommended (and preferably briefer) way of saying, "any object that supports the buffer protocol"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:29:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 23 Nov 2012 20:29:03 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <1353702543.87.0.950105877324.issue16518@psf.upfronthosting.co.za> Chris Jerdonek added the comment: s/any// ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:29:53 2012 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 23 Nov 2012 20:29:53 +0000 Subject: [issue16540] Make itertools count, cycle, and repeat objects subscriptable like range. In-Reply-To: <1353689500.44.0.874231567129.issue16540@psf.upfronthosting.co.za> Message-ID: <1353702593.2.0.140031835265.issue16540@psf.upfronthosting.co.za> Neil Girdhar added the comment: Thanks, that works. One of the things I like about Python is that you can write what you mean. I figured that since I meant "repeat [] as many times as necessary", that I should write it that way. So, from an intuitive standpoint, I still feel that these itertools types intuitively implement InfiniteSequence. Although I recognize that some people might see them only in the narrower sense of Iterators. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:30:44 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 20:30:44 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <1353702644.92.0.989432698637.issue16518@psf.upfronthosting.co.za> Ezio Melotti added the comment: > "Buffer object" doesn't mean anything in Python 3 and, furthermore, > it might be mixed up with the Python 2 `buffer` type. Agreed. > As for the error messages, they are generally very bad on this topic, > so I would vote to change them :-) I would say that they are verbose maybe, but not necessary bad. Using "any object that supports the buffer protocol" without explicitly mentioning bytes (and bytearray) might end up being even more confusing (if that's what it's being proposed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:32:34 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 23 Nov 2012 20:32:34 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353702509.07.0.885628848998.issue16518@psf.upfronthosting.co.za> Message-ID: <1353702697.3343.2.camel@localhost.localdomain> Antoine Pitrou added the comment: > Do we have a recommended (and preferably briefer) way of saying, "any > object that supports the buffer protocol"? It depends where. There's no recommended way yet, but I would vote for "bytes-like object" in error messages that are targetted at the average developer. The docs (glossary?) could explain that "bytes-like object" is the same as "buffer-providing object" or "object implementing the buffer protocol". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:33:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Nov 2012 20:33:42 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <1353702822.62.0.0795732948105.issue16518@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I would vote for "bytes-like object" Sounds like a good compromise between brevity and clarity to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:36:54 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 23 Nov 2012 20:36:54 +0000 Subject: [issue16544] Add external link to ast docs In-Reply-To: <1353702032.57.0.687396127567.issue16544@psf.upfronthosting.co.za> Message-ID: <1353703014.15.0.936692211422.issue16544@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I've done it just now sending him message via bitbucket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:49:25 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 23 Nov 2012 20:49:25 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <1353703765.27.0.369159029402.issue16518@psf.upfronthosting.co.za> Stefan Krah added the comment: I wouldn't use "bytes-like object". One can certainly argue that *memoryview* should be bytes-like as a matter of preference, but the buffer protocol specifies strongly (or even statically) typed multi-dimensional arrays. PEP-3118 Py_buffer structs are essentially how NumPy works internally. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 21:58:44 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 23 Nov 2012 20:58:44 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353703765.27.0.369159029402.issue16518@psf.upfronthosting.co.za> Message-ID: <1353704267.3343.3.camel@localhost.localdomain> Antoine Pitrou added the comment: > I wouldn't use "bytes-like object". One can certainly argue that *memoryview* > should be bytes-like as a matter of preference, but the buffer protocol > specifies strongly (or even statically) typed multi-dimensional arrays. Ach :-( > PEP-3118 Py_buffer structs are essentially how NumPy works internally. Well, we should still write a Python documentation, not a NumPy documentation (on this tracker anyway). Outside of NumPy, there's little use for multi-dimensional objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 22:18:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 23 Nov 2012 21:18:31 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <1353705511.36.0.951211905467.issue16518@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I wouldn't use "bytes-like object". What about "buffer-like object"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 22:21:06 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 23 Nov 2012 21:21:06 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353705511.36.0.951211905467.issue16518@psf.upfronthosting.co.za> Message-ID: <1353705608.3343.5.camel@localhost.localdomain> Antoine Pitrou added the comment: > > I wouldn't use "bytes-like object". > > What about "buffer-like object"? "buffer-like" means "like a buffer" which is wrong on two points: - "buffer" is not defined at this point, so the user doesn't understand what it means - we are not talking about an object which is "like a buffer", but which "provides a buffer" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 22:37:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Nov 2012 21:37:04 +0000 Subject: [issue16504] IDLE - fatal error when opening a file with certain tokenizing errors In-Reply-To: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za> Message-ID: <1353706624.56.0.444231635915.issue16504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The bug is somewhere in print_exception() function in Lib/idlelib/run.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 22:54:13 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 23 Nov 2012 21:54:13 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353704267.3343.3.camel@localhost.localdomain> Message-ID: <20121123215415.GA3655@sleipnir.bytereef.org> Stefan Krah added the comment: Antoine Pitrou wrote: > > PEP-3118 Py_buffer structs are essentially how NumPy works internally. > > Well, we should still write a Python documentation, not a NumPy > documentation (on this tracker anyway). Outside of NumPy, there's little > use for multi-dimensional objects. Ok, but people should not be surprised if their (Python) array.array() of double or their array of ctypes structs is silently accepted by some byte consuming function. How about "object does not provide a byte buffer" for error messages and "(byte) buffer provider" as a shorthand for "any buffer provider that exposes its memory as a sequence of unsigned bytes in response to a PyBUF_SIMPLE request"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 22:57:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 23 Nov 2012 21:57:42 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <20121123215415.GA3655@sleipnir.bytereef.org> Message-ID: <1353707804.3343.9.camel@localhost.localdomain> Antoine Pitrou added the comment: > > Well, we should still write a Python documentation, not a NumPy > > documentation (on this tracker anyway). Outside of NumPy, there's little > > use for multi-dimensional objects. > > Ok, but people should not be surprised if their (Python) array.array() of > double or their array of ctypes structs is silently accepted by some byte > consuming function. Probably. My own (humble :-)) opinion is that array.array() is a historical artifact, and its use doesn't seem to be warranted in modern Python code. ctypes is obviously a very special library, and not for the faint of heart. > How about "object does not provide a byte buffer" for error messages > and "(byte) buffer provider" as a shorthand for "any buffer provider > that exposes its memory as a sequence of unsigned bytes in response > to a PyBUF_SIMPLE request"? It's not too bad, I think. However, what I think is important is that the average (non-expert) Python developer understand that the function really accepts a bytes object, and other similar types (because, really, bytes is the only bytes-like type most developers will ever face). That's why I'm proposing "bytes-like object". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 23:22:30 2012 From: report at bugs.python.org (rurpy the second) Date: Fri, 23 Nov 2012 22:22:30 +0000 Subject: [issue12806] argparse: Hybrid help text formatter In-Reply-To: <1313973978.37.0.422477813424.issue12806@psf.upfronthosting.co.za> Message-ID: <1353709350.36.0.666991776855.issue12806@psf.upfronthosting.co.za> rurpy the second added the comment: I happened upon this issue while Googling for a formatter with the behavior described here. I put together a formatter derived from the code submitted by GraylinKim (2011-08-22) and offer it for consideration (though it is missing some things like docstrings and hasn't been tested very thoroughly). As per other comments, it uses additional indentation rather than leading special characters to start a new block. Differently than GraylinKim's code, additional indentation suppresses wrapping or any formatting. However, it would be easy to change that as I hope is obvious from the code. There are two common ways of denoting a block of text (a block being text that should be reformatted as a single unit; aka paragraph) 1. A group of text lines ending with newlines followed by a blank line to denote the end of the block. 2. A single (long) text line where the terminating newline denotes the end of the block (i.e. one line == one block). Both occur in the context of argparse help text: Example of #1: p.add_argument (...., help='''block1 block1 block1 block1 block1 block1 block1 block1 block1 block1 block1 block1 block2 block2 block2 block2 block2 block2 block2 block2''') Examples of #2: p.add_argument (...., help='block1 block1 block1 block1 ' 'block1 block1 block1 block1 ' 'block1 block1 block1 block1 \n' '' 'block2 block2 block2 block2 ' 'block2 block2 block2 block2 ') p.add_argument (...., help='''block1 block1 block1 block1 \ block1 block1 block1 block1 \ block1 block1 block1 block1 \ block2 block2 block2 block2 \ block2 block2 block2 block2 ''') There is no way, when reading lines of text, to tell whether one is reading text in the form of #1 or #2, when one sees a newline. So a formatter really needs to be able to be told which form it is being given. This seems to require two separate formatter classes (though they call common code.) The first form (call it multiline blocked text) is formatted by ParagraphFormatterML. The second form (call it single-line blocked text; I often use form #2a) by ParagraphFormatter. ---------- nosy: +rurpy2 Added file: http://bugs.python.org/file28091/paraformatter.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 23:26:41 2012 From: report at bugs.python.org (rurpy the second) Date: Fri, 23 Nov 2012 22:26:41 +0000 Subject: [issue12806] argparse: Hybrid help text formatter In-Reply-To: <1313973978.37.0.422477813424.issue12806@psf.upfronthosting.co.za> Message-ID: <1353709601.88.0.522815080722.issue12806@psf.upfronthosting.co.za> rurpy the second added the comment: Additional comment loosely related to the ParagraphFormatter offered in previous comment... [If this is not the right venue -- perhaps a new issue or one of the python mail lists would be better -- please tell me.] I notice that argparse.ArgumentParser requires a class (as opposed to instance) for the formatter_class parameter. A cursory look at argparse gives me the impression that this is only so that ArgumentParser can instantiate the instance with a 'prog' argument. If ArgumentParser accepted a HelpFormatter object (rather than a class), then a user could instantiate a custom formatter class with arguments that would customize its behavior. For example, I would be able to write a single ParagraphFormatter class that was instantiated like formatter = ParagraphFormatter (multiline=False) or formatter = ParagraphFormatter (multiline=True) If one has other requirements, perhaps apply one kind of formatting to description/epilogue text and another to the arguments text, then there is an even greater multiplicity of classes that could be avoided by instantiating a single formatter class with arguments. So why can't ArgumentParser look at the formatter_class value: if it's a class proceed as now, but if it's an class instance, simply set its ._prog attribute and use it as is: def _get_formatter(self): if isinstance (self.formatter_class, ): return self.formatter_class(prog=self.prog) else: self.formatter_class._prog = prog return self.formatter_class Of course the "formatter_class" parameter name would then require a little explanation but that's what documentation is for. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 23:40:46 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Nov 2012 22:40:46 +0000 Subject: [issue16545] ast.FunctionDef sets a bad value for kw_defaults when keyword-only arguments present Message-ID: <1353710446.83.0.371653706627.issue16545@psf.upfronthosting.co.za> New submission from Brett Cannon: When there are no keyword-only arguments, the value of kw_defaults for FunctionDef is []. But when keyword-only arguments are present with no default values, it becomes [None]. That's bad as every other value in FunctionDef has a default of [] when there is nothing of value there (currently you can trust that [None] means no default value as None isn't anything in the AST). >>> ast.dump(ast.parse('def func(*, name):pass')) "Module(body=[FunctionDef(name='func', args=arguments(args=[], vararg=None, varargannotation=None, kwonlyargs=[arg(arg='name', annotation=None)], kwarg=None, kwargannotation=None, defaults=[], kw_defaults=[None]), body=[Pass()], decorator_list=[], returns=None)])" >>> ast.dump(ast.parse('def func(name):pass')) "Module(body=[FunctionDef(name='func', args=arguments(args=[arg(arg='name', annotation=None)], vararg=None, varargannotation=None, kwonlyargs=[], kwarg=None, kwargannotation=None, defaults=[], kw_defaults=[]), body=[Pass()], decorator_list=[], returns=None)])" ---------- components: Library (Lib) keywords: 3.3regression messages: 176260 nosy: brett.cannon priority: normal severity: normal stage: test needed status: open title: ast.FunctionDef sets a bad value for kw_defaults when keyword-only arguments present versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 23 23:42:35 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Nov 2012 22:42:35 +0000 Subject: [issue16546] ast.YieldFrom needlessly has its expr value as optional Message-ID: <1353710555.66.0.299462157611.issue16546@psf.upfronthosting.co.za> New submission from Brett Cannon: The grammar guarantees that 'yield from' statements have an expression to evaluate, plus a 'yield from' without an expression makes no sense. ---------- components: Library (Lib) messages: 176261 nosy: brett.cannon priority: normal severity: normal stage: test needed status: open title: ast.YieldFrom needlessly has its expr value as optional versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 00:18:03 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 23 Nov 2012 23:18:03 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353707804.3343.9.camel@localhost.localdomain> Message-ID: <20121123231804.GA4321@sleipnir.bytereef.org> Stefan Krah added the comment: Antoine Pitrou wrote: > > How about "object does not provide a byte buffer" for error messages > > and "(byte) buffer provider" as a shorthand for "any buffer provider > > that exposes its memory as a sequence of unsigned bytes in response > > to a PyBUF_SIMPLE request"? > > It's not too bad, I think. However, what I think is important is that > the average (non-expert) Python developer understand that the function > really accepts a bytes object, and other similar types (because, really, > bytes is the only bytes-like type most developers will ever face). > That's why I'm proposing "bytes-like object". If it is somehow possible to establish the term as a shorthand for the real meaning, then I guess it's the most economical option for documenting Python methods (I don't think it should be used in the C-API docs though). help (b''.join) for example would sound better with "bytes-like object" than with "(byte) buffer provider". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 01:02:46 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 24 Nov 2012 00:02:46 +0000 Subject: [issue16540] Make itertools count, cycle, and repeat objects subscriptable like range. In-Reply-To: <1353689500.44.0.874231567129.issue16540@psf.upfronthosting.co.za> Message-ID: <1353715366.81.0.883761319006.issue16540@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 01:31:02 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 24 Nov 2012 00:31:02 +0000 Subject: [issue16501] deprecate RISCOS "support" In-Reply-To: <1353258907.33.0.855880480918.issue16501@psf.upfronthosting.co.za> Message-ID: <1353717062.22.0.989582910322.issue16501@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 01:32:32 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 24 Nov 2012 00:32:32 +0000 Subject: [issue16501] deprecate RISCOS "support" In-Reply-To: <1353258907.33.0.855880480918.issue16501@psf.upfronthosting.co.za> Message-ID: <1353717152.5.0.641810789784.issue16501@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Please, update PEP 11. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 01:35:44 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 24 Nov 2012 00:35:44 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1353717344.75.0.0937428364766.issue16500@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 01:36:01 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 24 Nov 2012 00:36:01 +0000 Subject: [issue6923] Need pthread_atfork-like functionality in CPython In-Reply-To: <1253131394.22.0.862355202249.issue6923@psf.upfronthosting.co.za> Message-ID: <1353717361.21.0.0128880129673.issue6923@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 02:10:26 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 24 Nov 2012 01:10:26 +0000 Subject: [issue16512] imghdr doesn't support jpegs with an ICC profile In-Reply-To: <1353406880.2.0.236043197389.issue16512@psf.upfronthosting.co.za> Message-ID: <1353719426.68.0.0584514703462.issue16512@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 02:33:26 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 24 Nov 2012 01:33:26 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <1353720806.63.0.678034913959.issue16518@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > > That's why I'm proposing "bytes-like object". > > If it is somehow possible to establish the term as a shorthand for the real meaning, This can be established via the glossary. We can still use "buffer provider" for the general case, if we find that it is useful in certain circumstances. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 02:44:32 2012 From: report at bugs.python.org (Stefan Krah) Date: Sat, 24 Nov 2012 01:44:32 +0000 Subject: [issue16534] test_float failure on IA64 (HPUX) In-Reply-To: <1353678195.86.0.859565731995.issue16534@psf.upfronthosting.co.za> Message-ID: <20121124014433.GA5739@sleipnir.bytereef.org> Stefan Krah added the comment: For some reason ./configure detects x87-style-double-rounding=yes, but when I compile the test manually with the same command line "cc -Ae -g", no double rounding is detected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 04:08:45 2012 From: report at bugs.python.org (Roger Serwy) Date: Sat, 24 Nov 2012 03:08:45 +0000 Subject: [issue16504] IDLE - fatal error when opening a file with certain tokenizing errors In-Reply-To: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za> Message-ID: <1353726525.76.0.179488092114.issue16504@psf.upfronthosting.co.za> Roger Serwy added the comment: Serhiy, was msg176255 meant for issue16491? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 07:04:01 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 24 Nov 2012 06:04:01 +0000 Subject: [issue3871] cross and native build of python for mingw* hosts In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1353737041.88.0.0501312978302.issue3871@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 09:10:01 2012 From: report at bugs.python.org (Daniel Urban) Date: Sat, 24 Nov 2012 08:10:01 +0000 Subject: [issue16546] ast.YieldFrom needlessly has its expr value as optional In-Reply-To: <1353710555.66.0.299462157611.issue16546@psf.upfronthosting.co.za> Message-ID: <1353744601.03.0.0738028344331.issue16546@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +daniel.urban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 09:10:17 2012 From: report at bugs.python.org (Daniel Urban) Date: Sat, 24 Nov 2012 08:10:17 +0000 Subject: [issue16545] ast.FunctionDef sets a bad value for kw_defaults when keyword-only arguments present In-Reply-To: <1353710446.83.0.371653706627.issue16545@psf.upfronthosting.co.za> Message-ID: <1353744617.09.0.847145140913.issue16545@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +daniel.urban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 09:11:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Nov 2012 08:11:09 +0000 Subject: [issue16491] IDLE and except: raise from In-Reply-To: <9C3C06E7F0934B209166A3DC454F8D19@HansPc> Message-ID: <1353744669.75.0.519976163113.issue16491@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The bug is somewhere in print_exception() function in Lib/idlelib/run.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 09:11:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Nov 2012 08:11:39 +0000 Subject: [issue16504] IDLE - fatal error when opening a file with certain tokenizing errors In-Reply-To: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za> Message-ID: <1353744699.28.0.819520943625.issue16504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Serhiy, was msg176255 meant for issue16491? Yes, sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 09:12:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Nov 2012 08:12:04 +0000 Subject: [issue16504] IDLE - fatal error when opening a file with certain tokenizing errors In-Reply-To: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za> Message-ID: <1353744724.41.0.404174796522.issue16504@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- Removed message: http://bugs.python.org/msg176255 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 09:46:49 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 24 Nov 2012 08:46:49 +0000 Subject: [issue16546] ast.YieldFrom needlessly has its expr value as optional In-Reply-To: <1353710555.66.0.299462157611.issue16546@psf.upfronthosting.co.za> Message-ID: <1353746809.46.0.512801379186.issue16546@psf.upfronthosting.co.za> Mark Dickinson added the comment: Brett: can you clarify---in what sense is the argument optional? I see that there's a doc issue at http://docs.python.org/dev/library/ast.html, where it's marked as optional but shouldn't but. Is there something more that's wrong? If you mean that ast.YieldFrom can be instantiated without an argument, isn't that the same for all the ast classes? >>> ast.YieldFrom() <_ast.YieldFrom object at 0x100760f50> >>> ast.BoolOp() <_ast.BoolOp object at 0x100760f90> ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 11:33:30 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 24 Nov 2012 10:33:30 +0000 Subject: [issue9633] pdb go stack up/down In-Reply-To: <1282133837.82.0.171010459939.issue9633@psf.upfronthosting.co.za> Message-ID: <1353753210.16.0.685366152131.issue9633@psf.upfronthosting.co.za> Xavier de Gaye added the comment: It is not only the up and down commands; the where, longlist and source commands may also overwrite changes made to f_locals. In Markus sample script above, and with the patch applied, when the change made to stack_2 is followed by a step command, stack_2 value goes back to '2' again. This is because the self.curframe_locals list is built from scratch again when processing the new trace function triggered after the step command and a new call to frame_getlocals (and thus to PyFrame_FastToLocals) is made on the frame of function_2 to populate self.curframe_locals, overwritting the previous value '144' of stack_2. With a dictionary mapping frames to f_locals (and only updating this dictionary when adding entries for frames that do not exist in the dictionary), the above problem is fixed. However, running step repeatedly until returning to function_2, causes the value of stack_2 to become '2' again when in function_2. This is because, just after returning from the frame of function_3, the following calls are made in call_trampoline to invoke the first (after tracing function_3) trace function in function_2 frame; the 'frame' argument of PyFrame_FastToLocals is the frame of function_2 and so, the call to PyFrame_FastToLocals overwrites the value '144' of stack_2, and the value of stack_2 is back to '2' again: PyFrame_FastToLocals(frame); result = PyEval_CallObject(callback, args); PyFrame_LocalsToFast(frame, 1); Only the f_locals of the top level frame is saved by PyFrame_LocalsToFast after exiting the trace function, so it is not possible to keep consistent the changes made in the f_locals of the lower level frames. Another solution would be to ensure that changes made to locals at the top level frame are not overwritten, and to explicitly make readonly the locals of the other frames. See how this is done at http://code.google.com/p/pdb-clone/source/detail?r=5643890608fce2eac318de61f1d6d065d5a7d538 ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 11:40:15 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 24 Nov 2012 10:40:15 +0000 Subject: [issue16482] pdb.set_trace() clobbering traceback on error In-Reply-To: <1353002125.56.0.265106335805.issue16482@psf.upfronthosting.co.za> Message-ID: <1353753615.69.0.988870550344.issue16482@psf.upfronthosting.co.za> Xavier de Gaye added the comment: See also how it is fixed at http://code.google.com/p/pdb-clone/source/detail?r=123d1b6db6649f4b54712db321865fda55395488&name=default ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 11:43:18 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 24 Nov 2012 10:43:18 +0000 Subject: [issue14912] Pdb does not stop at a breakpoint after a restart command and source changes In-Reply-To: <1337945757.27.0.114974346451.issue14912@psf.upfronthosting.co.za> Message-ID: <1353753798.91.0.940097350504.issue14912@psf.upfronthosting.co.za> Xavier de Gaye added the comment: See also how this is fixed at http://code.google.com/p/pdb-clone/source/detail?r=6ad576592286a005694690906644cb3004090eeb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 11:46:30 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 24 Nov 2012 10:46:30 +0000 Subject: [issue13044] pdb throws AttributeError at end of debugging session In-Reply-To: <1316968582.76.0.94343164649.issue13044@psf.upfronthosting.co.za> Message-ID: <1353753990.96.0.820794838928.issue13044@psf.upfronthosting.co.za> Xavier de Gaye added the comment: The run, runeval and runcall methods run the debugging session in a try/finally clause and set the global trace function to None in the finally clause. But set_trace does not run in a try/finally, hence the problem. A possible fix is to ensure that the bottom frame has a local trace function and to set the global trace function to None when returning from that frame. See how this is fixed at http://code.google.com/p/pdb-clone/source/detail?r=ee22a278c743ea9449a3e7618acc7c33cb11bb26&name=2.7 ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 11:49:13 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 24 Nov 2012 10:49:13 +0000 Subject: [issue16180] cannot quit pdb when there is a syntax error in the debuggee (must kill it) In-Reply-To: <1349811204.12.0.797224741983.issue16180@psf.upfronthosting.co.za> Message-ID: <1353754153.21.0.466744629474.issue16180@psf.upfronthosting.co.za> Xavier de Gaye added the comment: See how this is fixed at http://code.google.com/p/pdb-clone/source/detail?r=0d4d905c6e0aa9c47611dbae514d3f7f53776dcb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 11:52:47 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 24 Nov 2012 10:52:47 +0000 Subject: [issue16446] pdb raises BdbQuit on 'quit' when started with set_trace In-Reply-To: <1352416193.43.0.475440625813.issue16446@psf.upfronthosting.co.za> Message-ID: <1353754367.5.0.251996225408.issue16446@psf.upfronthosting.co.za> Xavier de Gaye added the comment: See how this is fixed at http://code.google.com/p/pdb-clone/source/detail?r=8bbac1ffee749fcfd96ea3a2aaca1f240cafc2cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 11:55:22 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 24 Nov 2012 10:55:22 +0000 Subject: [issue14743] on terminating, Pdb debugs itself In-Reply-To: <1336420111.44.0.550150061213.issue14743@psf.upfronthosting.co.za> Message-ID: <1353754522.7.0.978965282412.issue14743@psf.upfronthosting.co.za> Xavier de Gaye added the comment: See also how this is fixed at http://code.google.com/p/pdb-clone/source/detail?r=625d61e3494d3b7e2a3e8578ddd2f204e21f1800 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 11:58:20 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 24 Nov 2012 10:58:20 +0000 Subject: [issue14728] trace function not set, causing some Pdb commands to fail In-Reply-To: <1336214625.48.0.950841547459.issue14728@psf.upfronthosting.co.za> Message-ID: <1353754700.86.0.923699924331.issue14728@psf.upfronthosting.co.za> Xavier de Gaye added the comment: See also how this is fixed at http://code.google.com/p/pdb-clone/source/detail?r=4a6d8f2515eed16347d2e2c304e1942585427d50 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 12:01:15 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 24 Nov 2012 11:01:15 +0000 Subject: [issue6322] Pdb breakpoints don't work on lines without bytecode In-Reply-To: <1245679754.68.0.982838087844.issue6322@psf.upfronthosting.co.za> Message-ID: <1353754875.54.0.664197661909.issue6322@psf.upfronthosting.co.za> Xavier de Gaye added the comment: See also how this is fixed at http://code.google.com/p/pdb-clone/source/detail?r=6b342324ebdc4558b83b9391e34478c1fa0752db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 12:02:26 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 24 Nov 2012 11:02:26 +0000 Subject: [issue14913] tokenize the source to manage Pdb breakpoints In-Reply-To: <1337946553.88.0.954704249232.issue14913@psf.upfronthosting.co.za> Message-ID: <1353754946.63.0.294658478603.issue14913@psf.upfronthosting.co.za> Xavier de Gaye added the comment: See also how this is fixed at http://code.google.com/p/pdb-clone/source/detail?r=6b342324ebdc4558b83b9391e34478c1fa0752db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 12:05:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Nov 2012 11:05:19 +0000 Subject: [issue16491] IDLE and except: raise from In-Reply-To: <9C3C06E7F0934B209166A3DC454F8D19@HansPc> Message-ID: <1353755119.23.0.179898831397.issue16491@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file28092/idle_print_exception.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 12:05:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Nov 2012 11:05:58 +0000 Subject: [issue16491] IDLE and except: raise from In-Reply-To: <9C3C06E7F0934B209166A3DC454F8D19@HansPc> Message-ID: <1353755158.61.0.97805323285.issue16491@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.2 Added file: http://bugs.python.org/file28093/idle_print_exception-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 12:06:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Nov 2012 11:06:29 +0000 Subject: [issue16491] IDLE and except: raise from In-Reply-To: <9C3C06E7F0934B209166A3DC454F8D19@HansPc> Message-ID: <1353755189.7.0.205196240692.issue16491@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 12:25:41 2012 From: report at bugs.python.org (Trent Nelson) Date: Sat, 24 Nov 2012 11:25:41 +0000 Subject: [issue16533] HPUX: Unable to fork() in thread In-Reply-To: <1353622712.14.0.676507060266.issue16533@psf.upfronthosting.co.za> Message-ID: <20121124112535.GA44687@snakebite.org> Trent Nelson added the comment: On Thu, Nov 22, 2012 at 02:18:32PM -0800, Stefan Krah wrote: > > New submission from Stefan Krah: > > There's an error on the HPUX-IA64 buildbot that might be due to > some kernel limits. Trent, could you check if the following helps > (requires root)? > > http://zensonic.dk/?p=326 Hmmm, there doesn't appear to be anything interesting in syslog.log. I'll look into it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 12:25:59 2012 From: report at bugs.python.org (Trent Nelson) Date: Sat, 24 Nov 2012 11:25:59 +0000 Subject: [issue16534] test_float failure on IA64 (HPUX) In-Reply-To: <1353678195.86.0.859565731995.issue16534@psf.upfronthosting.co.za> Message-ID: <20121124112555.GB44687@snakebite.org> Trent Nelson added the comment: On Fri, Nov 23, 2012 at 05:43:15AM -0800, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > I wonder whether adding "-fpeval=float" to the CFLAGS would fix this. There's a lot of information at > > http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=0008a22194f02110a22194f02110275d6e10RCRD > > but I don't know whether it's relevant to this machine. Trent? No idea. I'll look into it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 12:26:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Nov 2012 11:26:27 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1353756387.75.0.541704451327.issue9584@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 12:51:17 2012 From: report at bugs.python.org (Daniel Urban) Date: Sat, 24 Nov 2012 11:51:17 +0000 Subject: [issue16545] ast.FunctionDef sets a bad value for kw_defaults when keyword-only arguments present In-Reply-To: <1353710446.83.0.371653706627.issue16545@psf.upfronthosting.co.za> Message-ID: <1353757877.68.0.742786141165.issue16545@psf.upfronthosting.co.za> Daniel Urban added the comment: If I understand correctly, the invariant is that len(kw_defaults) == len(kwonlyargs). I think the reason is that the following is valid syntax (an argument without a default after one with a default): >>> def f(*, a=0, b): pass ... >>> And None is used as a placeholder in the kw_defaults list: >>> ast.dump(ast.parse('def f(*, a=0, b): pass')) "Module(body=[FunctionDef(name='f', args=arguments(args=[], vararg=None, varargannotation=None, kwonlyargs=[arg(arg='a', annotation=None), arg(arg='b', annotation=None)], kwarg=None, kwargannotation=None, defaults=[], kw_defaults=[Num(n=0), None]), body=[Pass()], decorator_list=[], returns=None)])" >>> So it seems to me, that this behavior is intentional. (Also, it works no differently in 3.2.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 13:50:43 2012 From: report at bugs.python.org (Sebastian Kraft) Date: Sat, 24 Nov 2012 12:50:43 +0000 Subject: [issue16525] wave file module does not support 32bit float format In-Reply-To: <1353528827.37.0.543069044809.issue16525@psf.upfronthosting.co.za> Message-ID: <1353761443.38.0.858399026842.issue16525@psf.upfronthosting.co.za> Sebastian Kraft added the comment: Write support is no problem, I will add this. >From reading the spec in the link you provided I think the implementation in general is OK. Everything apart WAVE_FORMAT_PCM should have an extension size cbSize, that's right. But only WAVE_FORMAT_EXTENSIBLE sets cbSize=22. So for read access it is not mandatory to check the value when WAVE_FORMAT_IEEE_FLOAT, but for writing files I would set this to zero. There are several other wave formats which also use float data, but most important is WAVE_FORMAT_IEEE_FLOAT, and that can be suppoted quite easily without many changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 14:10:40 2012 From: report at bugs.python.org (Thomas Kluyver) Date: Sat, 24 Nov 2012 13:10:40 +0000 Subject: [issue16544] Add external link to ast docs In-Reply-To: <1353702032.57.0.687396127567.issue16544@psf.upfronthosting.co.za> Message-ID: <1353762640.84.0.218173973158.issue16544@psf.upfronthosting.co.za> Thomas Kluyver added the comment: Thanks, I'm really glad to see that it's useful to others. I don't mind contributing it to Python, but I wonder if it's better to let it develop separately for a few months first - it's still very new, and I can improve it faster in a repository where I can commit to it myself. I'm open to other opinions on that, though. In the meantime, let me know if there are any specific formats/styles/etc. that I should work towards, to make a later move into the official docs simpler. I have a couple of particular questions: - The repository includes some utility code for exploring ASTs, as well as longer, runnable versions of the examples in the docs. What would be the best way to preserve these? - There are some nodes (like AugLoad) that I've yet to find what they actually do, while I've only seen Param in Python 2. Is this an issue? Of course, you're more than welcome to give a 'see also' link to GTS if we decide not to move it for now. ---------- nosy: +takluyver _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 15:17:20 2012 From: report at bugs.python.org (Daniel Urban) Date: Sat, 24 Nov 2012 14:17:20 +0000 Subject: [issue12457] type() returns incorrect type for nested classes In-Reply-To: <1309497940.68.0.603392922196.issue12457@psf.upfronthosting.co.za> Message-ID: <1353766640.82.0.105079381824.issue12457@psf.upfronthosting.co.za> Daniel Urban added the comment: Also, it seems, that pickling inner classes will by supported by pickle protocol version 4 (see PEP 3154). There is already an issue for the implementation: issue15642. ---------- versions: +Python 3.4 -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 15:18:01 2012 From: report at bugs.python.org (Daniel Urban) Date: Sat, 24 Nov 2012 14:18:01 +0000 Subject: [issue12457] type() returns incorrect type for nested classes In-Reply-To: <1309497940.68.0.603392922196.issue12457@psf.upfronthosting.co.za> Message-ID: <1353766681.24.0.328555381877.issue12457@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- resolution: -> duplicate superseder: -> Integrate pickle protocol version 4 GSoC work by Stefan Mihaila _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 15:19:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Nov 2012 14:19:26 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1353766766.58.0.838371058979.issue14373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have added a lot of comments in Rietveld. In general the patch looks good, but I have some style nitpicks and some more strong comments. Matt, please update the patch. Tests should test both Python and C implementations. I doubt if get rid of locking is right. Hash calculation and comparison of arguments can call Python code and this code can recursive use the wrapped function. Some benchmarks will be interesting. I think this acceleration must necessarily be in 3.4. ---------- components: +Extension Modules -Interpreter Core stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 15:21:13 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 24 Nov 2012 14:21:13 +0000 Subject: [issue16546] ast.YieldFrom needlessly has its expr value as optional In-Reply-To: <1353710555.66.0.299462157611.issue16546@psf.upfronthosting.co.za> Message-ID: <1353766873.47.0.34469426948.issue16546@psf.upfronthosting.co.za> Brett Cannon added the comment: Where is the doc issue? And it's a bit more than just a doc issue anyway as Python.asdl has the same issue and that is what is used to generate the code that represents the nodes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 15:25:16 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 24 Nov 2012 14:25:16 +0000 Subject: [issue16545] ast.FunctionDef sets a bad value for kw_defaults when keyword-only arguments present In-Reply-To: <1353710446.83.0.371653706627.issue16545@psf.upfronthosting.co.za> Message-ID: <1353767116.62.0.961685507412.issue16545@psf.upfronthosting.co.za> Brett Cannon added the comment: Ah, I see it now. I didn't realize that we allowed people to define keyword-only arguments in any order they wanted in terms of default values, allowing interleaving of default and non-default values. So this is correct, just different from everything else. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 15:46:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Nov 2012 14:46:33 +0000 Subject: [issue16413] Non cross-platform behavior of os.path.split In-Reply-To: <1352114668.34.0.500502059895.issue16413@psf.upfronthosting.co.za> Message-ID: <1353768393.52.0.787590949914.issue16413@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think that Python should include documentation on all supported OSes, formats, protocols and algorithms. There are documentation outside Python. I think this is not Python issue. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 16:26:29 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 24 Nov 2012 15:26:29 +0000 Subject: [issue16525] wave file module does not support 32bit float format In-Reply-To: <1353528827.37.0.543069044809.issue16525@psf.upfronthosting.co.za> Message-ID: <1353770789.09.0.663436189762.issue16525@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Sebastian, Could you possibly write a patch with a test?. Could you possibly fill a contributor agreement? Details in http://www.python.org/psf/contrib/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 16:40:25 2012 From: report at bugs.python.org (Sebastian Kraft) Date: Sat, 24 Nov 2012 15:40:25 +0000 Subject: [issue16525] wave file module does not support 32bit float format In-Reply-To: <1353528827.37.0.543069044809.issue16525@psf.upfronthosting.co.za> Message-ID: <1353771625.54.0.482691599199.issue16525@psf.upfronthosting.co.za> Sebastian Kraft added the comment: I will create a patch together with a testset of example files and also fill out the agreement. BTW: readframes() returns bad data for 24bit PCM if big_endian==True. Furthermore IMO it doesn't make sense to return a byte stream in little endian order on a big endian system... What do you think? At least the waves doc doesn't mention or specify the endianess which will cause trouble. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 17:01:56 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 24 Nov 2012 16:01:56 +0000 Subject: [issue16525] wave file module does not support 32bit float format In-Reply-To: <1353528827.37.0.543069044809.issue16525@psf.upfronthosting.co.za> Message-ID: <1353772916.97.0.526114746506.issue16525@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: About the 24 bit PCM bug, please fill another bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 18:00:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 24 Nov 2012 17:00:13 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <3Y80xm27jTzRRR@mail.python.org> Roundup Robot added the comment: New changeset a182367eac5a by Antoine Pitrou in branch 'default': Issue #16423: urllib.request now has support for ``data:`` URLs. http://hg.python.org/cpython/rev/a182367eac5a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 18:03:24 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 Nov 2012 17:03:24 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <1353776604.39.0.865287179123.issue16423@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed your patch after having made the few very minor changes mentioned in the review. Thank you very much! ---------- assignee: orsenthil -> resolution: -> invalid stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 18:15:19 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 24 Nov 2012 17:15:19 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <3Y81HB6MX6zQ3l@mail.python.org> Roundup Robot added the comment: New changeset 75a146a657d9 by Antoine Pitrou in branch 'default': Fix missing import (followup to #4473). http://hg.python.org/cpython/rev/75a146a657d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 18:18:56 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 24 Nov 2012 17:18:56 +0000 Subject: [issue16546] ast.YieldFrom needlessly has its expr value as optional In-Reply-To: <1353710555.66.0.299462157611.issue16546@psf.upfronthosting.co.za> Message-ID: <1353777536.8.0.761295534701.issue16546@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ah, okay. I only looked at Grammar/Grammar, which looks fine. The doc issue is that at http://docs.python.org/dev/library/ast.html, under the heading "31.2.2. Abstract Grammar", it says: | Yield(expr? value) | YieldFrom(expr? value) But the docs insert the contents of Python.asdl directly, so you're right: it's not really a doc issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 18:21:46 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 24 Nov 2012 17:21:46 +0000 Subject: [issue16546] ast.YieldFrom needlessly has its expr value as optional In-Reply-To: <1353710555.66.0.299462157611.issue16546@psf.upfronthosting.co.za> Message-ID: <1353777706.28.0.852095726506.issue16546@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 18:23:55 2012 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Sat, 24 Nov 2012 17:23:55 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <1353777835.16.0.594922571215.issue16423@psf.upfronthosting.co.za> Mathias Panzenb?ck added the comment: Great! Feels awesome to have my first bit of code contributed to the Python project. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 18:49:19 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 Nov 2012 17:49:19 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <1353779359.17.0.868425735888.issue16423@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You're welcome! We're always happy to have new contributors. I've forgotten something: could you sign a contributor agreement? You'll find instructions at http://www.python.org/psf/contrib/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 18:55:01 2012 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Sat, 24 Nov 2012 17:55:01 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <1353779701.25.0.266078274603.issue16423@psf.upfronthosting.co.za> Mathias Panzenb?ck added the comment: Will do (later today). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 19:01:53 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 24 Nov 2012 18:01:53 +0000 Subject: [issue16546] ast.YieldFrom needlessly has its expr value as optional In-Reply-To: <1353710555.66.0.299462157611.issue16546@psf.upfronthosting.co.za> Message-ID: <1353780113.94.0.586743876149.issue16546@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file28094/issue16546.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 19:11:25 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 24 Nov 2012 18:11:25 +0000 Subject: [issue16546] ast.YieldFrom needlessly has its expr value as optional In-Reply-To: <1353710555.66.0.299462157611.issue16546@psf.upfronthosting.co.za> Message-ID: <1353780685.26.0.818823894992.issue16546@psf.upfronthosting.co.za> Mark Dickinson added the comment: New patch that removes some unnecessary braces in the case statements. ---------- Added file: http://bugs.python.org/file28095/issue16546.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 19:11:39 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 24 Nov 2012 18:11:39 +0000 Subject: [issue16546] ast.YieldFrom needlessly has its expr value as optional In-Reply-To: <1353710555.66.0.299462157611.issue16546@psf.upfronthosting.co.za> Message-ID: <1353780699.92.0.889554470805.issue16546@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file28094/issue16546.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 19:29:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Nov 2012 18:29:41 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1353781781.6.0.392641461922.issue4591@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a simplified version of patch from issue2005. Support of uid_t/gid_t larger than unsigned long dropped. Signed uid_t/gid_t support dropped. The converters moved to Objects/longobject.c. Some tests added. ---------- components: +Extension Modules, Interpreter Core -Library (Lib) nosy: +serhiy.storchaka stage: -> patch review versions: +Python 3.4 Added file: http://bugs.python.org/file28096/posix_uid_gid_conv_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 19:30:05 2012 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Sat, 24 Nov 2012 18:30:05 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1352258882.3.0.769784982909.issue16423@psf.upfronthosting.co.za> Message-ID: <1353781805.42.0.836971230823.issue16423@psf.upfronthosting.co.za> Mathias Panzenb?ck added the comment: Hmm, which of the two initial licenses should I choose? Which one do you rather want me to choose? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 19:39:10 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 Nov 2012 18:39:10 +0000 Subject: [issue16423] urllib data URL In-Reply-To: <1353781805.42.0.836971230823.issue16423@psf.upfronthosting.co.za> Message-ID: <1353782290.3328.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > Hmm, which of the two initial licenses should I choose? Which one do > you rather want me to choose? Whichever you prefer. They should be equivalent in their terms (non-copyleft free licenses). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 20:01:49 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 Nov 2012 19:01:49 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1353783709.82.0.0764400552176.issue4591@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 20:13:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Nov 2012 19:13:19 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <1353784399.05.0.851242046654.issue12848@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated (comment for load_binstring added). ---------- Added file: http://bugs.python.org/file28097/pickle_nonportable_size_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 20:23:20 2012 From: report at bugs.python.org (Lukas Lueg) Date: Sat, 24 Nov 2012 19:23:20 +0000 Subject: [issue16547] IDLE segfaults in tkinter after fresh file's text has been rendered Message-ID: <1353785000.68.0.88975991365.issue16547@psf.upfronthosting.co.za> New submission from Lukas Lueg: IDLE crashes due to what seems to be a use-after-free bug. Opening a file from the 'Open...'-menu leads to a segfault after the text has been rendered. It seems this can be reproduced 100% of the time if the file is big (e.g. 150kb) and the window receives events (clicks...) while the colorization is going on. I've been able to reproduce this behaviour on MacOS 10.6 (3.2, 3.3 and 3.4a) and Windows 7 (3.3) but not on Fedora 17. Python 3.4.0a0 (default:a728056347ec, Nov 23 2012, 19:52:20) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin I'll attach a backtrace and a malloc_history (from a different trace). Any guidance on further debugging on this? ---------- components: IDLE files: backtrace.txt messages: 176307 nosy: ebfe priority: normal severity: normal status: open title: IDLE segfaults in tkinter after fresh file's text has been rendered type: crash versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28098/backtrace.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 20:26:49 2012 From: report at bugs.python.org (Lukas Lueg) Date: Sat, 24 Nov 2012 19:26:49 +0000 Subject: [issue16547] IDLE segfaults in tkinter after fresh file's text has been rendered In-Reply-To: <1353785000.68.0.88975991365.issue16547@psf.upfronthosting.co.za> Message-ID: <1353785209.36.0.876017358248.issue16547@psf.upfronthosting.co.za> Lukas Lueg added the comment: using NSZombieEnabled and MallocStackLoggingNoCompact we can see the use-after-free behaviour ---------- Added file: http://bugs.python.org/file28099/malloc_history.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 20:41:40 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 24 Nov 2012 19:41:40 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1353786100.12.0.0761050976403.issue4591@psf.upfronthosting.co.za> Mark Dickinson added the comment: I don't think _Py_Uid_Converter and _Py_Gid_Converter belong in Objects/longobject.c. Is there a better place to put these? (Though _PyLong_FromUid and _PyLong_FromGid seem fine.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 20:44:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 24 Nov 2012 19:44:42 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <3Y84bY1TTWzQcJ@mail.python.org> Roundup Robot added the comment: New changeset 55fe4b57dd9c by Antoine Pitrou in branch '3.2': Issue #12848: The pure Python pickle implementation now treats object lengths as unsigned 32-bit integers, like the C implementation does. http://hg.python.org/cpython/rev/55fe4b57dd9c New changeset c9d205e2dd02 by Antoine Pitrou in branch '3.3': Issue #12848: The pure Python pickle implementation now treats object lengths as unsigned 32-bit integers, like the C implementation does. http://hg.python.org/cpython/rev/c9d205e2dd02 New changeset aac6b313ef5f by Antoine Pitrou in branch 'default': Issue #12848: The pure Python pickle implementation now treats object lengths as unsigned 32-bit integers, like the C implementation does. http://hg.python.org/cpython/rev/aac6b313ef5f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 20:45:48 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 Nov 2012 19:45:48 +0000 Subject: [issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned In-Reply-To: <1314449993.09.0.0217958770024.issue12848@psf.upfronthosting.co.za> Message-ID: <1353786348.41.0.927818336031.issue12848@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed the latest patch (pickle_nonportable_size_2.patch). Thank you for working on this! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 21:00:18 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 Nov 2012 20:00:18 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <1353787218.63.0.882256620728.issue10182@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Actually, standard tests should be enough on a big-endian platform with > sizeof(int) < sizeof(size_t) or sizeof(long) < sizeof(size_t). No > additional tests needed. Ok, thanks. Unfortunately, all our 64-bit big endian buildbots are configured to produce 32-bit Pythons... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 21:11:20 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 24 Nov 2012 20:11:20 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1353787880.56.0.134483079102.issue4591@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Though _PyLong_FromUid and _PyLong_FromGid seem fine. Hmm. I take that back. I don't think any of this really belongs in Objects/longobject.c. Right now that module contains entirely portable C code that knows almost nothing about operating systems. In particular, the knowledge that -1 has special meaning doesn't really have a place in the longobject implementation. Is it possible to just use PyLong_FromLong / PyLong_FromLongLong etc. depending on the precision of uid_t / gid_t? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 21:12:39 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 24 Nov 2012 20:12:39 +0000 Subject: [issue16543] Use "positional arguments" in PyArg_UnpackTuple In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353787959.1.0.759856082935.issue16543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > TypeError: f() missing 1 required positional argument: 'a' The error message for round(), for example, has a different form: >>> round() TypeError: Required argument 'number' (pos 1) not found It would be good if these had the same form. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 21:23:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 24 Nov 2012 20:23:20 +0000 Subject: [issue16543] improve TypeError messages for missing arguments (meta issue) In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353788600.97.0.304102680027.issue16543@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- assignee: ezio.melotti -> stage: test needed -> title: Use "positional arguments" in PyArg_UnpackTuple -> improve TypeError messages for missing arguments (meta issue) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 21:25:50 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 24 Nov 2012 20:25:50 +0000 Subject: [issue16520] subprocess.Popen() TypeError message incorrect without args argument In-Reply-To: <1353487512.93.0.371965893186.issue16520@psf.upfronthosting.co.za> Message-ID: <1353788750.97.0.0965441607123.issue16520@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- dependencies: +improve TypeError messages for missing arguments (meta issue) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 21:33:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Nov 2012 20:33:38 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1353789218.74.0.753429660941.issue4591@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Hmm. I take that back. I don't think any of this really belongs in Objects/longobject.c. I am also not happy with that. Originally they were in Modules/posixmodule.c. However where should we place the declarations? We have not posixmodule.h. PyLong_FromPid()/PyLong_AsPid() placed right in Include/longobject.h. Are you have any suggestions? > Is it possible to just use PyLong_FromLong / PyLong_FromLongLong etc. depending on the precision of uid_t / gid_t? No. uid_t/gid_t can be large than maximal signed long, and long long can be not defined. See issue2005 where more complex patch proposed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 21:40:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Nov 2012 20:40:04 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1353789604.06.0.266344569654.issue4591@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Perhaps we should add a new header file for declarations of converters to/from all platform specific integers (pid_t, time_t, uid_t, gid_t). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 21:41:14 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 24 Nov 2012 20:41:14 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1353789674.67.0.878671954268.issue4591@psf.upfronthosting.co.za> Mark Dickinson added the comment: Do we know of any systems where none of int, long, long long (if defined) or their unsigned variants match gid_t / uid_t? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 21:42:21 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 24 Nov 2012 20:42:21 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1353789741.61.0.864617052301.issue4591@psf.upfronthosting.co.za> Mark Dickinson added the comment: A new header file sounds reasonable. We could then move the PID stuff out of longobject.h ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 21:46:12 2012 From: report at bugs.python.org (Todd Rovito) Date: Sat, 24 Nov 2012 20:46:12 +0000 Subject: [issue5066] IDLE documentation for Unix obsolete/incorrect In-Reply-To: <1232942217.99.0.191249551049.issue5066@psf.upfronthosting.co.za> Message-ID: <1353789972.08.0.370067755884.issue5066@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +Todd.Rovito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 21:46:51 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 24 Nov 2012 20:46:51 +0000 Subject: [issue16544] Add external link to ast docs In-Reply-To: <1353702032.57.0.687396127567.issue16544@psf.upfronthosting.co.za> Message-ID: <1353790011.76.0.160240764072.issue16544@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I don't mind contributing it to Python, but I wonder if it's better to > let it develop separately for a few months first - it's still very new, > and I can improve it faster in a repository where I can commit to it > myself. That's fine, there's no hurry to merge this. We should also decide on the approach, e.g.: 1) we could extract bits from your work and use them to improve the current docs (you can also report problems that you might notice in the current docs); 2) we could add your work to the current ast docs; 3) we could add your work as a separate howto in Doc/howto/; > In the meantime, let me know if there are any specific formats/styles/etc. The general guidelines are explained here: http://docs.python.org/devguide/documenting.html You can also look at the current docs to get an idea. > What would be the best way to preserve these? If they are not too long they could be kept in the rst files, otherwise they could be included in the Tools/ dir. > Is this an issue? Any improvement is welcomed -- it doesn't necessarily have to be comprehensive, but it should be correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 21:47:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Nov 2012 20:47:46 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1353790066.05.0.925264372632.issue4591@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Do we know of any systems where none of int, long, long long (if defined) or their unsigned variants match gid_t / uid_t? No, I don't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 24 23:04:13 2012 From: report at bugs.python.org (masterid) Date: Sat, 24 Nov 2012 22:04:13 +0000 Subject: [issue16548] os.system won't run any command and there is no error message when memory cannot be allocated Message-ID: <1353794653.18.0.461930270371.issue16548@psf.upfronthosting.co.za> New submission from masterid: os.system won't run any command and there is no error message when memory cannot be allocated. It looks like Python is running a command but actually nothing happens. I used subprocess.Popen instead and found out that OSError: [Errno 12] Cannot allocate memory I also tried gc.collect() to release memory, but it does not work. ---------- components: Extension Modules messages: 176321 nosy: masterid priority: normal severity: normal status: open title: os.system won't run any command and there is no error message when memory cannot be allocated type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 00:07:52 2012 From: report at bugs.python.org (Thomas Kluyver) Date: Sat, 24 Nov 2012 23:07:52 +0000 Subject: [issue16544] Add external link to ast docs In-Reply-To: <1353702032.57.0.687396127567.issue16544@psf.upfronthosting.co.za> Message-ID: <1353798472.62.0.64468798507.issue16544@psf.upfronthosting.co.za> Thomas Kluyver added the comment: I think that putting the full content of GTS into the ast module docs would make it awkwardly long. Perhaps the bulk of it could become a howto, and GTS could be maintained separately as a showcase of examples. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 00:12:40 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 24 Nov 2012 23:12:40 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353798759.99.0.259062847659.issue16333@psf.upfronthosting.co.za> anatoly techtonik added the comment: Nice conflict case for explaining why perfect API is not here. Because ', ' is now used as an item separator inline and separator for items that span multiple lines, we get trailing whitespace. If ',' is used, items will collide. To resolve this conflict democratically, a new option should be added, but.. If it is a JSON module then what separator are we talking about in the first place? It is not CSV, other separators are not in specification, so why is it there? The only reason is to get the most compact representation. I doubt anybody uses any value except (',', ':'), so the `compact=True` should be sufficient. As for this patch - there should be no doubt that it should be applied to all branches. The logic works only when indent is in force and that already breaks custom separators by inserting indents and newlines. Other argument that nobody will do JSON parsing with whitespace analysis, and even if they do - they'll still need to implement workaround for newlines. ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 00:19:00 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 24 Nov 2012 23:19:00 +0000 Subject: [issue16549] regression: -m json.tool module Message-ID: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> New submission from anatoly techtonik: Awesome json tool doesn't work anymore in Python 3 (needs tests?). http://stackoverflow.com/questions/352098/how-to-pretty-print-json-script C:\Python27>python -m json.tool stdlibx.json { "distutils": [ "Doc/distutils", "Lib/distutils", "Lib/test/test_distutils.py" ], "json": [ "Doc/library/json.rst", "Lib/json", "Lib/test/json_tests", "Lib/test/test_json.py" ] } C:\Python33>python -m json.tool stdlibx.json Traceback (most recent call last): File "C:\Python33\lib\runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\Python33\lib\runpy.py", line 73, in _run_code exec(code, run_globals) File "C:\Python33\lib\json\tool.py", line 37, in main() File "C:\Python33\lib\json\tool.py", line 29, in main obj = json.load(infile) File "C:\Python33\lib\json\__init__.py", line 264, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "C:\Python33\lib\json\__init__.py", line 309, in loads return _default_decoder.decode(s) File "C:\Python33\lib\json\decoder.py", line 352, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) TypeError: can't use a string pattern on a bytes-like object ---------- files: stdlibx.json messages: 176324 nosy: techtonik priority: normal severity: normal status: open title: regression: -m json.tool module versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file28100/stdlibx.json _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 00:19:20 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 24 Nov 2012 23:19:20 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <1353799160.37.0.563830502583.issue16549@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- components: +Library (Lib) title: regression: -m json.tool module -> regression: -m json.tool module is broken _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 00:29:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 Nov 2012 23:29:56 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <1353799796.14.0.954683928675.issue16549@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- keywords: +easy stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 00:53:23 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 24 Nov 2012 23:53:23 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1353781781.6.0.392641461922.issue4591@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: The value -1 is used is some functions like chown() (to only change the user, only the group or none, to check if you are allowed or not). How do you handle this value? Le 24 nov. 2012 19:29, "Serhiy Storchaka" a ?crit : > > Serhiy Storchaka added the comment: > > Here is a simplified version of patch from issue2005. Support of > uid_t/gid_t larger than unsigned long dropped. Signed uid_t/gid_t support > dropped. The converters moved to Objects/longobject.c. Some tests added. > > ---------- > components: +Extension Modules, Interpreter Core -Library (Lib) > nosy: +serhiy.storchaka > stage: -> patch review > versions: +Python 3.4 > Added file: http://bugs.python.org/file28096/posix_uid_gid_conv_3.patch > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 02:09:00 2012 From: report at bugs.python.org (Todd Rovito) Date: Sun, 25 Nov 2012 01:09:00 +0000 Subject: [issue5066] IDLE documentation for Unix obsolete/incorrect In-Reply-To: <1232942217.99.0.191249551049.issue5066@psf.upfronthosting.co.za> Message-ID: <1353805740.63.0.858012423649.issue5066@psf.upfronthosting.co.za> Todd Rovito added the comment: This is a good patch but it is rather out of date and won't apply. I will patch the patch and maybe somebody can apply it this time. Expect a new patch by 11/26/2012. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 03:07:37 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sun, 25 Nov 2012 02:07:37 +0000 Subject: [issue16548] os.system won't run any command and there is no error message when memory cannot be allocated In-Reply-To: <1353794653.18.0.461930270371.issue16548@psf.upfronthosting.co.za> Message-ID: <1353809257.62.0.733398315721.issue16548@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: If Unix system call "system()" fails, it will return -1. Python should convert a -1 to the appropiate exception, checking "errno". In Solaris, for instance, "system()" is documented to fail if the max number of processes are reached, if the syscall was interrupted or if the OS doesn't have enough memory. Currently, python "os.system()" will signal an error returning "-1", instead of raising an exception. Python 2.6 is open only for security fixes, retargetting 2.7, 3.2, 3.3 and 3.4. Opinions? ---------- nosy: +jcea versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 03:58:51 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 25 Nov 2012 02:58:51 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1353812331.14.0.620661129612.issue15990@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I'm attaching a patch that preserves the structure of the previous patch but that builds on the wording and formatting. The patch also addresses many of the comments on Rietveld. I will also publish some comment replies on Rietveld (to the previous patch) that will give background on some of the changes made by this patch. ---------- Added file: http://bugs.python.org/file28101/issue-15990-4-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 05:52:27 2012 From: report at bugs.python.org (Wade Tattersall) Date: Sun, 25 Nov 2012 04:52:27 +0000 Subject: [issue1286] fileinput, StringIO, and cStringIO do not support the with protocol In-Reply-To: <1192538556.96.0.72107595061.issue1286@psf.upfronthosting.co.za> Message-ID: <1353819147.18.0.466906407543.issue1286@psf.upfronthosting.co.za> Wade Tattersall added the comment: Any chance this patch could be applied to version 2.7? It's still an issue in 2.7.3, even though a suitable patch was supplied 3 years ago. I understand that it's fixed in python3, but for us poor maintainers of ancient code, it would be convenient to be able to do things like with StringIO() as test: test.write("hi!") return test.getvalue() ---------- nosy: +Wade.Tattersall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 06:56:56 2012 From: report at bugs.python.org (Roger Serwy) Date: Sun, 25 Nov 2012 05:56:56 +0000 Subject: [issue16547] IDLE segfaults in tkinter after fresh file's text has been rendered In-Reply-To: <1353785000.68.0.88975991365.issue16547@psf.upfronthosting.co.za> Message-ID: <1353823016.81.0.722682669501.issue16547@psf.upfronthosting.co.za> Roger Serwy added the comment: On Mac, which version of Tk are you using? IDLE is known to have problems on Mac with Tk. See http://www.python.org/download/mac/tcltk/ You can disable colorization with the undocumented Ctrl+/ key combination. Does the crash still occur with the colorizer disabled before opening the file? I am unable to reproduce this bug on Arch Linux. ---------- nosy: +ned.deily, serhiy.storchaka, serwy, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 07:08:32 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 25 Nov 2012 06:08:32 +0000 Subject: [issue16209] add a "class str" entry to the docs In-Reply-To: <1350032597.23.0.0536115574586.issue16209@psf.upfronthosting.co.za> Message-ID: <1353823712.78.0.261768997682.issue16209@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching patch. Adding Nick to the nosy list because he did the work of originally breaking out the "Text Sequence Type" section for issue #4966, as well as Terry who created that issue. I view the current issue and patch as a progression of some of the issues discussed in that issue. ---------- keywords: +patch nosy: +ncoghlan, terry.reedy stage: -> patch review Added file: http://bugs.python.org/file28102/issue-16209-1-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 09:38:12 2012 From: report at bugs.python.org (Ned Deily) Date: Sun, 25 Nov 2012 08:38:12 +0000 Subject: [issue16547] IDLE segfaults in tkinter after fresh file's text has been rendered In-Reply-To: <1353785000.68.0.88975991365.issue16547@psf.upfronthosting.co.za> Message-ID: <1353832692.56.0.986357982863.issue16547@psf.upfronthosting.co.za> Ned Deily added the comment: >From the backtrace it shows you are linking with the Apple-supplied Tk (/System/Library/Frameworks/Tk.framework/Versions/8.5/Tk) framework. The Apple-supplied Tk 8.5 in OS X 10.6 was the first release of the Cocoa Aqua Tk. It has proven to be unusable with Python Tkinter and IDLE. There have been numerous Python issues opened about it. If you wish to use Tkinter on OS X 10.6, you should either supply and link with a different Tk 8.5, such as the ActiveState Tcl 8.5 or one you build yourself (either Cocoa, Carbon, or X11) or, if you don't need 64-bit support, link with the Apple-supplied Carbon Tk 8.4. See http://www.python.org/download/mac/tcltk/ for current recommendations. That said, it wouldn't explain crashes on Windows (can you produce a trace for that?) and there's no guarantee you won't run into other bugs using a more recent Tk on OS X. But you'll most likely be wasting your time if you try to debug anything with the Apple Tk 8.5 in 10.6. Any Tk problems you find should be reported on one of the Tcl/Tk mailing lists, for example, the Mac-specific Tcl list (most easily accessed here: http://dir.gmane.org/gmane.comp.lang.tcl.mac) or the Tk bug tracker (http://tcl.sourceforge.net). Unless there is evidence that Python is doing something wrong and you can provide a reproducible test case, this issue should be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 10:55:52 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 09:55:52 +0000 Subject: [issue16546] ast.YieldFrom needlessly has its expr value as optional In-Reply-To: <1353710555.66.0.299462157611.issue16546@psf.upfronthosting.co.za> Message-ID: <1353837352.72.0.75279970039.issue16546@psf.upfronthosting.co.za> Mark Dickinson added the comment: New patch: move new test to the correct test class. ---------- Added file: http://bugs.python.org/file28103/issue16546_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 11:22:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 10:22:04 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1353838924.15.0.573512355952.issue4591@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. The converters declaration moved to the new file Modules/posixmodule.h (Modules/grpmodule.c, Modules/posixmodule.c, Modules/pwdmodule.c, and Modules/signalmodule.c use it) and the implementation moved to Modules/posixmodule.c. ---------- Added file: http://bugs.python.org/file28104/posix_uid_gid_conv_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 11:23:03 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 10:23:03 +0000 Subject: [issue16483] Make int(float('inf')) raise ValueError rather than OverflowError. In-Reply-To: <1353014232.58.0.902552345028.issue16483@psf.upfronthosting.co.za> Message-ID: <1353838983.15.0.261712412261.issue16483@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing as won't fix. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 11:43:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 10:43:34 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1353840214.93.0.336262242642.issue4591@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The value -1 is used is some functions like chown() (to only change the user, only the group or none, to check if you are allowed or not). How do you handle this value? Yes, there is a special case for -1. Look at the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 11:47:22 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 25 Nov 2012 10:47:22 +0000 Subject: [issue16209] add a "class str" entry to the docs In-Reply-To: <1350032597.23.0.0536115574586.issue16209@psf.upfronthosting.co.za> Message-ID: <1353840442.45.0.713701045636.issue16209@psf.upfronthosting.co.za> Nick Coghlan added the comment: Right, aside from my recent revamp, much of the existing layout of the types section has been inherited from the pre-new style classes days when you *couldn't* inherit from types, and strings were the only one with a non-trivial number of methods. Rearranging as Chris suggests makes sense to me - my work was certainly only intended to be the *start* of improvements to the builtin type docs. The main thing to watch out for is ensuring we don't break any incoming deep links while rearranging things (perhaps by adding the appropriate explicit anchor targets). It's OK if some cases end up just linking to the page (e.g. that's what now happens to reference to the old monolithic sequence types section, as there's no obviously better destination), but in this case the old deep links should go to the new class docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 11:51:45 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 25 Nov 2012 10:51:45 +0000 Subject: [issue16209] add a "class str" entry to the docs In-Reply-To: <1350032597.23.0.0536115574586.issue16209@psf.upfronthosting.co.za> Message-ID: <1353840705.24.0.477690366558.issue16209@psf.upfronthosting.co.za> Nick Coghlan added the comment: The simpler approach Chris has taken here (i.e. just leaving the string methods separate from the class definition) also works. Patch looks good to me - I'm definitely in favour of moving towards a more consistent approach of having the builtin function definitions reference to full class definitions (as shown by the changes I made to the docs for the other sequence types). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 12:06:31 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 11:06:31 +0000 Subject: [issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2? In-Reply-To: <1351359067.41.0.359232821509.issue16339@psf.upfronthosting.co.za> Message-ID: <1353841591.17.0.87120597309.issue16339@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch for the documentation and tests. ---------- keywords: +patch Added file: http://bugs.python.org/file28105/issue16339.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 12:07:26 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 11:07:26 +0000 Subject: [issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2? In-Reply-To: <1351359067.41.0.359232821509.issue16339@psf.upfronthosting.co.za> Message-ID: <1353841646.32.0.546203201558.issue16339@psf.upfronthosting.co.za> Changes by Mark Dickinson : Added file: http://bugs.python.org/file28106/issue16339.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 12:07:35 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 11:07:35 +0000 Subject: [issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2? In-Reply-To: <1351359067.41.0.359232821509.issue16339@psf.upfronthosting.co.za> Message-ID: <1353841655.11.0.447769542618.issue16339@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file28105/issue16339.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 12:20:16 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 11:20:16 +0000 Subject: [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1353842416.17.0.224652248909.issue8824@psf.upfronthosting.co.za> Mark Dickinson added the comment: Should this be closed as a duplicate of issue #13557? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 12:23:38 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 11:23:38 +0000 Subject: [issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2? In-Reply-To: <1351359067.41.0.359232821509.issue16339@psf.upfronthosting.co.za> Message-ID: <1353842618.77.0.522142000562.issue16339@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 12:40:29 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 11:40:29 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353843629.66.0.515233607083.issue16496@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch: adds in the missing checks for PyMem_Malloc errors. ---------- Added file: http://bugs.python.org/file28107/random_seed_metd2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 12:59:22 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 11:59:22 +0000 Subject: [issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2? In-Reply-To: <1351359067.41.0.359232821509.issue16339@psf.upfronthosting.co.za> Message-ID: <1353844762.92.0.347736559544.issue16339@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch: drops mention of backwards compatibility, since that's not so useful (thanks, Ezio!). Adds note about resemblance to Python 3 code. ---------- Added file: http://bugs.python.org/file28108/issue16339_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 13:06:26 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 12:06:26 +0000 Subject: [issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2? In-Reply-To: <1351359067.41.0.359232821509.issue16339@psf.upfronthosting.co.za> Message-ID: <1353845186.1.0.116222397239.issue16339@psf.upfronthosting.co.za> Mark Dickinson added the comment: Rewording the sentence about Python 3. ---------- Added file: http://bugs.python.org/file28109/issue16339_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 13:17:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 12:17:16 +0000 Subject: [issue16550] pickletools.py treats 32bit lengths as signed, but pickle.py as unsigned Message-ID: <1353845836.76.0.0245039537422.issue16550@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Since issue12848 some lengths in pickle module treated as unsigned, however pyckletools module treats all 32-bit lengths as signed. The proposed patch adds support of unsigned 32-bit lengths. ---------- components: Library (Lib) files: pickletools_uint4.patch keywords: patch messages: 176344 nosy: alexandre.vassalotti, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: pickletools.py treats 32bit lengths as signed, but pickle.py as unsigned type: behavior versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28110/pickletools_uint4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 13:17:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 12:17:36 +0000 Subject: [issue16551] Cleanup the pure Python pickle implementation Message-ID: <1353845856.16.0.80578311869.issue16551@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: This issue inspired by issue12848. The proposed patch get rid of the marshal module (the struct module used instead), removes some redundant code, and changes the code to use more modern idioms. ---------- components: Library (Lib) files: pickle_cleanup.patch keywords: patch messages: 176345 nosy: alexandre.vassalotti, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Cleanup the pure Python pickle implementation type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28111/pickle_cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 13:41:13 2012 From: report at bugs.python.org (Jyrki Pulliainen) Date: Sun, 25 Nov 2012 12:41:13 +0000 Subject: [issue15132] Let unittest.TestProgram()'s defaultTest argument be a list In-Reply-To: <1340353530.68.0.240528814016.issue15132@psf.upfronthosting.co.za> Message-ID: <1353847273.34.0.151345963497.issue15132@psf.upfronthosting.co.za> Jyrki Pulliainen added the comment: I rebased this change on top of 3.4 and in case of an iterable argument it now uses the _convert_names function to convert it to a list of test names. ---------- Added file: http://bugs.python.org/file28112/issue15132_py3_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 13:42:11 2012 From: report at bugs.python.org (Jyrki Pulliainen) Date: Sun, 25 Nov 2012 12:42:11 +0000 Subject: [issue15132] Let unittest.TestProgram()'s defaultTest argument be a list In-Reply-To: <1340353530.68.0.240528814016.issue15132@psf.upfronthosting.co.za> Message-ID: <1353847331.32.0.608509929587.issue15132@psf.upfronthosting.co.za> Changes by Jyrki Pulliainen : Removed file: http://bugs.python.org/file27681/issue15132_py2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 14:10:35 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 25 Nov 2012 13:10:35 +0000 Subject: [issue16548] os.system won't run any command and there is no error message when memory cannot be allocated In-Reply-To: <1353794653.18.0.461930270371.issue16548@psf.upfronthosting.co.za> Message-ID: <1353849035.66.0.6741385839.issue16548@psf.upfronthosting.co.za> Ramchandra Apte added the comment: +1 on exception ---------- nosy: +ramchandra.apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 14:22:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 13:22:05 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353849725.9.0.559813028801.issue16333@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think the code should fixed. You can use separators=(',', ': ') with indentation. Perhaps the documentation should contains such suggestion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 14:26:06 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 25 Nov 2012 13:26:06 +0000 Subject: [issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2? In-Reply-To: <1351359067.41.0.359232821509.issue16339@psf.upfronthosting.co.za> Message-ID: <3Y8X8F34tTzRWh@mail.python.org> Roundup Robot added the comment: New changeset fd9c9579050d by Mark Dickinson in branch '2.7': Issue #16339: Document and test exec(stmt, globals, locals) form in Python 2.7. http://hg.python.org/cpython/rev/fd9c9579050d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 14:28:34 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 13:28:34 +0000 Subject: [issue16339] Document "exec(stmt, global_dict, local_dict)" form in Python 2? In-Reply-To: <1351359067.41.0.359232821509.issue16339@psf.upfronthosting.co.za> Message-ID: <1353850113.96.0.999648262786.issue16339@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 14:31:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 13:31:51 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <1353850311.14.0.509877725535.issue16549@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a simple patch. ---------- keywords: +patch nosy: +serhiy.storchaka versions: +Python 3.4 -Python 3.1 Added file: http://bugs.python.org/file28113/json_tool_open.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 14:32:57 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 25 Nov 2012 13:32:57 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353850377.63.0.578510333679.issue16333@psf.upfronthosting.co.za> anatoly techtonik added the comment: Would you mind providing some counter-arguments? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 14:33:15 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 13:33:15 +0000 Subject: [issue16548] os.system won't run any command and there is no error message when memory cannot be allocated In-Reply-To: <1353794653.18.0.461930270371.issue16548@psf.upfronthosting.co.za> Message-ID: <1353850395.56.0.237364709126.issue16548@psf.upfronthosting.co.za> Mark Dickinson added the comment: -1 on an exception. This would be a backwards-incompatible API change, so could only happen in Python 3.4. os.system is well documented, including a recommendation to use the subprocess module instead. Reclassifying as a feature request, since this isn't a bug. In any case, I think this should be rejected. ---------- nosy: +mark.dickinson type: behavior -> enhancement versions: -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 14:36:57 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 25 Nov 2012 13:36:57 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353850617.54.0.824556386491.issue16333@psf.upfronthosting.co.za> anatoly techtonik added the comment: Trailing whitespace produce visual warnings in diff comparison tools. If you have to read docs on how fix every piece of code that produces readable JSON to avoid this warnings, it is a very-very bad user experience. The argument that by default the output with indent option should be human-friendly. Don't you agree with that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 14:38:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 25 Nov 2012 13:38:05 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <1353850685.39.0.233837048784.issue16549@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: -> ezio.melotti nosy: +ezio.melotti stage: needs patch -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 14:59:59 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 25 Nov 2012 13:59:59 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1353851999.21.0.530409964467.issue4945@psf.upfronthosting.co.za> anatoly techtonik added the comment: +1 for all branches. Is that handling of booleans PEPified somewhere? ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 15:02:33 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 14:02:33 +0000 Subject: [issue14478] Decimal hashing very slow, could be cached In-Reply-To: <1333386986.79.0.369810234487.issue14478@psf.upfronthosting.co.za> Message-ID: <1353852153.59.0.0583506605397.issue14478@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing as fixed (for the C version, at least). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 15:21:15 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 25 Nov 2012 14:21:15 +0000 Subject: [issue1569040] Speed up using + for string concatenation Message-ID: <1353853275.32.0.670357087015.issue1569040@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Buuump. ---------- nosy: +ramchandra.apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 15:23:22 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 25 Nov 2012 14:23:22 +0000 Subject: [issue2537] re.compile(r'((x|y+)*)*') should fail In-Reply-To: <1207157766.7.0.917289707609.issue2537@psf.upfronthosting.co.za> Message-ID: <1353853402.21.0.115927534092.issue2537@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- components: +Library (Lib) -Regular Expressions versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 15:26:00 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 25 Nov 2012 14:26:00 +0000 Subject: [issue1569040] Speed up using + for string concatenation Message-ID: <1353853560.69.0.0158282618088.issue1569040@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This issue hasn't been touched in years and would certainly need a completely new patch. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 15:30:25 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 25 Nov 2012 14:30:25 +0000 Subject: [issue3410] platform.version() don't work as expected in Vista in portuguese In-Reply-To: <1216410595.08.0.936182141358.issue3410@psf.upfronthosting.co.za> Message-ID: <1353853825.9.0.845086050555.issue3410@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Beemp. ---------- nosy: +ramchandra.apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 15:36:02 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 25 Nov 2012 14:36:02 +0000 Subject: [issue3410] platform.version() don't work as expected in Vista in portuguese In-Reply-To: <1216410595.08.0.936182141358.issue3410@psf.upfronthosting.co.za> Message-ID: <1353854162.16.0.26719972774.issue3410@psf.upfronthosting.co.za> Ezio Melotti added the comment: I couldn't find a non-English Windows machine to test this, so I'm just going to close it. Feel free to reopen it or create a new issue if there are other problems. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 15:40:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 25 Nov 2012 14:40:36 +0000 Subject: [issue16546] ast.YieldFrom needlessly has its expr value as optional In-Reply-To: <1353710555.66.0.299462157611.issue16546@psf.upfronthosting.co.za> Message-ID: <3Y8YpC44pyzRYj@mail.python.org> Roundup Robot added the comment: New changeset ffb2fa900cb7 by Mark Dickinson in branch '3.3': Issue #16546: make ast.YieldFrom argument mandatory. http://hg.python.org/cpython/rev/ffb2fa900cb7 New changeset 9bc6e157475a by Mark Dickinson in branch 'default': Issue #16546: merge fix from 3.3 http://hg.python.org/cpython/rev/9bc6e157475a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 15:41:09 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 Nov 2012 14:41:09 +0000 Subject: [issue1286] fileinput, StringIO, and cStringIO do not support the with protocol In-Reply-To: <1192538556.96.0.72107595061.issue1286@psf.upfronthosting.co.za> Message-ID: <1353854469.4.0.764604034958.issue1286@psf.upfronthosting.co.za> Georg Brandl added the comment: It would be a new feature, and as such forbidden to add in maintenance releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 15:41:09 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 14:41:09 +0000 Subject: [issue16546] ast.YieldFrom needlessly has its expr value as optional In-Reply-To: <1353710555.66.0.299462157611.issue16546@psf.upfronthosting.co.za> Message-ID: <1353854469.65.0.280242629407.issue16546@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 15:45:43 2012 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 25 Nov 2012 14:45:43 +0000 Subject: [issue16521] logging.basicConfig creates empty file when using handlers In-Reply-To: <1353500301.35.0.410282518937.issue16521@psf.upfronthosting.co.za> Message-ID: <1353854743.82.0.0453803804507.issue16521@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- assignee: -> vinay.sajip nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 16:12:53 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 15:12:53 +0000 Subject: [issue2537] re.compile(r'((x|y+)*)*') should fail In-Reply-To: <1207157766.7.0.917289707609.issue2537@psf.upfronthosting.co.za> Message-ID: <1353856373.07.0.215340621013.issue2537@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 16:15:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 15:15:09 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353856509.5.0.0935369547284.issue16333@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What you think about default separators will be (', ', ': ') if indent is None and (',', ': ') if indent is not None? This will allow indent options be human-friendly and keep the flexibility to specify arbitrary separators if they needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 16:17:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 25 Nov 2012 15:17:37 +0000 Subject: [issue16521] logging.basicConfig creates empty file when using handlers In-Reply-To: <1353500301.35.0.410282518937.issue16521@psf.upfronthosting.co.za> Message-ID: <3Y8Zcx0nCTzRZL@mail.python.org> Roundup Robot added the comment: New changeset d7660ccd8470 by Vinay Sajip in branch '3.2': Closes #16521: Improved error handling for basicConfig(), added tests for same. http://hg.python.org/cpython/rev/d7660ccd8470 New changeset 4b522a1c9c27 by Vinay Sajip in branch '3.3': Null merge for fix for #16521. http://hg.python.org/cpython/rev/4b522a1c9c27 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 16:18:18 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 15:18:18 +0000 Subject: [issue9011] ast_for_factor unary minus optimization changes AST In-Reply-To: <1276702740.62.0.249201197468.issue9011@psf.upfronthosting.co.za> Message-ID: <1353856698.91.0.386720308398.issue9011@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 16:18:30 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 25 Nov 2012 15:18:30 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <1353856710.78.0.990449713496.issue16549@psf.upfronthosting.co.za> Berker Peksag added the comment: Lib/json/tool.py is triggering a ResourceWarning. Patch attached with a test. ---------- nosy: +berker.peksag Added file: http://bugs.python.org/file28114/issue16549.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 16:22:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 15:22:41 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353850685.42.0.244418506761.issue16549@psf.upfronthosting.co.za> Message-ID: <201211251722.27857.storchaka@gmail.com> Serhiy Storchaka added the comment: Tests added. They fail until issue16333 will be resolved. ---------- Added file: http://bugs.python.org/file28115/json_tool_tests.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r aac6b313ef5f Lib/test/json_tests/test_tool.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Lib/test/json_tests/test_tool.py Sun Nov 25 17:03:12 2012 +0200 @@ -0,0 +1,53 @@ +import os +import textwrap +import unittest +from test import support +from test.script_helper import assert_python_ok +from test.support import TESTFN + +class TestTool(unittest.TestCase): + data = """ + + [["blorpie"],[ "whoops" ] , [ + ],\t"d-shtaeou",\r"d-nthiouh", + "i-vhbjkhnth", {"nifty":87}, {"morefield" :\tfalse,"field" + :"yes"} ] + """ + + expect = textwrap.dedent("""\ + [ + [ + "blorpie" + ], + [ + "whoops" + ], + [], + "d-shtaeou", + "d-nthiouh", + "i-vhbjkhnth", + { + "nifty": 87 + }, + { + "field": "yes", + "morefield": false + } + ] + """) + + def test_tool(self): + infile = support.TESTFN + with open(infile, "w") as fp: + self.addCleanup(os.remove, infile) + fp.write(self.data) + rc, out, err = assert_python_ok('-m', 'json.tool', infile) + self.assertEqual(out, self.expect.encode()) + self.assertEqual(err, b'') + outfile = support.TESTFN + '.out' + rc, out, err = assert_python_ok('-m', 'json.tool', infile, outfile) + self.addCleanup(os.remove, outfile) + with open(outfile, "r") as fp: + self.assertEqual(fp.read(), self.expect) + self.assertEqual(out, b'') + self.assertEqual(err, b'') From report at bugs.python.org Sun Nov 25 16:25:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 15:25:08 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <1353857108.74.0.235816950377.issue16549@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oops. This issue becomes very popular. ---------- dependencies: +Trailing whitespace in json dump when using indent stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 16:41:00 2012 From: report at bugs.python.org (Catalin Iacob) Date: Sun, 25 Nov 2012 15:41:00 +0000 Subject: [issue8745] zipimport is a bit slow In-Reply-To: <1274162892.24.0.612432614461.issue8745@psf.upfronthosting.co.za> Message-ID: <1353858060.67.0.23605694509.issue8745@psf.upfronthosting.co.za> Catalin Iacob added the comment: I tried Serhiy's suggestion in msg174934, see attached attempt-fseek-seek_cur.patch updated to current default. It makes no difference relative to the default branch for my test stdlib.zip, dummy reads still work better on Windows. This makes sense if you follow the CRT's implementation, fseek calls _fseek_nolock which always calls _flush, regardless whether SEEK_CUR is used or not. This is the case with both VS2008 and VS2010. So this patch is a workaround for poor fseek performance in Microsoft's CRT, it doesn't cause performance issues on Linux but saves quite some milliseconds of startup time so I think it's worth the tradeoff. I'll also upload zipimport_speedup-v3.patch updated to apply to current default and with error handling for failing freads since the fseeks that the patch replaces have gained error handling on the default branch in the mean time. The timings remain the same on my Windows machine: around 30ms for default branch, around 15ms with patch. ---------- Added file: http://bugs.python.org/file28116/attempt-fseek-seek_cur.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 16:41:13 2012 From: report at bugs.python.org (Catalin Iacob) Date: Sun, 25 Nov 2012 15:41:13 +0000 Subject: [issue8745] zipimport is a bit slow In-Reply-To: <1274162892.24.0.612432614461.issue8745@psf.upfronthosting.co.za> Message-ID: <1353858073.57.0.604147836747.issue8745@psf.upfronthosting.co.za> Changes by Catalin Iacob : Added file: http://bugs.python.org/file28117/zipimport-speedup-v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 16:47:41 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 25 Nov 2012 15:47:41 +0000 Subject: [issue2537] re.compile(r'((x|y+)*)*') should fail In-Reply-To: <1207157766.7.0.917289707609.issue2537@psf.upfronthosting.co.za> Message-ID: <1353858461.11.0.949872002603.issue2537@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Regular Expressions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 17:00:42 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 16:00:42 +0000 Subject: [issue9011] ast_for_factor unary minus optimization changes AST In-Reply-To: <1276702740.62.0.249201197468.issue9011@psf.upfronthosting.co.za> Message-ID: <1353859242.49.0.898461429772.issue9011@psf.upfronthosting.co.za> Mark Dickinson added the comment: New patch. ---------- assignee: -> mark.dickinson Added file: http://bugs.python.org/file28118/issue9011_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 17:16:33 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 25 Nov 2012 16:16:33 +0000 Subject: [issue6744] calling kevent repr raises a TypeError In-Reply-To: <1250800889.41.0.974799993123.issue6744@psf.upfronthosting.co.za> Message-ID: <1353860193.01.0.172132478037.issue6744@psf.upfronthosting.co.za> Berker Peksag added the comment: The bug has been fixed in issue 7211. Related changeset: http://hg.python.org/cpython/rev/f89a93a778a8#l4.63 See the output of kevent-repr-test.py(tested in 3.2.3 and 3.3.0): I think this can be closed as out of date. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 17:28:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 16:28:33 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1353860913.8.0.960916923077.issue4945@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually most proposed changes were already committed, only the documentation left. Here is an updated and fixed patch for 3.x. ---------- components: +Documentation -Library (Lib) nosy: +serhiy.storchaka versions: +Python 3.4 Added file: http://bugs.python.org/file28119/json_doc_truefalse.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 17:29:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 16:29:13 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1353860953.07.0.654701649795.issue4945@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28120/json_doc_truefalse-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 17:47:48 2012 From: report at bugs.python.org (Catalin Iacob) Date: Sun, 25 Nov 2012 16:47:48 +0000 Subject: [issue16472] Distutils+mingw links agains msvcr90, while python27.dll is linked agains msvcrt In-Reply-To: <1352900041.91.0.554679168644.issue16472@psf.upfronthosting.co.za> Message-ID: <1353862068.92.0.908031657048.issue16472@psf.upfronthosting.co.za> Catalin Iacob added the comment: V?clav, are you sure about the official python27.dll being linked against msvcrt.dll? Maybe this is your own python27.dll compiled with MinGW? I see the opposite: for both C:\windows\system32\python27.dll (64 bit) and c:\windows\SysWOW64\python27.dll (32 bit) from the Windows 2.7.3 installer, Dependency Walker shows they are linked against msvcr90.dll. This is probably also the reason why distutils links extensions against msvcr90.dll, exactly to avoid linking against 2 different CRTs. ---------- nosy: +catalin.iacob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 17:57:14 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 25 Nov 2012 16:57:14 +0000 Subject: [issue16543] improve TypeError messages for missing arguments (meta issue) In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353862634.41.0.420866571411.issue16543@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #15201. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 18:02:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 17:02:32 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353862952.34.0.555977280388.issue16333@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The proposed patch changes default *separators* value to (',', ': ') if *indent* is not None. ---------- Added file: http://bugs.python.org/file28121/json_indent_separators_default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 18:05:13 2012 From: report at bugs.python.org (Sebastian Kraft) Date: Sun, 25 Nov 2012 17:05:13 +0000 Subject: [issue16525] wave file module does not support 32bit float format In-Reply-To: <1353528827.37.0.543069044809.issue16525@psf.upfronthosting.co.za> Message-ID: <1353863113.23.0.499353353801.issue16525@psf.upfronthosting.co.za> Sebastian Kraft added the comment: Attached to this mail you find my patch for the implementation of support for 8, 16, 24, 32 bit signed int PCM and 32, 64 bit float. 24bit on big endian systems is buggy, but this will be reported in another ticket. The modified test checks all number formats apart form 24bit int. If the patch is fine and will be accepted I will also update the doc and send a seperate patch for this. ---------- keywords: +patch Added file: http://bugs.python.org/file28122/wave_float_issue16525.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 18:11:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 25 Nov 2012 17:11:43 +0000 Subject: [issue9011] ast_for_factor unary minus optimization changes AST In-Reply-To: <1276702740.62.0.249201197468.issue9011@psf.upfronthosting.co.za> Message-ID: <3Y8d8b1GYVzRVh@mail.python.org> Roundup Robot added the comment: New changeset ea36de7926f8 by Mark Dickinson in branch '2.7': Issue #9011: AST creation no longer modifies CST for negated numeric literals. http://hg.python.org/cpython/rev/ea36de7926f8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 18:12:08 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 17:12:08 +0000 Subject: [issue9011] ast_for_factor unary minus optimization changes AST In-Reply-To: <1276702740.62.0.249201197468.issue9011@psf.upfronthosting.co.za> Message-ID: <1353863528.95.0.855473107493.issue9011@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 18:18:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 17:18:09 +0000 Subject: [issue8745] zipimport is a bit slow In-Reply-To: <1274162892.24.0.612432614461.issue8745@psf.upfronthosting.co.za> Message-ID: <1353863889.0.0.214163244795.issue8745@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > So this patch is a workaround for poor fseek performance in Microsoft's CRT, it doesn't cause performance issues on Linux but saves quite some milliseconds of startup time so I think it's worth the tradeoff. I think some clarifying comments will be good in the code. In particular about the `dummy` variable. >?I'll also upload zipimport_speedup-v3.patch updated to apply to current default and with error handling for failing freads since the fseeks that the patch replaces have gained error handling on the default branch in the mean time. Perhaps getc() requires error handling too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 18:22:02 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 25 Nov 2012 17:22:02 +0000 Subject: [issue16209] add a "class str" entry to the docs In-Reply-To: <1350032597.23.0.0536115574586.issue16209@psf.upfronthosting.co.za> Message-ID: <1353864122.65.0.31775494776.issue16209@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > The simpler approach Chris has taken here (i.e. just leaving the string methods separate from the class definition) also works. Yes, though I mentioned nesting the string methods beneath the class entry in the original post for this issue, I figured we could start smaller and do this in more manageable steps. We can do the bigger change (in the sense of being a bigger diff) of indenting as part of a second issue/patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 18:25:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 17:25:47 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <1353864347.73.0.298540390354.issue16549@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Berker and me wrote the different tests. I were add a separate test file because json.tool should not be tested for both C and Python implementation and because json tests already splitted on many files. Berker tests using json.tool as a filter. Both tests should be merged. Of course, using a `with` for open files is a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 18:49:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 17:49:37 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <1353865777.07.0.598651844305.issue16549@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a merged tests. ---------- Added file: http://bugs.python.org/file28123/json_tool_tests_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 19:03:32 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 18:03:32 +0000 Subject: [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1353866612.75.0.971741179064.issue8824@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> duplicate status: open -> closed superseder: -> exec of list comprehension fails on NameError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 19:07:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 25 Nov 2012 18:07:56 +0000 Subject: [issue16209] add a "class str" entry to the docs In-Reply-To: <1350032597.23.0.0536115574586.issue16209@psf.upfronthosting.co.za> Message-ID: <1353866876.91.0.433712649315.issue16209@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Updating patch to fix up affected/related index entries. ---------- Added file: http://bugs.python.org/file28124/issue-16209-2-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 19:18:05 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 25 Nov 2012 18:18:05 +0000 Subject: [issue15132] Let unittest.TestProgram()'s defaultTest argument be a list In-Reply-To: <1340353530.68.0.240528814016.issue15132@psf.upfronthosting.co.za> Message-ID: <1353867485.76.0.313978825876.issue15132@psf.upfronthosting.co.za> Chris Jerdonek added the comment: To clarify, I didn't say that _convert_names() should be used. I was just noting that it returns a list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 19:31:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 18:31:43 +0000 Subject: [issue10855] wave.Wave_read.close() doesn't release file In-Reply-To: <1294417424.98.0.47429499245.issue10855@psf.upfronthosting.co.za> Message-ID: <1353868303.81.0.659764653246.issue10855@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I am not sure, should this issue be closed as "rejected" because the suggested patch for Lib/wave.py was rejected, or as "fixed" because Georg was committed the documentation patch (changeset 8239ec6f39e6) for this issue? ---------- nosy: +serhiy.storchaka status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 19:50:36 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 25 Nov 2012 18:50:36 +0000 Subject: [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1353869436.68.0.229612515409.issue8824@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I suggested more change here than I committed in #13557. I would like to think about the extra a bit more. The issue about def in exec just came up again on python-list, but I do not really like the third sentence I suggested. ---------- assignee: docs at python -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 19:51:54 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Nov 2012 18:51:54 +0000 Subject: [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1353869514.52.0.18239744734.issue8824@psf.upfronthosting.co.za> Mark Dickinson added the comment: Okay; sorry about that. Reopening. ---------- resolution: duplicate -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 20:02:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 19:02:03 +0000 Subject: [issue6584] gzip module has no custom exception In-Reply-To: <1248675050.27.0.747048824781.issue6584@psf.upfronthosting.co.za> Message-ID: <1353870123.76.0.0930643594813.issue6584@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I?added some comments on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 20:47:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 25 Nov 2012 19:47:03 +0000 Subject: [issue16552] os.path.basename() docs should link to os.path.split() Message-ID: <1353872823.17.0.910563008076.issue16552@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The docs for os.path.abspath(), os.path.basename(), and os.path.dirname(): http://docs.python.org/dev/library/os.path.html#os.path.abspath should hyperlink to os.path.normpath() and os.path.split() as appropriate for easier navigability. ---------- assignee: docs at python components: Documentation keywords: easy messages: 176386 nosy: chris.jerdonek, docs at python priority: normal severity: normal stage: needs patch status: open title: os.path.basename() docs should link to os.path.split() type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 21:38:07 2012 From: report at bugs.python.org (yop) Date: Sun, 25 Nov 2012 20:38:07 +0000 Subject: [issue16553] named kwd form of OrderedDict ctor yield random key order Message-ID: <1353875887.57.0.785753219375.issue16553@psf.upfronthosting.co.za> New submission from yop: tested on 2.7.3 with -R or stock 3.3, the following: OrderedDict(foo=0,bar=0).keys() is nondeterminstic as a result of hash randomization. probably since **kwds creates a dict. what is the proper idiom for constructing an ordered-key dictionary other then (ugly, verbose) piecemeal insertion? ---------- components: Library (Lib) messages: 176387 nosy: benjamin.peterson, rhettinger, yop priority: normal severity: normal status: open title: named kwd form of OrderedDict ctor yield random key order versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 21:41:19 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 25 Nov 2012 20:41:19 +0000 Subject: [issue16553] named kwd form of OrderedDict ctor yield random key order In-Reply-To: <1353875887.57.0.785753219375.issue16553@psf.upfronthosting.co.za> Message-ID: <1353876079.96.0.463503804147.issue16553@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It's random anyway, since keyword arguments have no order. You can use a tuple. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 21:41:27 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 25 Nov 2012 20:41:27 +0000 Subject: [issue16553] named kwd form of OrderedDict ctor yield random key order In-Reply-To: <1353875887.57.0.785753219375.issue16553@psf.upfronthosting.co.za> Message-ID: <1353876087.96.0.955995188879.issue16553@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 21:47:02 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 Nov 2012 20:47:02 +0000 Subject: [issue10855] wave.Wave_read.close() doesn't release file In-Reply-To: <1294417424.98.0.47429499245.issue10855@psf.upfronthosting.co.za> Message-ID: <1353876422.39.0.811039067056.issue10855@psf.upfronthosting.co.za> Georg Brandl added the comment: I say "fixed": there was a bug (undocumented, but correct behavior) and that was fixed. ---------- resolution: rejected -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 22:16:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Nov 2012 21:16:22 +0000 Subject: [issue10855] wave.Wave_read.close() doesn't release file In-Reply-To: <1294417424.98.0.47429499245.issue10855@psf.upfronthosting.co.za> Message-ID: <1353878182.59.0.725382425228.issue10855@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 25 23:15:40 2012 From: report at bugs.python.org (Daniel Urban) Date: Sun, 25 Nov 2012 22:15:40 +0000 Subject: [issue16554] The description of the argument of MAKE_FUNCTION and MAKE_CLOSURE is incorrect Message-ID: <1353881740.2.0.222803994959.issue16554@psf.upfronthosting.co.za> New submission from Daniel Urban: The description of the argument of the MAKE_FUNCTION and MAKE_CLOSURE opcodes in the documentation of the dis module is incorrect. Patch attached. ---------- assignee: docs at python components: Documentation files: make_function_closure.patch keywords: needs review, patch messages: 176390 nosy: daniel.urban, docs at python priority: normal severity: normal stage: patch review status: open title: The description of the argument of MAKE_FUNCTION and MAKE_CLOSURE is incorrect versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28125/make_function_closure.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 00:59:56 2012 From: report at bugs.python.org (Jyrki Pulliainen) Date: Sun, 25 Nov 2012 23:59:56 +0000 Subject: [issue15132] Let unittest.TestProgram()'s defaultTest argument be a list In-Reply-To: <1340353530.68.0.240528814016.issue15132@psf.upfronthosting.co.za> Message-ID: <1353887996.19.0.77069542817.issue15132@psf.upfronthosting.co.za> Jyrki Pulliainen added the comment: Yeah, I added the convert names call mostly to make the behavior the same as with passing things from command line. However, then we should probably wrap the case of str argument to _convert_name and the conversion behavior might be bit too implicit. I added another patch which does not do the convert_names, but just makes it a list ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 01:00:25 2012 From: report at bugs.python.org (Jyrki Pulliainen) Date: Mon, 26 Nov 2012 00:00:25 +0000 Subject: [issue15132] Let unittest.TestProgram()'s defaultTest argument be a list In-Reply-To: <1340353530.68.0.240528814016.issue15132@psf.upfronthosting.co.za> Message-ID: <1353888025.6.0.346677140603.issue15132@psf.upfronthosting.co.za> Changes by Jyrki Pulliainen : Added file: http://bugs.python.org/file28126/issue15132_py3_no_convert.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 02:24:47 2012 From: report at bugs.python.org (=?utf-8?q?Leiser_Fern=C3=A1ndez_Gallo?=) Date: Mon, 26 Nov 2012 01:24:47 +0000 Subject: [issue16555] Add es_cu to locale library. Message-ID: <1353893087.2.0.125230690111.issue16555@psf.upfronthosting.co.za> Changes by Leiser Fern?ndez Gallo : ---------- components: Library (Lib) nosy: Leiser.Fern?ndez.Gallo priority: normal severity: normal status: open title: Add es_cu to locale library. versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 04:22:23 2012 From: report at bugs.python.org (Berker Peksag) Date: Mon, 26 Nov 2012 03:22:23 +0000 Subject: [issue16555] Add es_cu to locale library. Message-ID: <1353900143.47.0.688085135262.issue16555@psf.upfronthosting.co.za> New submission from Berker Peksag: Python 2.7 is in bugfix-only mode. ---------- nosy: +berker.peksag versions: +Python 3.4 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 05:11:33 2012 From: report at bugs.python.org (Taavi Burns) Date: Mon, 26 Nov 2012 04:11:33 +0000 Subject: [issue16556] Update string.Formatter.vformat documentation to say "**kwargs" Message-ID: <1353903093.51.0.301727912961.issue16556@psf.upfronthosting.co.za> New submission from Taavi Burns: The documentation says "**kwds" instead of "**kwargs", which is what the function signature uses. I noticed some other (internally-consistent) occurrences in string.rst. Is there any interest in replacing "**kwds" generally with "**kwargs"? It looks like 327 vs 932 ratio in the docs, and closer to 1185 vs 2361 in the source tree as a whole. Thanks! ---------- assignee: docs at python components: Documentation files: kwds_kwargs.diff keywords: patch messages: 176393 nosy: docs at python, taavi-burns priority: normal severity: normal status: open title: Update string.Formatter.vformat documentation to say "**kwargs" type: enhancement versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file28127/kwds_kwargs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 05:45:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 26 Nov 2012 04:45:09 +0000 Subject: [issue16552] os.path.basename() docs should link to os.path.split() In-Reply-To: <1353872823.17.0.910563008076.issue16552@psf.upfronthosting.co.za> Message-ID: <3Y8wXf4P41zQ7C@mail.python.org> Roundup Robot added the comment: New changeset 580ca5c587f6 by Chris Jerdonek in branch '2.7': Add hyperlinks to the docs of some os.path functions (issue #16552). http://hg.python.org/cpython/rev/580ca5c587f6 New changeset cde59c6acf98 by Chris Jerdonek in branch '3.2': Add hyperlinks to the docs of some os.path functions (issue #16552). http://hg.python.org/cpython/rev/cde59c6acf98 New changeset 3eec2d562df0 by Chris Jerdonek in branch '3.3': Merge from 3.2: add hyperlinks to some os.path function docs (issue #16552). http://hg.python.org/cpython/rev/3eec2d562df0 New changeset 25321e2172ad by Chris Jerdonek in branch 'default': Merge from 3.3: add hyperlinks to some os.path function docs (issue #16552). http://hg.python.org/cpython/rev/25321e2172ad ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 05:47:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 26 Nov 2012 04:47:27 +0000 Subject: [issue16552] os.path.basename() docs should link to os.path.split() In-Reply-To: <1353872823.17.0.910563008076.issue16552@psf.upfronthosting.co.za> Message-ID: <1353905247.09.0.980257061153.issue16552@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 05:54:30 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 26 Nov 2012 04:54:30 +0000 Subject: [issue16555] Add es_cu to locale library. In-Reply-To: <1353900143.47.0.688085135262.issue16555@psf.upfronthosting.co.za> Message-ID: <1353905670.74.0.107292022051.issue16555@psf.upfronthosting.co.za> ?ric Araujo added the comment: Could you expand on the feature request? The Python locale module delegates to the operating system?s locale system; to the best of my knowledge there is no registry of locale names at the Python level. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 06:00:38 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 26 Nov 2012 05:00:38 +0000 Subject: [issue16556] Update string.Formatter.vformat documentation to say "**kwargs" In-Reply-To: <1353903093.51.0.301727912961.issue16556@psf.upfronthosting.co.za> Message-ID: <1353906038.09.0.329827668819.issue16556@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hello Taavi! It seems to me there is little value in changing all docs to use ?**kwargs? instead of ?**kwds?, given that this cannot cause actual problems. The interesting thing is that the function takes keyword args. For string.Formatter.vformat, I see no harm in changing it, but also no value. Core developers tend to resist to aesthetic/cleanup/perfectionism-only changes for the sake of minimizing diff churn, avoiding divergences between versions and not taking unneeded risks (less so for doc changes, but a real concern for code cleanups). Ezio, what do you think? ---------- nosy: +eric.araujo, ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 06:03:21 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 26 Nov 2012 05:03:21 +0000 Subject: [issue16543] improve TypeError messages for missing arguments (meta issue) In-Reply-To: <1353693793.28.0.492811281384.issue16543@psf.upfronthosting.co.za> Message-ID: <1353906201.6.0.393512391351.issue16543@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think it?s Terry who has an enlightening distinction between arguments definition (positional-or-keyword, positional-only, keyword-only, starargs, starkwargs) and function call (positional, keyword, *-unpacked, **-unpacked). It may have been Nick or David though. ---------- nosy: +eric.araujo, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 06:09:07 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 26 Nov 2012 05:09:07 +0000 Subject: [issue16535] json encoder unable to handle decimal In-Reply-To: <1353624338.46.0.574343718645.issue16535@psf.upfronthosting.co.za> Message-ID: <1353906547.77.0.941256441561.issue16535@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the workaround Serhiy, I stole that and ran with it :) For 3.4 I still think something built-in would be best. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 06:09:28 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 26 Nov 2012 05:09:28 +0000 Subject: [issue12217] Cross-link docs for faulthandler, traceback and pdb In-Reply-To: <1306770313.4.0.799430970978.issue12217@psf.upfronthosting.co.za> Message-ID: <1353906568.2.0.483358206411.issue12217@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 06:14:31 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 26 Nov 2012 05:14:31 +0000 Subject: [issue15472] Itertools doc summary table misdocuments some arguments In-Reply-To: <1343413434.71.0.36910737273.issue15472@psf.upfronthosting.co.za> Message-ID: <1353906871.86.0.547294906448.issue15472@psf.upfronthosting.co.za> ?ric Araujo added the comment: cycle was a bad example, but there are other: ifilter, islice, takewhile. "it" (like what tee uses) instead of "seq" would work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 07:40:52 2012 From: report at bugs.python.org (Taavi Burns) Date: Mon, 26 Nov 2012 06:40:52 +0000 Subject: [issue16556] Update string.Formatter.vformat documentation to say "**kwargs" In-Reply-To: <1353903093.51.0.301727912961.issue16556@psf.upfronthosting.co.za> Message-ID: <1353912052.97.0.0480000742288.issue16556@psf.upfronthosting.co.za> Taavi Burns added the comment: The issue of churn is totally fair. I'd still advocate for the attached patch, as it's tiny and fixes an inconsistency between the function signature and the docs that are referring to that signature. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 09:18:22 2012 From: report at bugs.python.org (Lucas Maystre) Date: Mon, 26 Nov 2012 08:18:22 +0000 Subject: [issue11175] allow argparse FileType to accept encoding and errors arguments In-Reply-To: <1297352833.64.0.0994986830559.issue11175@psf.upfronthosting.co.za> Message-ID: <1353917902.25.0.984819658797.issue11175@psf.upfronthosting.co.za> Lucas Maystre added the comment: Is there something I can do something to move this forward? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 09:25:36 2012 From: report at bugs.python.org (Catalin Iacob) Date: Mon, 26 Nov 2012 08:25:36 +0000 Subject: [issue5054] CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed In-Reply-To: <1232897403.01.0.0399148938595.issue5054@psf.upfronthosting.co.za> Message-ID: <1353918336.54.0.584885002157.issue5054@psf.upfronthosting.co.za> Changes by Catalin Iacob : ---------- nosy: +catalin.iacob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 10:00:36 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 26 Nov 2012 09:00:36 +0000 Subject: [issue11175] allow argparse FileType to accept encoding and errors arguments In-Reply-To: <1297352833.64.0.0994986830559.issue11175@psf.upfronthosting.co.za> Message-ID: <1353920436.18.0.532585925823.issue11175@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Since Steven is not responding, I think I can commit it at some point. Thanks for the remainder :) ---------- assignee: -> petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 10:25:44 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 26 Nov 2012 09:25:44 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353921944.97.0.986954252515.issue16333@psf.upfronthosting.co.za> anatoly techtonik added the comment: ',' makes lists less readable, directly the opposite of what the *indent* option is for. The *separators* variable is a insufficient solution, because it was not designed to work with indents. Therefore the original solution to strip trailing space when indent is active is a perfect intuitive default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 11:17:26 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 26 Nov 2012 10:17:26 +0000 Subject: [issue11218] pattern=None when following documentation for load_tests and unittest.main() In-Reply-To: <1297758807.39.0.713611114484.issue11218@psf.upfronthosting.co.za> Message-ID: <1353925046.34.0.809804552178.issue11218@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 12:57:38 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 26 Nov 2012 11:57:38 +0000 Subject: [issue16548] os.system won't run any command and there is no error message when memory cannot be allocated In-Reply-To: <1353794653.18.0.461930270371.issue16548@psf.upfronthosting.co.za> Message-ID: <1353931058.64.0.886681644237.issue16548@psf.upfronthosting.co.za> R. David Murray added the comment: Agree with the rejection. os.system is intended to be a minimal wrapper around the system call, as are most things in the os module, and as such mirroring the behavior of the system call (by returning -1) is less surprising than raising an exception, even though the normal Python pattern would otherwise be to raise an exception. Given that, and given that this is an API of long standing, and given that Popen is the real Python interface to this functionality, I agree that this should not be changed. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 13:07:18 2012 From: report at bugs.python.org (Masami HIRATA) Date: Mon, 26 Nov 2012 12:07:18 +0000 Subject: [issue16557] PEP 380 isn't reflected in the Functional Programming HOWTO Message-ID: <1353931638.82.0.313274646017.issue16557@psf.upfronthosting.co.za> New submission from Masami HIRATA: Although PEP 380 says: > 2. In a generator, the statement :: > > return value > > is semantically equivalent to :: > > raise StopIteration(value) Functional Programming HOWTO (Doc/howto/functional.rst) says: > ``return`` with a value, such as ``return 5``, is a syntax error inside a generator function. ---------- assignee: docs at python components: Documentation messages: 176407 nosy: docs at python, msmhrt priority: normal severity: normal status: open title: PEP 380 isn't reflected in the Functional Programming HOWTO versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 13:14:57 2012 From: report at bugs.python.org (Masami HIRATA) Date: Mon, 26 Nov 2012 12:14:57 +0000 Subject: [issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding In-Reply-To: <1351166210.69.0.0993824857313.issue16322@psf.upfronthosting.co.za> Message-ID: <1353932097.63.0.0678133392694.issue16322@psf.upfronthosting.co.za> Masami HIRATA added the comment: Is there any progress on this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 13:30:22 2012 From: report at bugs.python.org (Lukasz Taczuk) Date: Mon, 26 Nov 2012 12:30:22 +0000 Subject: [issue1466065] base64 module ignores non-alphabet characters Message-ID: <1353933022.03.0.399703526263.issue1466065@psf.upfronthosting.co.za> Lukasz Taczuk added the comment: Could someone update the docs for python 2.7.3? This ticket is marked as closed and b64decode still silently ignores non base64 chars, but the documentation (for 2.7.3) still states that while calling b64decode "A TypeError is raised if (...) or if there are non-alphabet characters present in the string.". http://docs.python.org/2.7/library/base64.html ---------- nosy: +ltaczuk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 13:56:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Nov 2012 12:56:42 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353934602.62.0.703183124189.issue16333@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28121/json_indent_separators_default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 13:58:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Nov 2012 12:58:09 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353934689.62.0.853220795259.issue16333@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Changing note about YAML is not needed, JSON lefts YAML-compatible even with identation. ---------- Added file: http://bugs.python.org/file28128/json_indent_separators_default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 14:01:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Nov 2012 13:01:33 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353934893.17.0.992057840446.issue16333@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > ',' makes lists less readable, directly the opposite of what the *indent* option is for. ',' used by default only when indentation used. It increases readability. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 14:02:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Nov 2012 13:02:51 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353934971.56.0.316060416645.issue16333@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Of course, this is a new feature and should be only in 3.4. ---------- nosy: +pitrou, rhettinger type: behavior -> enhancement versions: -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 14:43:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 26 Nov 2012 13:43:19 +0000 Subject: [issue16554] The description of the argument of MAKE_FUNCTION and MAKE_CLOSURE is incorrect In-Reply-To: <1353881740.2.0.222803994959.issue16554@psf.upfronthosting.co.za> Message-ID: <1353937399.34.0.995870206421.issue16554@psf.upfronthosting.co.za> Andrew Svetlov added the comment: The patch is better than current doc. Would you like to replace textual description of stack layout with some kind of ascii-art or table? I think it can be more readable. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 15:12:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 26 Nov 2012 14:12:13 +0000 Subject: [issue11175] allow argparse FileType to accept encoding and errors arguments In-Reply-To: <1297352833.64.0.0994986830559.issue11175@psf.upfronthosting.co.za> Message-ID: <1353939133.77.0.979092280313.issue11175@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The patch needs documentation, though, right? http://docs.python.org/dev/library/argparse.html#filetype-objects ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 15:37:41 2012 From: report at bugs.python.org (Kevin Walzer) Date: Mon, 26 Nov 2012 14:37:41 +0000 Subject: [issue15587] IDLE is pixelated on the Macbook Pro with Retina Display In-Reply-To: <1344410417.58.0.332657489061.issue15587@psf.upfronthosting.co.za> Message-ID: <1353940661.97.0.429642724296.issue15587@psf.upfronthosting.co.za> Kevin Walzer added the comment: This can probably be fixed by setting this key in the app's info.plist file: NSHighResolutionCapable Under the hood, Tkinter/Tk-Cocoa uses CoreText to render text, and I understand this to adapt to high-res displays out of the box--as long as the proper key is set in the plist file. Only pixmaps/images require special developer handling to display properly on Retina displays. As IDLE does not use any such graphics, it should be fine. Can someone file a patch for the info.plist file, or at try editing the app's info.plist file and then testing on a high-res display? I do not have access to a Retina display machine on my system. Here are more details on how to enable the key and test it: http://apple.stackexchange.com/questions/53717/how-does-eclipse-work-on-new-retina-macbook-pros ---------- nosy: +wordtech _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 15:50:17 2012 From: report at bugs.python.org (Brian Candler) Date: Mon, 26 Nov 2012 14:50:17 +0000 Subject: [issue16558] multiprocessing fails to raise exception with parameters Message-ID: <1353941416.92.0.941736825081.issue16558@psf.upfronthosting.co.za> New submission from Brian Candler: Probably best demonstrated by example. ~~~~~~~~~~~~~~~~ import multiprocessing class Myerror(ValueError): def __init__(self,a): self.a = a def __str__(self): return repr(self.a) def foo(arg): raise Myerror(arg) #foo("1") #<= this works fine, raises exception as expected #But this breaks: pool = multiprocessing.Pool(2) pool.map(foo, ["1","2","3"]) ~~~~~~~~~~~~~~~~ The result seen: ~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 504, in run self.__target(*self.__args, **self.__kwargs) File "/usr/lib/python2.7/multiprocessing/pool.py", line 353, in _handle_results task = get() TypeError: ('__init__() takes exactly 2 arguments (1 given)', , ()) ~~~~~~~~~~~~~~~~ At this point the application hangs. Worse: pressing ctrl-C shows a traceback and KeyboardInterrupt, but the worker keeps getting restarted, so it's impossible to stop. You have to go to another shell and do somthing like killall python to terminate the program. A real-world example (which caused me to track this down) is a CalledProcessError raised by subprocess.check_call ~~~~~~~~~~~~~~~~ import multiprocessing import subprocess def foo(arg): subprocess.check_call("nonexistent", shell=True) #raise subprocess.CalledProcessError(127, "nonexistent") pool = multiprocessing.Pool(2) pool.map(foo, ["1","2","3"]) ~~~~~~~~~~~~~~~~ which fails in the same way: ~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 504, in run self.__target(*self.__args, **self.__kwargs) File "/usr/lib/python2.7/multiprocessing/pool.py", line 353, in _handle_results task = get() TypeError: ('__init__() takes at least 3 arguments (1 given)', , ()) ~~~~~~~~~~~~~~~~ Behaviour tested on: python 2.7.3 on Ubuntu 12.04 python 2.7.1 on OSX 10.7.5 Workaround: re-raise a parameter-less exception instead. try: ... except Exception as e: raise RuntimeError ---------- components: Library (Lib) messages: 176416 nosy: candlerb priority: normal severity: normal status: open title: multiprocessing fails to raise exception with parameters type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 15:54:57 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Nov 2012 14:54:57 +0000 Subject: [issue1827] svnversion_init() doesn't support svn urls in sandbox/trunk In-Reply-To: <1200345592.67.0.60555355752.issue1827@psf.upfronthosting.co.za> Message-ID: <1353941697.26.0.64311911261.issue1827@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm closing this issue as `YAGNI anymore`. ---------- resolution: -> out of date stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 16:15:51 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Nov 2012 15:15:51 +0000 Subject: [issue4555] Smelly exports (global symbols in python not prefixed with Py or _Py) In-Reply-To: <1228526950.62.0.716618083363.issue4555@psf.upfronthosting.co.za> Message-ID: <1353942951.79.0.776184138479.issue4555@psf.upfronthosting.co.za> Christian Heimes added the comment: For Python 3.3 and 3.4 make smelly still lists two exported symbols. asdl_int_seq_new asdl_seq_new Do we have to check the modules, too? Some of them like _ctypes and _decimal export a lot of symbols. Here is a small shell snippet for Makefile. for MOD in `find $(srcdir)/build -name '*.s[ol]' ` ; do \ EXPORT=`nm -p $$MOD | sed -n "/ [TDB] /s/.* //p" | \ grep -E -v "^_*Py|^_init|^_fini" | sort -u`; \ if [ -n "$$EXPORT" ]; then \ echo $$MOD; \ echo $$EXPORT; \ fi \ done ---------- versions: +Python 3.3, Python 3.4 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 16:17:43 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Nov 2012 15:17:43 +0000 Subject: [issue1540] Refleak tests: test_doctest and test_gc are failing In-Reply-To: <1196606516.14.0.848950318684.issue1540@psf.upfronthosting.co.za> Message-ID: <1353943063.66.0.78423499869.issue1540@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- stage: -> patch review type: -> behavior versions: +Python 3.2, Python 3.3, Python 3.4 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 16:24:20 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Nov 2012 15:24:20 +0000 Subject: [issue2039] Pymalloc patch for int and float objects In-Reply-To: <1202404760.1.0.562652734774.issue2039@psf.upfronthosting.co.za> Message-ID: <1353943460.74.0.219538108255.issue2039@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch is no longer required. floatobject.c no longer uses the old block allocation way and uses Python's internal memory manager. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 16:26:11 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Nov 2012 15:26:11 +0000 Subject: [issue1977] Python reinitialization test In-Reply-To: <1201720244.02.0.0976736262476.issue1977@psf.upfronthosting.co.za> Message-ID: <1353943571.58.0.0996197511503.issue1977@psf.upfronthosting.co.za> Christian Heimes added the comment: Antoine, is the test still required? #10914 has introduced tests for the subinterpreter. ---------- assignee: -> pitrou resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 16:40:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Nov 2012 15:40:14 +0000 Subject: =?utf-8?q?=5Bissue16559=5D_Update_JSON=C2=A0tests?= Message-ID: <1353944414.37.0.762531579456.issue16559@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The json module tests contain testcases from the official testsuite (http://json.org/JSON_checker/test.zip). At the moment these testcases differ slightly and the proposed patch updates testcases to conform with the current official testsuite (which was changed 2007-10-05 last time). I think tests updating can be applied to old Python versions. ---------- components: Tests files: json_tests.patch keywords: patch messages: 176421 nosy: ezio.melotti, pitrou, rhettinger, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Update JSON?tests type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28129/json_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 16:47:47 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 26 Nov 2012 15:47:47 +0000 Subject: [issue16558] multiprocessing fails to raise exception with parameters In-Reply-To: <1353941416.92.0.941736825081.issue16558@psf.upfronthosting.co.za> Message-ID: <1353944867.64.0.788918656596.issue16558@psf.upfronthosting.co.za> R. David Murray added the comment: This is probably related to #1692335. It looks like that fix was not backported. Can you test if your example works now in 3.3? ---------- nosy: +r.david.murray, sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 17:01:24 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 26 Nov 2012 16:01:24 +0000 Subject: [issue14097] Improve the "introduction" page of the tutorial In-Reply-To: <1329975473.84.0.795852636525.issue14097@psf.upfronthosting.co.za> Message-ID: <1353945684.45.0.213912003167.issue14097@psf.upfronthosting.co.za> Ezio Melotti added the comment: I started working on this. Attached there's a work in progress patch with changes done on the first half of the tutorial. The changes are not definitive, and I'm trying to get some early feedback on rietveld before moving on the second half. ---------- Added file: http://bugs.python.org/file28130/issue14097-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 17:31:51 2012 From: report at bugs.python.org (Tyler Crompton) Date: Mon, 26 Nov 2012 16:31:51 +0000 Subject: [issue15587] IDLE is pixelated on the Macbook Pro with Retina Display In-Reply-To: <1344410417.58.0.332657489061.issue15587@psf.upfronthosting.co.za> Message-ID: <1353947511.59.0.514979668351.issue15587@psf.upfronthosting.co.za> Tyler Crompton added the comment: I can confirm that this works. The underscore does not appear when using the default font settings (Courier, size 10). I changed it to Courier New and all is fine. One may also want to increase the font size to 12 as the font is difficult to read when the property list has been fixed. I have no idea where to begin on the patch, though. ---------- resolution: invalid -> status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 17:45:08 2012 From: report at bugs.python.org (Ned Deily) Date: Mon, 26 Nov 2012 16:45:08 +0000 Subject: [issue15587] IDLE is pixelated on the Macbook Pro with Retina Display In-Reply-To: <1344410417.58.0.332657489061.issue15587@psf.upfronthosting.co.za> Message-ID: <1353948308.17.0.206978526765.issue15587@psf.upfronthosting.co.za> Ned Deily added the comment: Tahnks for the suggestion, Kevin, and for testing, Tyler. I'll work up a proper patch and may ask you to test it, Tyler, as I also do not have access to a Retina display at the moment. ---------- assignee: -> ned.deily stage: committed/rejected -> needs patch status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 17:47:19 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 26 Nov 2012 16:47:19 +0000 Subject: =?utf-8?q?=5Bissue16559=5D_Update_JSON=C2=A0tests?= In-Reply-To: <1353944414.37.0.762531579456.issue16559@psf.upfronthosting.co.za> Message-ID: <1353948439.06.0.390564829013.issue16559@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: -> ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:00:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Nov 2012 17:00:41 +0000 Subject: =?utf-8?q?=5Bissue16559=5D_Update_JSON=C2=A0tests?= In-Reply-To: <1353944414.37.0.762531579456.issue16559@psf.upfronthosting.co.za> Message-ID: <1353949241.06.0.794627036402.issue16559@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tests used distorted official testcases for testing non-standard Python json module features. Now it is extracted in separate tests. ---------- Added file: http://bugs.python.org/file28131/json_tool_tests_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:04:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Nov 2012 17:04:43 +0000 Subject: =?utf-8?q?=5Bissue16559=5D_Update_JSON=C2=A0tests?= In-Reply-To: <1353944414.37.0.762531579456.issue16559@psf.upfronthosting.co.za> Message-ID: <1353949483.83.0.908786331266.issue16559@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28129/json_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:07:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Nov 2012 17:07:40 +0000 Subject: =?utf-8?q?=5Bissue16559=5D_Update_JSON=C2=A0tests?= In-Reply-To: <1353944414.37.0.762531579456.issue16559@psf.upfronthosting.co.za> Message-ID: <1353949660.62.0.173487144341.issue16559@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oops. I?attached patch for other issue. Here is a right one. ---------- Added file: http://bugs.python.org/file28132/json_tests_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:07:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Nov 2012 17:07:50 +0000 Subject: =?utf-8?q?=5Bissue16559=5D_Update_JSON=C2=A0tests?= In-Reply-To: <1353944414.37.0.762531579456.issue16559@psf.upfronthosting.co.za> Message-ID: <1353949670.3.0.287563852918.issue16559@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28131/json_tool_tests_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:11:24 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:11:24 +0000 Subject: [issue16493] Document the 'optimize' argument to compile() In-Reply-To: <1353167567.95.0.716171753234.issue16493@psf.upfronthosting.co.za> Message-ID: <1353949884.72.0.178078314225.issue16493@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:12:00 2012 From: report at bugs.python.org (Zdenek Pavlas) Date: Mon, 26 Nov 2012 17:12:00 +0000 Subject: [issue16560] Python sighandlers delayed for no reason Message-ID: <1353949920.26.0.627240187448.issue16560@psf.upfronthosting.co.za> New submission from Zdenek Pavlas: Quoting from "signal" module docs: # Although Python signal handlers are called asynchronously as far as the Python user is concerned, they can only occur between the ?atomic? instructions of the Python interpreter. Yes, that's reasonable. # This means that signals arriving during long calculations implemented purely in C (such as regular expression matches on large bodies of text) may be delayed for an arbitrary amount of time. IMO, A does not imply B. Long computation in C with GIL released does not need to be atomic, as it happens "between" Python instructions. The thunk that's called asynchronously should preempt the C computation and issue a Python callback when possible. Otherwise, Python handlers are useless when interfacing C code. ---------- components: Interpreter Core files: trip-signal.patch keywords: patch messages: 176428 nosy: zdenek.pavlas priority: normal severity: normal status: open title: Python sighandlers delayed for no reason type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file28133/trip-signal.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:12:05 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:12:05 +0000 Subject: [issue16494] Add a method on importlib.SourceLoader for creating bytecode file format/container In-Reply-To: <1353168017.12.0.0693705888433.issue16494@psf.upfronthosting.co.za> Message-ID: <1353949925.81.0.183197757778.issue16494@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:13:59 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:13:59 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1353950039.84.0.211872541691.issue16496@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:14:53 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:14:53 +0000 Subject: [issue16495] bytes_decode() unnecessarily examines encoding In-Reply-To: <1353187789.37.0.881944433109.issue16495@psf.upfronthosting.co.za> Message-ID: <1353950093.18.0.498440647399.issue16495@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:15:55 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:15:55 +0000 Subject: [issue16540] Make itertools count, cycle, and repeat objects subscriptable like range. In-Reply-To: <1353689500.44.0.874231567129.issue16540@psf.upfronthosting.co.za> Message-ID: <1353950155.92.0.256851397518.issue16540@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:16:16 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:16:16 +0000 Subject: [issue16538] The docs doesn't describe MAKE_CLOSURE correctly In-Reply-To: <1353676159.67.0.844924036734.issue16538@psf.upfronthosting.co.za> Message-ID: <1353950176.09.0.756549957597.issue16538@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:17:25 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:17:25 +0000 Subject: [issue16551] Cleanup the pure Python pickle implementation In-Reply-To: <1353845856.16.0.80578311869.issue16551@psf.upfronthosting.co.za> Message-ID: <1353950245.25.0.0377593596578.issue16551@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:18:00 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:18:00 +0000 Subject: [issue16550] pickletools.py treats 32bit lengths as signed, but pickle.py as unsigned In-Reply-To: <1353845836.76.0.0245039537422.issue16550@psf.upfronthosting.co.za> Message-ID: <1353950280.95.0.20674924796.issue16550@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:18:35 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:18:35 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <1353950315.47.0.684128914521.issue16549@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- assignee: ezio.melotti -> nosy: +jcea stage: patch review -> needs patch versions: +Python 3.1 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:19:32 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:19:32 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <1353950372.78.0.606603543119.issue16549@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- assignee: -> ezio.melotti stage: needs patch -> patch review versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:20:38 2012 From: report at bugs.python.org (Daniel Urban) Date: Mon, 26 Nov 2012 17:20:38 +0000 Subject: [issue12370] Use of super overwrites use of __class__ in class namespace In-Reply-To: <1308522510.81.0.637011547356.issue12370@psf.upfronthosting.co.za> Message-ID: <1353950438.62.0.699340135179.issue12370@psf.upfronthosting.co.za> Daniel Urban added the comment: I tried to implement Nick's idea with the separate scope for __class__. It seems to work, I'm attaching a patch. The patch basically causes the following class statement: class C(A, B, metaclass=meta): def f(self): return __class__ To be compiled approximately like this: def _outer_C(*__args__, **__kw__): class _inner_C(*__args__, **__kw__): def f(self): return __class__ __class__ = _inner_C return _inner_C C = _outer_C(A, B, metaclass=meta) It also includes some tests. (The patch also changes the magic number in Lib/importlib/_bootstrap.py. This caused Python/importlib.h to be regenerated, but I didn't included those changes in the patch, because its a lot, and not very human-readable. Please tell me if I need to include them.) ---------- components: +Interpreter Core keywords: +needs review, patch stage: needs patch -> patch review versions: +Python 3.4 Added file: http://bugs.python.org/file28134/class_super_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:23:44 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:23:44 +0000 Subject: [issue16545] ast.FunctionDef sets a bad value for kw_defaults when keyword-only arguments present In-Reply-To: <1353710446.83.0.371653706627.issue16545@psf.upfronthosting.co.za> Message-ID: <1353950624.95.0.87036662615.issue16545@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:24:12 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:24:12 +0000 Subject: [issue16545] ast.FunctionDef sets a bad value for kw_defaults when keyword-only arguments present In-Reply-To: <1353710446.83.0.371653706627.issue16545@psf.upfronthosting.co.za> Message-ID: <1353950652.89.0.473591714636.issue16545@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:25:24 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:25:24 +0000 Subject: [issue16546] ast.YieldFrom needlessly has its expr value as optional In-Reply-To: <1353710555.66.0.299462157611.issue16546@psf.upfronthosting.co.za> Message-ID: <1353950724.42.0.384299439634.issue16546@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:28:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 26 Nov 2012 17:28:10 +0000 Subject: =?utf-8?q?=5Bissue16559=5D_Update_JSON=C2=A0tests?= In-Reply-To: <1353944414.37.0.762531579456.issue16559@psf.upfronthosting.co.za> Message-ID: <3Y9FT51ChDzQSH@mail.python.org> Roundup Robot added the comment: New changeset e092ff374721 by Ezio Melotti in branch '2.7': #16559: Add more tests for the json module. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/e092ff374721 New changeset 4f21a9b7decf by Ezio Melotti in branch '3.2': #16559: Add more tests for the json module. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/4f21a9b7decf New changeset 139a8cbca94e by Ezio Melotti in branch '3.3': #16559: merge with 3.2. http://hg.python.org/cpython/rev/139a8cbca94e New changeset a5b3eb62311e by Ezio Melotti in branch 'default': #16559: merge with 3.3. http://hg.python.org/cpython/rev/a5b3eb62311e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:30:34 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 26 Nov 2012 17:30:34 +0000 Subject: [issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions In-Reply-To: <1280333027.17.0.112361474517.issue9400@psf.upfronthosting.co.za> Message-ID: <1353951034.0.0.303136536351.issue9400@psf.upfronthosting.co.za> Richard Oudkerk added the comment: I am reopening this issue because 26bbff4562a7 only dealt with objects which cannot be pickled. But CalledProcessError instances *can* be pickled: the problem is that the resulting data cannot be unpickled. Note that in Python 3.3 CalledProcessError can be pickled then unpickled because of the fix for #1692335. But there are other types which will still produce "corrupt" pickles. ---------- assignee: -> sbt resolution: fixed -> stage: committed/rejected -> needs patch status: closed -> open versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:35:48 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:35:48 +0000 Subject: [issue16462] smtpd should return greeting In-Reply-To: <1352732891.73.0.549374987784.issue16462@psf.upfronthosting.co.za> Message-ID: <1353951348.68.0.976086627941.issue16462@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: The trivial approach would be to add a new "set_helo_string()" method to "SMTPServer" class, and be called before "process_message()". User subclasses would be inherit it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:37:49 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 26 Nov 2012 17:37:49 +0000 Subject: [issue16558] multiprocessing fails to raise exception with parameters In-Reply-To: <1353941416.92.0.941736825081.issue16558@psf.upfronthosting.co.za> Message-ID: <1353951469.89.0.00512729317056.issue16558@psf.upfronthosting.co.za> Richard Oudkerk added the comment: The example works correctly on 3.3 because of #1692335. I am not sure if it is appropriate to backport it though. This is a duplicate of #9400 which I have assigned to myself. (I had thought it was already fixed.) ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> multiprocessing.pool.AsyncResult.get() messes up exceptions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:38:26 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:38:26 +0000 Subject: [issue16455] sys.getfilesystemencoding() is not the locale encoding on FreeBSD and OpenSolaris when the locale is not set In-Reply-To: <1352672055.11.0.23985291602.issue16455@psf.upfronthosting.co.za> Message-ID: <1353951506.93.0.825044446247.issue16455@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Victor, any progress on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:38:48 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:38:48 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <1353951528.4.0.15072642548.issue14631@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:39:48 2012 From: report at bugs.python.org (=?utf-8?q?Leiser_Fern=C3=A1ndez_Gallo?=) Date: Mon, 26 Nov 2012 17:39:48 +0000 Subject: [issue16555] Add es_cu to locale library. In-Reply-To: <1353900143.47.0.688085135262.issue16555@psf.upfronthosting.co.za> Message-ID: <1353951588.7.0.549799474957.issue16555@psf.upfronthosting.co.za> Leiser Fern?ndez Gallo added the comment: In the file locale.py there is a var locale_alias that map the locale names, es_cu isn't there. ---------- versions: +Python 2.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:43:26 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:43:26 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <1353951806.7.0.0976766016076.issue14631@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- superseder: -> Instance methods and WeakRefs don't mix. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:44:33 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:44:33 +0000 Subject: [issue813299] Weak references and bound functions interact in a bad way Message-ID: <1353951873.83.0.27696726985.issue813299@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- superseder: -> Instance methods and WeakRefs don't mix. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:46:13 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:46:13 +0000 Subject: [issue14631] Instance methods and WeakRefs don't mix. In-Reply-To: <1334929782.59.0.560223623807.issue14631@psf.upfronthosting.co.za> Message-ID: <1353951973.38.0.0015948404167.issue14631@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- superseder: Instance methods and WeakRefs don't mix. -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:47:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Nov 2012 17:47:31 +0000 Subject: =?utf-8?q?=5Bissue16559=5D_Update_JSON=C2=A0tests?= In-Reply-To: <1353944414.37.0.762531579456.issue16559@psf.upfronthosting.co.za> Message-ID: <1353952051.18.0.954769933952.issue16559@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:56:28 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 26 Nov 2012 17:56:28 +0000 Subject: [issue16455] sys.getfilesystemencoding() is not the locale encoding on FreeBSD and OpenSolaris when the locale is not set In-Reply-To: <1353951506.93.0.825044446247.issue16455@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Victor, any progress on this? We have two options, I don't know which one is the best (safer). Does the terminal handle non-ASCII characters with a C locale on FreeBSD or Solaris? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 18:58:41 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 17:58:41 +0000 Subject: [issue16560] Python sighandlers delayed for no reason In-Reply-To: <1353949920.26.0.627240187448.issue16560@psf.upfronthosting.co.za> Message-ID: <1353952721.43.0.341674079325.issue16560@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Not sure if this would be a feature request or a bugfix, specially in the python 2.7 case :). ---------- nosy: +jcea versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 19:13:20 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 26 Nov 2012 18:13:20 +0000 Subject: [issue16560] Python sighandlers delayed for no reason In-Reply-To: <1353949920.26.0.627240187448.issue16560@psf.upfronthosting.co.za> Message-ID: <1353953600.59.0.755958518035.issue16560@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > Not sure if this would be a feature request or a bugfix That would rather be a bug injection. This patch isn't safe: the reason why signal handlers are called synchronously from the main loop is because you can't call arbitrary called on behalf of a signal handler: the must be async safe. The proper way to do that would be to have a thread dedicated to signal management (like the Java VM does). This patch is invalid (as is the issue). ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 19:15:29 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 18:15:29 +0000 Subject: [issue16216] Arithmetic operations with NULL In-Reply-To: <1350081908.35.0.947627906901.issue16216@psf.upfronthosting.co.za> Message-ID: <1353953729.94.0.110275289397.issue16216@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 19:15:49 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 18:15:49 +0000 Subject: [issue16215] Possible double memory free in str.replace In-Reply-To: <1350081232.49.0.0151935995631.issue16215@psf.upfronthosting.co.za> Message-ID: <1353953749.43.0.503025782181.issue16215@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 20:05:09 2012 From: report at bugs.python.org (Andrew McNabb) Date: Mon, 26 Nov 2012 19:05:09 +0000 Subject: [issue1180] Option to ignore or substitute ~/.pydistutils.cfg In-Reply-To: <1190232008.41.0.541816468426.issue1180@psf.upfronthosting.co.za> Message-ID: <1353956709.32.0.768200876753.issue1180@psf.upfronthosting.co.za> Andrew McNabb added the comment: The --no-user-cfg option works for me in Python 2.7, but it does not seem to be in Python 3.2 or 3.3: error: option --no-user-cfg not recognized Am I doing something wrong, or was this feature only added to Python 2.7? ---------- nosy: +amcnabb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 20:08:52 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 26 Nov 2012 19:08:52 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353956932.22.0.688308604383.issue16333@psf.upfronthosting.co.za> anatoly techtonik added the comment: > ',' used by default only when indentation used. It increases readability. Do you mean that when indentation is used, the separator only appears on line ends? Otherwise I can see how,is,that,more readable, than, that. > Of course, this is a new feature and should be only in 3.4. No of course. =) Trailing whitespace is a usability bug. It doesn't affect anything. Produced JSON stays JSON. ---------- versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 20:11:29 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 26 Nov 2012 19:11:29 +0000 Subject: [issue12370] Use of super overwrites use of __class__ in class namespace In-Reply-To: <1308522510.81.0.637011547356.issue12370@psf.upfronthosting.co.za> Message-ID: <1353957089.49.0.559434087617.issue12370@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The ability to close over __args__ and __kw__ in class methods is undesirable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 20:11:53 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 26 Nov 2012 19:11:53 +0000 Subject: [issue15472] Itertools doc summary table misdocuments some arguments In-Reply-To: <1343413434.71.0.36910737273.issue15472@psf.upfronthosting.co.za> Message-ID: <1353957113.14.0.58150452452.issue15472@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I would like to stick with "seq" because another other variant is less readable or understandable IMO. ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 20:14:59 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 26 Nov 2012 19:14:59 +0000 Subject: [issue15472] Itertools doc summary table misdocuments some arguments In-Reply-To: <1343413434.71.0.36910737273.issue15472@psf.upfronthosting.co.za> Message-ID: <1353957299.39.0.746297610466.issue15472@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Also note that the "seq[0], seq[1], ..." notation only makes sense for objects that are indexable. It is very slightly misleading but does a good job of communicating what the itertools do. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 20:21:42 2012 From: report at bugs.python.org (Lukas Lueg) Date: Mon, 26 Nov 2012 19:21:42 +0000 Subject: [issue16547] IDLE segfaults in tkinter after fresh file's text has been rendered In-Reply-To: <1353785000.68.0.88975991365.issue16547@psf.upfronthosting.co.za> Message-ID: <1353957702.72.0.39111937058.issue16547@psf.upfronthosting.co.za> Lukas Lueg added the comment: Switching to ActiveState's TCL fixes the problem on MacOS 10.6 I won't be able to produce a trace for a debug-build on Windows; attaching a semi-useless trace anyway. ---------- Added file: http://bugs.python.org/file28135/backtrace_windows.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 20:23:54 2012 From: report at bugs.python.org (Lukas Lueg) Date: Mon, 26 Nov 2012 19:23:54 +0000 Subject: [issue16547] IDLE segfaults in tkinter after fresh file's text has been rendered In-Reply-To: <1353785000.68.0.88975991365.issue16547@psf.upfronthosting.co.za> Message-ID: <1353957834.57.0.525315719694.issue16547@psf.upfronthosting.co.za> Lukas Lueg added the comment: On windows, IDLE only crashes if executed via pythonw.exe; if executed under python.exe, the attached traceback is dumped to stderr ---------- Added file: http://bugs.python.org/file28136/excp_traceback.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 20:47:30 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 26 Nov 2012 19:47:30 +0000 Subject: [issue16547] IDLE segfaults in tkinter after fresh file's text has been rendered In-Reply-To: <1353785000.68.0.88975991365.issue16547@psf.upfronthosting.co.za> Message-ID: <1353959250.91.0.0187473408021.issue16547@psf.upfronthosting.co.za> Roger Serwy added the comment: Lukas, thank you for your persistence in trying to resolve this issue. The Windows traceback is interesting. I am wondering if a "race" condition may be causing this bug. Callbacks from the Tcl interpreter eventloop back into Python may be ordered improperly. Also, IDLE crashing with pythonw.exe is due to issue13582. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 20:48:27 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 26 Nov 2012 19:48:27 +0000 Subject: =?utf-8?q?=5Bissue16559=5D_Update_JSON=C2=A0tests?= In-Reply-To: <1353944414.37.0.762531579456.issue16559@psf.upfronthosting.co.za> Message-ID: <1353959307.7.0.793211798058.issue16559@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It's always nice to see more tests, thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 21:00:28 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 26 Nov 2012 20:00:28 +0000 Subject: [issue1977] Python reinitialization test In-Reply-To: <1201720244.02.0.0976736262476.issue1977@psf.upfronthosting.co.za> Message-ID: <1353960028.3.0.318554637334.issue1977@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ah, funny. I ended up doing the same thing as you without remembering about it! ---------- status: pending -> closed superseder: -> Python sub-interpreter test _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 21:02:33 2012 From: report at bugs.python.org (Redoute) Date: Mon, 26 Nov 2012 20:02:33 +0000 Subject: [issue16561] Windows installer doesn't use UAC, then crashes Message-ID: <1353960153.53.0.844150162265.issue16561@psf.upfronthosting.co.za> New submission from Redoute: Windows installers crash without useful explanation, when Python is located in /Program Files/Python27 and the installer is started without admin rights/UAC. I experienced this with Windows 8 and installers for packages pandas and rtree. a) show error message instead of crash As I don't use distutils for packaging, I am just guessing it would make sense to: b) let bdist_wininst --user-access-control default to 'auto' ---------- assignee: eric.araujo components: Distutils messages: 176449 nosy: Redoute, eric.araujo, tarek priority: normal severity: normal status: open title: Windows installer doesn't use UAC, then crashes type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 21:03:23 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 26 Nov 2012 20:03:23 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353960203.42.0.0665208551995.issue16333@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I agree with Serhiy, this should be going in 3.4 only. The reason is that people might rely on exact output and it's not nice to break their code in a bugfix release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 21:04:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 26 Nov 2012 20:04:48 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353960288.72.0.189467953771.issue16333@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: -> ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 21:05:16 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 26 Nov 2012 20:05:16 +0000 Subject: [issue16009] Json error messages could provide more information about the error In-Reply-To: <1348420465.53.0.405036591258.issue16009@psf.upfronthosting.co.za> Message-ID: <1353960316.59.0.667348516125.issue16009@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: -> ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 21:06:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Nov 2012 20:06:15 +0000 Subject: [issue16547] IDLE segfaults in tkinter after fresh file's text has been rendered In-Reply-To: <1353785000.68.0.88975991365.issue16547@psf.upfronthosting.co.za> Message-ID: <1353960375.11.0.836729008014.issue16547@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: -serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 21:10:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Nov 2012 20:10:00 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1353960600.31.0.828898896751.issue16333@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: For older Python we need add in in the documentation the suggestion to use "separators=(',', ': ')" when indentation used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 21:17:08 2012 From: report at bugs.python.org (Lukas Lueg) Date: Mon, 26 Nov 2012 20:17:08 +0000 Subject: [issue16547] IDLE segfaults in tkinter after fresh file's text has been rendered In-Reply-To: <1353785000.68.0.88975991365.issue16547@psf.upfronthosting.co.za> Message-ID: <1353961028.52.0.198824343061.issue16547@psf.upfronthosting.co.za> Lukas Lueg added the comment: self.io is set to null before the colorization is finished. When IDLE's text-window is closed, the AttributeErrors printed to stderr cause IDLE to crash due to #13582. One can also trigger the exceptions on any other OS as described in OP. While #13582 is an issue of it's own, this is still a race condition to be considered :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 21:23:46 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 26 Nov 2012 20:23:46 +0000 Subject: [issue16561] Windows installer doesn't use UAC, then crashes In-Reply-To: <1353960153.53.0.844150162265.issue16561@psf.upfronthosting.co.za> Message-ID: <1353961426.46.0.622318756297.issue16561@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 21:26:14 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 26 Nov 2012 20:26:14 +0000 Subject: [issue16562] Optimize dict equality test Message-ID: <1353961574.84.0.437047945536.issue16562@psf.upfronthosting.co.za> New submission from Raymond Hettinger: The code for dict_equal() in Objects/dictobject.c currently loops over the key/value pairs in self and uses PyDict_GetItem() to check for the corresponding key/value pair in the other dictionary. This causes an unnecessary call to PyObject_Hash(). Instead, the code should loop over the key/value/hash triplets in self and do a direct lookup in the other dictionary with " ep = (otherdict->ma_lookup)(otherdict, key, hash)". The reuses the known hash value for the key; thereby avoiding the potentially slow call to PyObject_Hash(). See _PyDict_Contains() for an example of how to do a lookup when the hash value is already known. Note, the optimized path should be used only when PyDict_CheckExact() is true. ---------- components: Interpreter Core keywords: easy messages: 176453 nosy: rhettinger priority: low severity: normal status: open title: Optimize dict equality test type: performance versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 21:32:14 2012 From: report at bugs.python.org (Jon Henry) Date: Mon, 26 Nov 2012 20:32:14 +0000 Subject: [issue9720] zipfile writes incorrect local file header for large files in zip64 In-Reply-To: <1283216540.17.0.624049939978.issue9720@psf.upfronthosting.co.za> Message-ID: <1353961934.72.0.186621514218.issue9720@psf.upfronthosting.co.za> Changes by Jon Henry : ---------- nosy: +jhenry82 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 21:40:41 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 26 Nov 2012 20:40:41 +0000 Subject: [issue16562] Optimize dict equality test In-Reply-To: <1353961574.84.0.437047945536.issue16562@psf.upfronthosting.co.za> Message-ID: <1353962441.33.0.550927068487.issue16562@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 21:41:33 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 26 Nov 2012 20:41:33 +0000 Subject: [issue15472] Itertools doc summary table misdocuments some arguments In-Reply-To: <1343413434.71.0.36910737273.issue15472@psf.upfronthosting.co.za> Message-ID: <1353962493.86.0.262542877407.issue15472@psf.upfronthosting.co.za> Ezio Melotti added the comment: The line before the second table says "sequence". That could be changed to "iterable". Specifying "it" in parentheses just after "iterable" and use it consistently in the examples could make it clearer. I agree that using [0] and [1] is OK even if not 100% correct though. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 22:15:06 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 26 Nov 2012 21:15:06 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1353964506.13.0.799958334589.issue4945@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm not sure the documentation should be changed. While boolean values are accepted, user should prefer True/False, so the fact that you can pass other things shouldn't be documented/advertized IMHO. The patch has a couple of other changes that could be included though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 22:26:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Nov 2012 21:26:17 +0000 Subject: [issue16562] Optimize dict equality test In-Reply-To: <1353961574.84.0.437047945536.issue16562@psf.upfronthosting.co.za> Message-ID: <1353965177.53.0.713046746529.issue16562@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a simple patch. > Note, the optimized path should be used only when PyDict_CheckExact() is true. Actually this is not needed. dict_equal() uses the same code for dict subclasses. ---------- keywords: +patch nosy: +serhiy.storchaka stage: -> patch review Added file: http://bugs.python.org/file28137/dict_equal_hash_reuse.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 22:30:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Nov 2012 21:30:32 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1353965432.2.0.704393312265.issue4945@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Docstrings already changed to "true/false" instead "True/False". Almost, some places were forgotten. The patch mainly changes the ReST documentation to conform docstrings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 26 23:39:01 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 26 Nov 2012 22:39:01 +0000 Subject: [issue4555] Smelly exports (global symbols in python not prefixed with Py or _Py) In-Reply-To: <1228526950.62.0.716618083363.issue4555@psf.upfronthosting.co.za> Message-ID: <1353969541.91.0.790105933836.issue4555@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 01:07:43 2012 From: report at bugs.python.org (L. Peter Deutsch) Date: Tue, 27 Nov 2012 00:07:43 +0000 Subject: [issue16563] re.match loops forever on simple regexp Message-ID: <1353974863.42.0.0697393533738.issue16563@psf.upfronthosting.co.za> New submission from L. Peter Deutsch: I've read a number of reports of exponential-time regexp matching, but this regexp uses no unusual features, requires no backtracking, and only loops "forever" on certain input strings. I listed the Python version # as 2.6; I actually observed the behavior in 2.5.1 and 2.5.2, but I'm almost certain it's still there, because I saw the same behavior in a very recent build of Google's V8 interpreter, which I believe uses the same regexp engine. Here's the test case: import re re_utf8 = r'^([\x00-\x7f]+|[\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf]|[\xf0-\xf7][\x80-\xbf][\x80-\xbf][\x80-\xbf])*$' s = "\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x14\x00\x00\x00\x01\x00\x00,`\x00\x00\x004\x00\x01\x8d" print re.match(re_utf8, s) If you pass s[0:34] or s[34:35] as the argument of re.match, it returns the correct answer, but the code above loops apparently forever. ---------- components: Regular Expressions messages: 176458 nosy: ezio.melotti, lpd, mrabarnett priority: normal severity: normal status: open title: re.match loops forever on simple regexp type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 01:42:18 2012 From: report at bugs.python.org (Tim Peters) Date: Tue, 27 Nov 2012 00:42:18 +0000 Subject: [issue16563] re.match loops forever on simple regexp In-Reply-To: <1353974863.42.0.0697393533738.issue16563@psf.upfronthosting.co.za> Message-ID: <1353976938.17.0.842131609007.issue16563@psf.upfronthosting.co.za> Tim Peters added the comment: There's actually enormous backtracking here. Try this much shorter regexp and you'll see much the same behavior: re_utf8 = r'^([\x00-\x7f]+)*$' That's the original re_utf8 with all but the first alternative removed. Looks like passing s[0:34] "works" because it eliminates the trailing \x8d that prevents the regexp from matching the whole string. Because the regexp cannot match the whole string, it takes a very long time to try all the futile combinations implied by the nested quantifiers. As the much simpler re_utf8 above shows, it's not the alternatives in the regexp that matter here, it's the nested quantifiers. ---------- nosy: +tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 01:43:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 27 Nov 2012 00:43:55 +0000 Subject: [issue16563] re.match loops forever on simple regexp In-Reply-To: <1353974863.42.0.0697393533738.issue16563@psf.upfronthosting.co.za> Message-ID: <1353977035.21.0.123228537008.issue16563@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think the problem is the first '+', but I'm not sure if this is similar to other problems (I remember something similar to (x+)* causing problems). (On a side note: the regex matches non-valid utf-8, see table 3-7 on http://www.unicode.org/versions/Unicode6.0.0/ch03.pdf). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 01:50:21 2012 From: report at bugs.python.org (Tim Peters) Date: Tue, 27 Nov 2012 00:50:21 +0000 Subject: [issue16563] re.match loops forever on simple regexp In-Reply-To: <1353974863.42.0.0697393533738.issue16563@psf.upfronthosting.co.za> Message-ID: <1353977421.8.0.752130362143.issue16563@psf.upfronthosting.co.za> Tim Peters added the comment: Yes, if you remove the first "+", the example quickly prints None (i.e., reports that the regexp cannot match the string). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 06:11:41 2012 From: report at bugs.python.org (Todd Rovito) Date: Tue, 27 Nov 2012 05:11:41 +0000 Subject: [issue5066] IDLE documentation for Unix obsolete/incorrect In-Reply-To: <1232942217.99.0.191249551049.issue5066@psf.upfronthosting.co.za> Message-ID: <1353993101.13.0.382194295321.issue5066@psf.upfronthosting.co.za> Todd Rovito added the comment: This patch is an extensive refactoring of help.txt and idle.rst. The first thing I did was merge issue5066.patch from jesstess into the current idle.rst file, because the original patch from jesstess was so old it had to be merged by hand into the 3.4 source code. Then I compared what the merge document said with the actual menus of IDLE and made several corrections because of missing menu options. Finally I refactored the help.txt based on idle.rst and created the resulting patch. Several capitalization's were fixed along with many inconsistencies between the two files. I have not tested on 2.7 only 3.4. My plan is to test with 2.7 and create another patch by end of the week 12/2/2012. ---------- versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file28138/5066IDLEocumentationforUnixObsoleteIncorrect.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 06:27:31 2012 From: report at bugs.python.org (Roger Serwy) Date: Tue, 27 Nov 2012 05:27:31 +0000 Subject: [issue5066] IDLE documentation for Unix obsolete/incorrect In-Reply-To: <1232942217.99.0.191249551049.issue5066@psf.upfronthosting.co.za> Message-ID: <1353994051.31.0.208266386595.issue5066@psf.upfronthosting.co.za> Roger Serwy added the comment: The original help.txt and the patched version still mixes tabs and spaces. This is a minor point, but perhaps all the tabs should be expanded. Also, the section on running IDLE without a subprocess should not be removed until version 3.5. See #16123. ---------- nosy: +serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 06:56:18 2012 From: report at bugs.python.org (Graham Dumpleton) Date: Tue, 27 Nov 2012 05:56:18 +0000 Subject: [issue16500] Add an 'afterfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1353995778.28.0.94946302698.issue16500@psf.upfronthosting.co.za> Changes by Graham Dumpleton : ---------- nosy: +grahamd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 07:42:09 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 27 Nov 2012 06:42:09 +0000 Subject: [issue11175] allow argparse FileType to accept encoding and errors arguments In-Reply-To: <1297352833.64.0.0994986830559.issue11175@psf.upfronthosting.co.za> Message-ID: <1353998529.74.0.588276510236.issue11175@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Right, good point. Lucas, could you fix the documentation too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 08:56:26 2012 From: report at bugs.python.org (L. Peter Deutsch) Date: Tue, 27 Nov 2012 07:56:26 +0000 Subject: [issue16563] re.match loops forever on simple regexp In-Reply-To: <1353974863.42.0.0697393533738.issue16563@psf.upfronthosting.co.za> Message-ID: <1354002986.37.0.0867374621676.issue16563@psf.upfronthosting.co.za> L. Peter Deutsch added the comment: It never occurred to me that the regexp package would be so poorly designed that a pattern that so clearly never requires backtracking could require exponential time. I'll change the pattern (taking out the + has no effect on what strings it matches) and leave it up to others to decide whether the performance issue is worth addressing. And thanks for the pointer to the table in the Unicode standard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 09:45:44 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 27 Nov 2012 08:45:44 +0000 Subject: [issue16563] re.match loops forever on simple regexp In-Reply-To: <1353974863.42.0.0697393533738.issue16563@psf.upfronthosting.co.za> Message-ID: <1354005944.65.0.324477933195.issue16563@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing as a duplicate of issue 1662581. ---------- nosy: +mark.dickinson resolution: -> duplicate status: open -> closed superseder: -> the re module can perform poorly: O(2**n) versus O(n**2) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 09:47:23 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 27 Nov 2012 08:47:23 +0000 Subject: [issue1662581] the re module can perform poorly: O(2**n) versus O(n**2) Message-ID: <1354006043.04.0.831237738856.issue1662581@psf.upfronthosting.co.za> Mark Dickinson added the comment: Given the number of times this comes up, I think it's a least worth an upgrade from 'low' priority to 'normal' priority. ---------- priority: low -> normal versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 09:55:09 2012 From: report at bugs.python.org (Zdenek Pavlas) Date: Tue, 27 Nov 2012 08:55:09 +0000 Subject: [issue16560] Python sighandlers delayed for no reason In-Reply-To: <1353949920.26.0.627240187448.issue16560@psf.upfronthosting.co.za> Message-ID: <1354006509.67.0.117711433891.issue16560@psf.upfronthosting.co.za> Zdenek Pavlas added the comment: > This patch isn't safe Yes, it's broken. Does not work unless thread support was enabled, and locking initialized. There are probably other bugs, too. Not meant to be included, really. But IMO the correct implementation should work along these lines. > the reason why signal handlers are called synchronously from the main loop is because you can't call arbitrary called on behalf of a signal handler: the must be async safe. Could you elaborate, please? Suppose Python has called a C module. From Python's POV, an async signal is no different from a synchronous C=>Python callback. Both are safe. > The proper way to do that would be to have a thread dedicated to signal management (like the Java VM does). Please, don't. Python is bloated enough already. > This patch is invalid (as is the issue). signal.alarm() and ctrl-c not working in modules is not a valid issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 09:58:46 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 27 Nov 2012 08:58:46 +0000 Subject: [issue16563] re.match loops forever on simple regexp In-Reply-To: <1353974863.42.0.0697393533738.issue16563@psf.upfronthosting.co.za> Message-ID: <1354006726.63.0.48658954148.issue16563@psf.upfronthosting.co.za> Mark Dickinson added the comment: @lpd: you may want to look at the 'regex' module on PyPI [1] to see if it solves your problems. The idea is that some form of this should eventually go into the standard library, but we've been lacking volunteers for the huge code review task involved. [1] http://pypi.python.org/pypi/regex. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 10:02:15 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 27 Nov 2012 09:02:15 +0000 Subject: [issue2636] Adding a new regex module (compatible with re) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1354006935.87.0.962340225708.issue2636@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 10:36:20 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 27 Nov 2012 09:36:20 +0000 Subject: [issue16560] Python sighandlers delayed for no reason In-Reply-To: <1354006509.67.0.117711433891.issue16560@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > the reason why signal handlers are called synchronously from the main loop is because you can't call arbitrary called on behalf of a signal handler: the must be async safe. > > > Could you elaborate, please? Suppose Python has called a C module. From Python's POV, an async signal is no different from a synchronous C=>Python callback. Both are safe. No. Here, safe doesn't have anything to do with Python bytecode, or thread-safety. In C, you cannot call arbitrary code from a signal handler, the code must be async-safe (let's say reentrant): for example, if you call malloc() from within a signal handler, you can get a deadlock or a crash if the signal was received while the process was in the middle of an malloc() call. See https://www.securecoding.cert.org/confluence/display/seccode/SIG30-C.+Call+only+asynchronous-safe+functions+within+signal+handlersfor example. So the bottom line is that *you can't call Python code from within a signal handler*. > > The proper way to do that would be to have a thread dedicated to signal management (like the Java VM does). > > Please, don't. Python is bloated enough already. > > > This patch is invalid (as is the issue). > > signal.alarm() and ctrl-c not working in modules is not a valid issue? Yes it is, but I don't think it can be solved without resorting to a dedicated signal management thread (which would also have the nice side effect of avoiding EINTR-related errors). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 11:50:42 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 27 Nov 2012 10:50:42 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1353964506.13.0.799958334589.issue4945@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: On Tue, Nov 27, 2012 at 12:15 AM, Ezio Melotti wrote: > I'm not sure the documentation should be changed. While boolean values > are accepted, user should prefer True/False, so the fact that you can pass > other things shouldn't be documented/advertized IMHO. > I'd raise that question on python-dev. > The patch has a couple of other changes that could be included though. > Yes, things that fall out of scope of this report should go into other reports. Otherwise we'll chat here for ages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 13:21:30 2012 From: report at bugs.python.org (Lucas Maystre) Date: Tue, 27 Nov 2012 12:21:30 +0000 Subject: [issue11175] allow argparse FileType to accept encoding and errors arguments In-Reply-To: <1297352833.64.0.0994986830559.issue11175@psf.upfronthosting.co.za> Message-ID: <1354018890.54.0.579395607401.issue11175@psf.upfronthosting.co.za> Lucas Maystre added the comment: OK, I'll give it a try. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 14:08:52 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 27 Nov 2012 13:08:52 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1354021732.02.0.554423846056.issue4945@psf.upfronthosting.co.za> Mark Dickinson added the comment: > user should prefer True/False I disagree: I don't see any reason why the normal duck-typing rules shouldn't hold here. So +1 for the documentation changes from me. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 14:16:25 2012 From: report at bugs.python.org (Zdenek Pavlas) Date: Tue, 27 Nov 2012 13:16:25 +0000 Subject: [issue16560] Python sighandlers delayed for no reason In-Reply-To: <1353949920.26.0.627240187448.issue16560@psf.upfronthosting.co.za> Message-ID: <1354022185.46.0.299077793498.issue16560@psf.upfronthosting.co.za> Zdenek Pavlas added the comment: > for example, if you call malloc() from within a signal handler, you can get a deadlock or a crash if the signal was received while the process was in the middle of an malloc() call. Thanks, I see the problem. malloc() implements locking (when threads are enabled), but does not mask signals. When re-entered, this deadlocks. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 15:10:11 2012 From: report at bugs.python.org (Danilo Bargen) Date: Tue, 27 Nov 2012 14:10:11 +0000 Subject: [issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time In-Reply-To: <1328301796.8.0.996607861145.issue13936@psf.upfronthosting.co.za> Message-ID: <1354025411.59.0.671149248194.issue13936@psf.upfronthosting.co.za> Danilo Bargen added the comment: I disagree, I think this bug should be reopened and fixed. A use case that I just ran into: I'm using a Django form with time fields that aren't required, but that are only valid in combination (if there's a open time there has to be a close time). if not (self.closed or (self.open_time and self.close_time )): raise ValidationError("Invalid times") This leads to a Validation Error when using the times 12:00 and 00:00. Of course, this case is debatable and can be worked around by using `self.open is not None and self.close is not None`, but there are even more problems when using the times inside the template. I'm using the following widespread pattern inside my templates:

Close time: {{ close_time|default:"-" }}

The "default" filter used in this case displays the string "-" if the value on the left side of the | symbol evaluates to False. That makes sense in almost all of the cases. In the case of the `datetime.time(0, 0)` object, the default value is displayed, even though `datetime.time(0, 0).__str__()` results in a valid string (in this case '00:00:00'). (By the way, through these experiments I also found a bug in Django's date formatting template function caused by this inconsistency, which I will report separately.) I agree that casting time objects to a boolean value doesn't make much sense. But especially because of that, inconsistencies in the resulting boolean value should NOT exist. Yet another argument for this is that in many regions midnight isn't considered 00:00, but 24:00, which would obviously not evaluate to False. Please fix this. Otherwise it will lead to a whole lot of weird bugs in software using the datetime library. ---------- nosy: +gwrtheyrn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 15:38:50 2012 From: report at bugs.python.org (Alexander Kruppa) Date: Tue, 27 Nov 2012 14:38:50 +0000 Subject: [issue16564] email.generator.BytesGenerator fails with bytes payload Message-ID: <1354027130.07.0.897738205773.issue16564@psf.upfronthosting.co.za> New submission from Alexander Kruppa: I'm trying to use the email.* functions to craft HTTP POST data for file upload. Trying something like filedata = open("data", "rb").read() postdata = MIMEMultipart() fileattachment = MIMEApplication(filedata, _encoder=email.encoders.encode_noop) postdata.attach(fileattachment) fp = BytesIO() g = BytesGenerator(fp) g.flatten(postdata, unixfrom=False) fails with Traceback (most recent call last): File "./minetest.py", line 30, in g.flatten(postdata, unixfrom=False) File "/usr/lib/python3.2/email/generator.py", line 91, in flatten self._write(msg) File "/usr/lib/python3.2/email/generator.py", line 137, in _write self._dispatch(msg) File "/usr/lib/python3.2/email/generator.py", line 163, in _dispatch meth(msg) File "/usr/lib/python3.2/email/generator.py", line 224, in _handle_multipart g.flatten(part, unixfrom=False, linesep=self._NL) File "/usr/lib/python3.2/email/generator.py", line 91, in flatten self._write(msg) File "/usr/lib/python3.2/email/generator.py", line 137, in _write self._dispatch(msg) File "/usr/lib/python3.2/email/generator.py", line 163, in _dispatch meth(msg) File "/usr/lib/python3.2/email/generator.py", line 192, in _handle_text raise TypeError('string payload expected: %s' % type(payload)) TypeError: string payload expected: This is because BytesGenerator._handle_text() expects str payload in which byte values that are non-printable in ASCII have been replaced by surrogates. The example above creates a bytes payload, however, for which super(BytesGenerator,self)._handle_text(msg) = Generator._handle_text(msg) throws the exception. Note that using any email.encoders other than encode_noop does not really fit the HTTP POST bill, as those define a Content-Transfer-Encoding which HTTP does not know. It would seem better to me to let BytesGenerator accept a bytes payload and just copy that to the output, rather than making the application encode the bytes as a string, hopefully in a way that s.encode('ascii', 'surrogateescape') can invert. E.g., a workaround class I use now does class FixedBytesGenerator(BytesGenerator): def _handle_bytes(self, msg): payload = msg.get_payload() if payload is None: return if isinstance(payload, bytes): self._fp.write(payload) elif isinstance(payload, str): super(FixedBytesGenerator,self)._handle_text(msg) else: # Payload is neither bytes not string - this can't be right raise TypeError('bytes or str payload expected: %s' % type(payload)) _writeBody = _handle_bytes ---------- components: Library (Lib) messages: 176476 nosy: Alexander.Kruppa priority: normal severity: normal status: open title: email.generator.BytesGenerator fails with bytes payload type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 15:50:23 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 27 Nov 2012 14:50:23 +0000 Subject: [issue16564] email.generator.BytesGenerator fails with bytes payload In-Reply-To: <1354027130.07.0.897738205773.issue16564@psf.upfronthosting.co.za> Message-ID: <1354027823.63.0.36576541507.issue16564@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, the way BytesGenerator works is basically a hack to get the email package itself working. Use cases outside the email package were not really considered in the (short) timeframe during which it was implemented. The longer term plan calls for redoing the way payloads are handled to generalize the whole process. I'd like to see this happen for 3.4, but I'm not sure I'm going to have the time to finish the work (I'm hopeful that I will, though). In the meantime, while your suggestion is a good one, I'm ambivalent about applying it as a bug fix. It is on the border between a fix and a feature, since the email package in 3.x hasn't ever supported bytes payloads, only encoded payloads. ---------- components: +email nosy: +barry, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 15:54:15 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 27 Nov 2012 14:54:15 +0000 Subject: [issue16564] email.generator.BytesGenerator fails with bytes payload In-Reply-To: <1354027130.07.0.897738205773.issue16564@psf.upfronthosting.co.za> Message-ID: <1354028055.08.0.0940313737239.issue16564@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. Let me rephrase that. *Internally* it doesn't support bytes payloads, it "encodes" bytes payloads as surrogateescaped ascii, as you have oserved. Which is why this is on the borderline, and could possibly be considered a bug fix, because from an external point of view it does support parsing and generating 8bit payloads. I need to give it some thought, and perhaps others will weigh in with opinions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 16:15:34 2012 From: report at bugs.python.org (Lucas Maystre) Date: Tue, 27 Nov 2012 15:15:34 +0000 Subject: [issue11175] allow argparse FileType to accept encoding and errors arguments In-Reply-To: <1297352833.64.0.0994986830559.issue11175@psf.upfronthosting.co.za> Message-ID: <1354029334.2.0.167292341115.issue11175@psf.upfronthosting.co.za> Lucas Maystre added the comment: Added some documentation for the patch. Let me know what you think. ---------- Added file: http://bugs.python.org/file28139/filetype11175.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 17:43:19 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 27 Nov 2012 16:43:19 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1354034599.35.0.316123524505.issue4945@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I don't see any reason why the normal duck-typing rules shouldn't hold here. The rules should apply, the only "problem" is in the documentation. The documentation here could answer two questions: 1) what should I pass to these args to make them work? 2) can I pass things that are not True/False? For the 1st question the answer is "True or False" (sure you can pass other things, but if you have to pick two values use these). Regarding the 2nd question I'm not even sure why would anyone ask it. The only case I can think about is someone used to 0/1 instead of True/False but if I wanted to know if they worked, I would, in order: 1) use True/False because I'm sure it works; 2) convert what I have to True/False because I'm sure it works; 3) try what I have and see if it works (and be paranoid because it might break somewhere); 4) read to code to make sure what I have works; 5) read the documentation and see if it mentions values that are not explicitly True/False. Moreover even if I read 'true' instead of 'True' in the docs I wouldn't think "it's lowercase so it must accept any true value and not just True/False". IOW the lowercase "true" only serves to provide a mild reassurance to someone that wants to use something different from True/False, that read the docs expecting to find this reassurance, and that is fine with how mild it is. OTOH is not a big deal, I was just explaining the reasoning behind my position. Two more things though: I looked at the docstring of loads/dumps and I see "True", "false" and "is specified"; I don't like much the parallel between the lowercase "is true" and the uppercase "default: False". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 17:57:34 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 27 Nov 2012 16:57:34 +0000 Subject: [issue16507] Patch selectmodule.c to support WSAPoll on Windows In-Reply-To: <1353277974.19.0.012295377293.issue16507@psf.upfronthosting.co.za> Message-ID: <1354035454.17.0.00994623304102.issue16507@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 18:19:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 27 Nov 2012 17:19:14 +0000 Subject: [issue16556] Update string.Formatter.vformat documentation to say "**kwargs" In-Reply-To: <1353903093.51.0.301727912961.issue16556@psf.upfronthosting.co.za> Message-ID: <3Y9sDK359rzRQX@mail.python.org> Roundup Robot added the comment: New changeset d805982336a0 by Ezio Melotti in branch '2.7': #16556: Fix inconsistency between kwds and kwargs. Patch by Taavi Burns. http://hg.python.org/cpython/rev/d805982336a0 New changeset 565c3bbed7d3 by Ezio Melotti in branch '3.2': #16556: Fix inconsistency between kwds and kwargs. Patch by Taavi Burns. http://hg.python.org/cpython/rev/565c3bbed7d3 New changeset ae19d86b71c8 by Ezio Melotti in branch '3.3': #16556: merge with 3.2. http://hg.python.org/cpython/rev/ae19d86b71c8 New changeset c28f593ea0cb by Ezio Melotti in branch 'default': #16556: merge with 3.3. http://hg.python.org/cpython/rev/c28f593ea0cb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 18:22:29 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 27 Nov 2012 17:22:29 +0000 Subject: [issue16556] Update string.Formatter.vformat documentation to say "**kwargs" In-Reply-To: <1353903093.51.0.301727912961.issue16556@psf.upfronthosting.co.za> Message-ID: <1354036949.74.0.356872911186.issue16556@psf.upfronthosting.co.za> Ezio Melotti added the comment: The patch looked OK, so I committed it. Regarding similar cleanups I think it's OK to do them only if the inconsistency is in the same function. If different functions use kwds or kwargs in different places but they do it consistently, then it doesn't matter. ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 18:30:18 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 27 Nov 2012 17:30:18 +0000 Subject: [issue16556] Update string.Formatter.vformat documentation to say "**kwargs" In-Reply-To: <1353903093.51.0.301727912961.issue16556@psf.upfronthosting.co.za> Message-ID: <1354037418.86.0.752211306155.issue16556@psf.upfronthosting.co.za> ?ric Araujo added the comment: Oh, I had totally missed that the mismatch was between the function signature in the docs and another part of the doc (I thought it was between the real function signature and the doc). Good catch! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 18:33:00 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 27 Nov 2012 17:33:00 +0000 Subject: [issue16555] Add es_cu to locale aliases In-Reply-To: <1353900143.47.0.688085135262.issue16555@psf.upfronthosting.co.za> Message-ID: <1354037580.64.0.561759240357.issue16555@psf.upfronthosting.co.za> ?ric Araujo added the comment: Ah, ok. Sounds good to me. (I think this can go in stable branches, like other update to registries (e.g. mimetypes), but other core devs may disagree.) ---------- nosy: +lemburg, loewis title: Add es_cu to locale library. -> Add es_cu to locale aliases versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 20:16:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 27 Nov 2012 19:16:11 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1354043771.37.0.486913948369.issue4945@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 20:26:57 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 27 Nov 2012 19:26:57 +0000 Subject: [issue16562] Optimize dict equality test In-Reply-To: <1353961574.84.0.437047945536.issue16562@psf.upfronthosting.co.za> Message-ID: <1354044417.39.0.180383211472.issue16562@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch looks good to me. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 20:36:37 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 27 Nov 2012 19:36:37 +0000 Subject: [issue4555] Smelly exports (global symbols in python not prefixed with Py or _Py) In-Reply-To: <1228526950.62.0.716618083363.issue4555@psf.upfronthosting.co.za> Message-ID: <1354044997.1.0.827027333569.issue4555@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'd like to focus this issue; it has been open long enough, and deserves to get closed once the original issue is resolved - which was that "make smelly" reports symbols. I think dmalcolm's patch is quite a good start for that. It may well be that other modules need to be considered - but PLEASE not in this issue. For Unix with shared libraries, the extension modules certainly cause problems, in particular if Python gets embedded in a context (e.g. Apache) that also loads separate copies of the same libraries, and may cause problems if one of our functions collide with some library. However, I see *two* issues falling out of this: one to extend the "make smelly" target to include extension modules, and the other to then fix the extension modules - preferably with one issue per extension module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 20:50:43 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 27 Nov 2012 19:50:43 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1354045843.19.0.469425214602.issue16333@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Do you mean that when indentation is used, the separator only appears on line ends? Apparently: ./python -c 'from json import dumps; print(dumps([[[1,2,3]]*3]*3, indent=2))' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 21:10:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 27 Nov 2012 20:10:28 +0000 Subject: [issue16562] Optimize dict equality test In-Reply-To: <1353961574.84.0.437047945536.issue16562@psf.upfronthosting.co.za> Message-ID: <1354047028.07.0.69492945626.issue16562@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And here is a synthetic microbenchmark: $ ./python -m timeit -s "n=10**3; k=2; a={(i,)*k:i for i in range(n)}; b={(i,)*k:i for i in range(n)}" "a == b" Vanilla: 251 usec per loop Patched:?195 usec per loop $ ./python -m timeit -s "n=10**3; k=2; a={(i,)*k:i for i in range(n)}; b=dict(a)" "a == b" Vanilla: 116 usec per loop Patched:?58.6 usec per loop The use of tuple keys is quite common. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 21:19:10 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 27 Nov 2012 20:19:10 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1354047550.89.0.486677282756.issue4945@psf.upfronthosting.co.za> Chris Jerdonek added the comment: On the whole, the patch looks okay to me. I think we should strive for correctness in the documentation where possible. While keeping "True" would keep the forward implications correct and document the "preferred" value, there is often an implied assumption (which is sometimes stated) that the negation of the first term does not trigger or guarantee the behavior described in the second term. It is that second implication that would be incorrect in some cases if "True" is kept (e.g. *check_circular* and *allow_nan*). In cases where both "if True" and "if False" are explicitly stated, keeping "True" and "False" would mean not documenting certain cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 21:19:54 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 27 Nov 2012 20:19:54 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames In-Reply-To: <1352153903.84.0.995057035576.issue16416@psf.upfronthosting.co.za> Message-ID: <1354047594.12.0.989657502354.issue16416@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Victor, could you please backport to 3.3? ---------- assignee: ronaldoussoren -> haypo nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 21:37:34 2012 From: report at bugs.python.org (Felipe Cruz) Date: Tue, 27 Nov 2012 20:37:34 +0000 Subject: [issue16565] Increase Py_AddPendingCall array size Message-ID: <1354048654.58.0.545467206879.issue16565@psf.upfronthosting.co.za> New submission from Felipe Cruz: Current pending calls limit is too small and it can be easily reached in very intensive async file io applications. There is a little hack in pyaio[1] which sleeps if Py_AddPendingCall returns < 0 but It's not totally clear to me why the size of pendind calls array is only 32. [1] https://github.com/felipecruz/pyaio ---------- components: IO messages: 176491 nosy: felipecruz priority: normal severity: normal status: open title: Increase Py_AddPendingCall array size versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 21:54:53 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 27 Nov 2012 20:54:53 +0000 Subject: [issue16562] Optimize dict equality test In-Reply-To: <1353961574.84.0.437047945536.issue16562@psf.upfronthosting.co.za> Message-ID: <1354049693.67.0.623697122002.issue16562@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 22:06:31 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 27 Nov 2012 21:06:31 +0000 Subject: [issue16464] urllib.request: opener not resetting content-length In-Reply-To: <1352771853.32.0.535718799021.issue16464@psf.upfronthosting.co.za> Message-ID: <3Y9yGZ6fJJzRY6@mail.python.org> Roundup Robot added the comment: New changeset 618ea5612e83 by Andrew Svetlov in branch 'default': Issue #16464: reset Request's Content-Length header on .data change. http://hg.python.org/cpython/rev/618ea5612e83 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 22:07:52 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 27 Nov 2012 21:07:52 +0000 Subject: [issue16464] urllib.request: opener not resetting content-length In-Reply-To: <1352771853.32.0.535718799021.issue16464@psf.upfronthosting.co.za> Message-ID: <1354050472.16.0.850152622686.issue16464@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Pushed. Thanks, Alexey. ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 22:19:34 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 27 Nov 2012 21:19:34 +0000 Subject: [issue16464] urllib.request: opener not resetting content-length In-Reply-To: <1352771853.32.0.535718799021.issue16464@psf.upfronthosting.co.za> Message-ID: <1354051174.1.0.483311355462.issue16464@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- assignee: -> asvetlov resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 22:29:50 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 27 Nov 2012 21:29:50 +0000 Subject: [issue16566] Structure._anonymous_ should not allow strings Message-ID: <1354051789.98.0.293941478089.issue16566@psf.upfronthosting.co.za> New submission from anatoly techtonik: http://docs.python.org/2/library/ctypes.html#ctypes.Structure._anonymous_ "An optional sequence that lists the names of unnamed (anonymous) fields". If you feed it a string, such as _offset, it will print a very interesting error: ... File "C:\roundup\.\roundup\backends\portalocker.py", line 70, in class A_OFFSET_UNION(Union): AttributeError: type object '_OFFSET_UNION' has no attribute '_' Considering complexity that ctypes already has, the simple check that _anonymous_ is a sequence (and not a string) will make our lifes easier. ---------- components: ctypes messages: 176494 nosy: techtonik priority: normal severity: normal status: open title: Structure._anonymous_ should not allow strings versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 22:30:24 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 27 Nov 2012 21:30:24 +0000 Subject: [issue16566] Structure._anonymous_ should not allow strings In-Reply-To: <1354051789.98.0.293941478089.issue16566@psf.upfronthosting.co.za> Message-ID: <1354051824.16.0.711853489143.issue16566@psf.upfronthosting.co.za> anatoly techtonik added the comment: s/A_OFFSET_UNION/_OFFSET_UNION/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 22:31:33 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 27 Nov 2012 21:31:33 +0000 Subject: [issue16566] Structure._anonymous_ should not allow strings In-Reply-To: <1354051789.98.0.293941478089.issue16566@psf.upfronthosting.co.za> Message-ID: <1354051893.66.0.564339889546.issue16566@psf.upfronthosting.co.za> anatoly techtonik added the comment: The union definition for the curious: class _OFFSET(Structure): _fields_ = [ ('Offset', DWORD), ('OffsetHigh', DWORD)] class _OFFSET_UNION(Union): _anonymous_ = '_offset' _fields_ = [ ('_offset', _OFFSET), ('Pointer', PVOID)] ---------- versions: +Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 23:01:03 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 27 Nov 2012 22:01:03 +0000 Subject: [issue16566] Structure._anonymous_ should not allow strings In-Reply-To: <1354051789.98.0.293941478089.issue16566@psf.upfronthosting.co.za> Message-ID: <1354053663.31.0.389919955579.issue16566@psf.upfronthosting.co.za> STINNER Victor added the comment: > An optional sequence that lists the names of unnamed (anonymous) fields Yes, it must be a sequence. > _anonymous_ = '_offset' This is a string, not a sequence. Just use _anonymous_ = ['_offset']. ---------- nosy: +haypo resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 23:19:10 2012 From: report at bugs.python.org (Ezra Berch) Date: Tue, 27 Nov 2012 22:19:10 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1354054750.68.0.685502015661.issue16203@psf.upfronthosting.co.za> Ezra Berch added the comment: Patch attached. I've taken a slightly different approach than what has been discussed here: rather than define a new fullmatch() function and method, I've defined a new re.FULLMATCH flag for match(). So an example would be re.match('abc','abc',re.FULLMATCH) The implementation is basically what has been discussed here, except done when the regular expression is compiled rather than at the user level. ---------- keywords: +patch nosy: +ezberch Added file: http://bugs.python.org/file28140/issue16203.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 23:29:31 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 27 Nov 2012 22:29:31 +0000 Subject: [issue16566] Structure._anonymous_ should not allow strings In-Reply-To: <1354051789.98.0.293941478089.issue16566@psf.upfronthosting.co.za> Message-ID: <1354055371.98.0.876164620571.issue16566@psf.upfronthosting.co.za> anatoly techtonik added the comment: ctypes should throw proper exception if a string is used instead of sequence. It doesn't do this. ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 23:41:58 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 27 Nov 2012 22:41:58 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1354056118.53.0.495069004644.issue16438@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I'm still unable to figure out how to do it You could look at Doc/library/unittest.rst, there are some tables that span multiple lines. If you want a newline in the output too I think you have to add a blank line in the cell. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 27 23:47:00 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 27 Nov 2012 22:47:00 +0000 Subject: [issue2537] re.compile(r'((x|y+)*)*') should fail In-Reply-To: <1207157766.7.0.917289707609.issue2537@psf.upfronthosting.co.za> Message-ID: <1354056420.63.0.312368892938.issue2537@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 02:02:36 2012 From: report at bugs.python.org (Meador Inge) Date: Wed, 28 Nov 2012 01:02:36 +0000 Subject: [issue16566] Structure._anonymous_ should not allow strings In-Reply-To: <1354051789.98.0.293941478089.issue16566@psf.upfronthosting.co.za> Message-ID: <1354064556.54.0.215089075596.issue16566@psf.upfronthosting.co.za> Meador Inge added the comment: A string *is* a sequence. That is actually part of the problem. Consider a slight variation on the original repro case: >>> class _OFFSET(Structure): ... _fields_ = [ ... ('Offset', c_int), ... ('OffsetHigh', c_int)] ... [70412 refs] >>> class _OFFSET_UNION(Union): ... _anonymous_ = 12 ... _fields_ = [ ... ('_offset', _OFFSET), ... ('Pointer', c_int)] ... Traceback (most recent call last): File "", line 1, in TypeError: _anonymous_ must be a sequence As expected, a TypeError is produced. Now consider the original error: Traceback (most recent call last): File "", line 1, in AttributeError: type object '_OFFSET_UNION' has no attribute '_' This happens because the string sequence '_offset' is iterated and the first item in the iteration is '_', which isn't a field of _OFFSET_UNION. So, the error checking is already there (in the form of PySequence_Fast) and is consistent with the documentation. This should be closed. ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 02:05:43 2012 From: report at bugs.python.org (Kiet Tran) Date: Wed, 28 Nov 2012 01:05:43 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1354064743.55.0.333728471361.issue16438@psf.upfronthosting.co.za> Kiet Tran added the comment: That document actually doesn't have any table that spans multiple lines. Here's the html page: http://docs.python.org/dev/library/unittest.html Actually, I already know how to make a table span multiple lines from this stackoverflow page: http://stackoverflow.com/questions/13504595/multi-line-table-cell-in-restructuredtext However, the problem is having the items in different columns match, as it depends on the width of the table, which is not fixed. For example, notice how the table is formatted nicely here: http://imgur.com/y1hLg But if I shrink the width, the formatting just goes wrong: http://imgur.com/Oct9m This is particularly problematic because some elements in the table have long lines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 02:15:01 2012 From: report at bugs.python.org (Todd Rovito) Date: Wed, 28 Nov 2012 01:15:01 +0000 Subject: [issue5066] IDLE documentation for Unix obsolete/incorrect In-Reply-To: <1232942217.99.0.191249551049.issue5066@psf.upfronthosting.co.za> Message-ID: <1354065301.33.0.333211156744.issue5066@psf.upfronthosting.co.za> Todd Rovito added the comment: Version 2 of the patch change include: -help.txt removed all tabs and replaced with spaces, as suggested by Roger -help.txt re-inserted the section on running IDLE without a subprocess as suggested by Roger -Added a note on line 162 (idle.rst) about how the Python Community standard is to use spaces and not tabs as suggested by ezio -Line 340 (idle.rst) where the Emacs bindings are rendered seemed to work fine on my computer without the spaces but I think ezio is correct spaces should be present so I added them -Line 354 (idle.rst): are restricted to four spaces due to TCL/Tk issues.)s/issues/limitations/ so I replaced issues with limitations Thanks for the feedback Roger and ezio! ---------- Added file: http://bugs.python.org/file28141/5066IDLEocumentationforUnixObsoleteIncorrectVersion2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 02:19:12 2012 From: report at bugs.python.org (Todd Rovito) Date: Wed, 28 Nov 2012 01:19:12 +0000 Subject: [issue5066] IDLE documentation for Unix obsolete/incorrect In-Reply-To: <1232942217.99.0.191249551049.issue5066@psf.upfronthosting.co.za> Message-ID: <1354065551.85.0.579638667748.issue5066@psf.upfronthosting.co.za> Todd Rovito added the comment: For version 2 of the patch -Line 340 (idle.rst) where the Emacs bindings are rendered seemed to work fine on my computer without the spaces but I think ezio is correct spaces should be present so I added them ******SHOULD BE****** -Line 340 (idle.rst) where the Emacs bindings are rendered seemed to work fine on my computer without the empty line between entries but I think ezio is correct empty lines should be present so I added empty lines just to be safe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 02:32:05 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 28 Nov 2012 01:32:05 +0000 Subject: [issue16566] Structure._anonymous_ should not allow strings In-Reply-To: <1354051789.98.0.293941478089.issue16566@psf.upfronthosting.co.za> Message-ID: <1354066325.19.0.165264081541.issue16566@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yes, if you pass "string" when you meant to pass ["string"], you will often get awful error messages. This is one of the downsides of strings being iterable, but we're not going to add "if isinstance(obj, str): throw TypeError(msg)" special cases everywhere to address it. It's definitely a wart in Python, but it's one Python developers just have to get used to (and learn to suspect whenever they see a single-character string in an error message). ---------- nosy: +ncoghlan resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 03:11:08 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 28 Nov 2012 02:11:08 +0000 Subject: [issue16562] Optimize dict equality test In-Reply-To: <1353961574.84.0.437047945536.issue16562@psf.upfronthosting.co.za> Message-ID: <1354068668.4.0.688957615865.issue16562@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The patch looks correct. If the tests pass, go ahead and apply it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 03:17:35 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 28 Nov 2012 02:17:35 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1354069055.35.0.884892975716.issue15990@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching new patch to address Ezio's suggestions on Rietveld. I will also respond to those comments on Rietveld shortly. ---------- Added file: http://bugs.python.org/file28142/issue-15990-5-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 03:42:55 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 28 Nov 2012 02:42:55 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1354070575.51.0.984187998795.issue15990@psf.upfronthosting.co.za> Chris Jerdonek added the comment: For some reason, Rietveld is erroring out every time I try to reply to one of the comments. So I am pasting the reply below: [Issue in the Rietveld tracker here: http://code.google.com/p/rietveld/issues/detail?id=394 ] On 2012/11/26 22:07:50, ezio.melotti wrote: > > Note that I took this from the pep. The pep could get the same clarification > (unless I made it more confusing than it was). >From what I have observed, PEPs tend to be left alone after they are accepted. But that could simply be a misperception on my part. What is the process for updating PEPs and whose approval is needed, etc? In any case, that could be done as part of a separate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 04:37:33 2012 From: report at bugs.python.org (Martin Panter) Date: Wed, 28 Nov 2012 03:37:33 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1354073853.65.0.404098594734.issue2927@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 05:05:44 2012 From: report at bugs.python.org (Martin Panter) Date: Wed, 28 Nov 2012 04:05:44 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <1354075544.79.0.473438621232.issue16549@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 05:53:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 28 Nov 2012 04:53:58 +0000 Subject: [issue16209] add a "class str" entry to the docs In-Reply-To: <1350032597.23.0.0536115574586.issue16209@psf.upfronthosting.co.za> Message-ID: <1354078438.72.0.933013939131.issue16209@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching new patch to address Ezio's suggestions on Rietveld. ---------- Added file: http://bugs.python.org/file28143/issue-16209-3-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 06:01:46 2012 From: report at bugs.python.org (Brian Curtin) Date: Wed, 28 Nov 2012 05:01:46 +0000 Subject: [issue15716] Ability to specify the PYTHONPATH via a command line flag In-Reply-To: <1345164027.44.0.397805734201.issue15716@psf.upfronthosting.co.za> Message-ID: <1354078906.07.0.646317865668.issue15716@psf.upfronthosting.co.za> Brian Curtin added the comment: Colin - it should work in the same way that setting PYTHONPATH as an environment variable would work, e.g., semi-colon is the separator on Windows. ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 06:16:42 2012 From: report at bugs.python.org (Roger Serwy) Date: Wed, 28 Nov 2012 05:16:42 +0000 Subject: [issue16547] IDLE raises an exception in tkinter after fresh file's text has been rendered In-Reply-To: <1353785000.68.0.88975991365.issue16547@psf.upfronthosting.co.za> Message-ID: <1354079802.83.0.224486674467.issue16547@psf.upfronthosting.co.za> Roger Serwy added the comment: I was able to trigger this problem on 2.7 as well. Changing type to behavior as the core interpreter is not crashing. Lukas, the only way I can trigger the traceback is by closing the editor while the colorizer is still colorizing. Clicking randomly on the editor itself did not trigger the bug. Can you clarify what you meant when you said "window receives events (clicks...)"? Closing the window place a <> event on the Tk event queue. Calling .update() causes Tk to process all events in the queue, including callbacks into IDLE. As a result, closing a window can trigger a few different use-after-free conditions. I managed to trigger two of these in the __init__ of PyShellEditorWindow in Lib/idlelib/PyShell.py. The self.io reference can be set to None during EditorWindow.__init__(self, *args) or during self.restore_file_breaks(). The Lib/idlelib/ColorDelegator.py also has a .update() in its recolorize_main loop. ---------- stage: -> needs patch title: IDLE segfaults in tkinter after fresh file's text has been rendered -> IDLE raises an exception in tkinter after fresh file's text has been rendered type: crash -> behavior versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 06:42:15 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 28 Nov 2012 05:42:15 +0000 Subject: [issue1286] fileinput, StringIO, and cStringIO do not support the with protocol In-Reply-To: <1192538556.96.0.72107595061.issue1286@psf.upfronthosting.co.za> Message-ID: <1354081335.38.0.178244111133.issue1286@psf.upfronthosting.co.za> Eric Snow added the comment: Keep in mind that it's pretty easy to roll your own CM wrapper: @contextlib.contextmanager def closes(file): yield file file.close() Then you can do this: with closes(StringIO()) as test: test.write("hi!") return test.getvalue() This works for 2.5 and up. ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 06:43:18 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 28 Nov 2012 05:43:18 +0000 Subject: [issue1286] fileinput, StringIO, and cStringIO do not support the with protocol In-Reply-To: <1192538556.96.0.72107595061.issue1286@psf.upfronthosting.co.za> Message-ID: <1354081398.2.0.775125161152.issue1286@psf.upfronthosting.co.za> Ezio Melotti added the comment: http://docs.python.org/2/library/contextlib.html#contextlib.closing ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 07:13:42 2012 From: report at bugs.python.org (Campbell Barton) Date: Wed, 28 Nov 2012 06:13:42 +0000 Subject: [issue16129] No good way to set 'PYTHONIOENCODING' when embedding python. In-Reply-To: <1349355495.01.0.406130423626.issue16129@psf.upfronthosting.co.za> Message-ID: <1354083222.07.0.678496033703.issue16129@psf.upfronthosting.co.za> Campbell Barton added the comment: patch attached, simply wraps putenv() ---------- keywords: +patch Added file: http://bugs.python.org/file28144/pyos_putenv.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 07:30:27 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 28 Nov 2012 06:30:27 +0000 Subject: [issue16129] No good way to set 'PYTHONIOENCODING' when embedding python. In-Reply-To: <1349355495.01.0.406130423626.issue16129@psf.upfronthosting.co.za> Message-ID: <1354084227.41.0.557917685051.issue16129@psf.upfronthosting.co.za> Christian Heimes added the comment: At first glance your proposed fix looks like an easy hack to get around the issue. However it's not going to work properly. Embedded Python interpreters should isolate themselves from the user's environment. When `Py_IgnoreEnvironmentFlag` is enabled, Py_GETENV() always returns NULL. IMHO we can't get around Py_GetIOEncoding(), Py_SetIOEncoding() and Py_IOEncoding. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 07:42:07 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 28 Nov 2012 06:42:07 +0000 Subject: [issue16129] No good way to set 'PYTHONIOENCODING' when embedding python. In-Reply-To: <1349355495.01.0.406130423626.issue16129@psf.upfronthosting.co.za> Message-ID: <1354084927.02.0.103102692778.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: Claiming this one, mainly because I want people to largely leave the already hairy initialisation process alone until we get a chance to discuss it at the language summit next year. I plan to write up a comprehensive overview of the initialisation sequence before then, because we need to be figuring out how to *delete* code here, instead of adding even more. ---------- assignee: -> ncoghlan nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 07:43:52 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 28 Nov 2012 06:43:52 +0000 Subject: [issue12370] Use of super overwrites use of __class__ in class namespace In-Reply-To: <1308522510.81.0.637011547356.issue12370@psf.upfronthosting.co.za> Message-ID: <1354085032.54.0.927059011649.issue12370@psf.upfronthosting.co.za> Eric Snow added the comment: I agree with Benjamin re: __args__ and __kw__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 07:45:09 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 28 Nov 2012 06:45:09 +0000 Subject: [issue10914] Python sub-interpreter test In-Reply-To: <1295098719.73.0.016388283782.issue10914@psf.upfronthosting.co.za> Message-ID: <1354085109.33.0.754710115825.issue10914@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 08:00:51 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 28 Nov 2012 07:00:51 +0000 Subject: [issue1286] fileinput, StringIO, and cStringIO do not support the with protocol In-Reply-To: <1192538556.96.0.72107595061.issue1286@psf.upfronthosting.co.za> Message-ID: <1354086051.46.0.34067931045.issue1286@psf.upfronthosting.co.za> Eric Snow added the comment: borrowed the time machine did we? ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 08:02:22 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 28 Nov 2012 07:02:22 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1354086142.54.0.795002991603.issue16499@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 08:37:22 2012 From: report at bugs.python.org (Erik VanderWerf) Date: Wed, 28 Nov 2012 07:37:22 +0000 Subject: [issue16567] Implementing .= for variable operator Message-ID: <1354088242.01.0.122460016578.issue16567@psf.upfronthosting.co.za> New submission from Erik VanderWerf: I don't know if this has been suggested before, none of my searches returned anything. Sorry if it has been rejected already. Anyone who has used Python at least a little bit will know that you can use +=, -=, *=, and /= to apply a change to a variable and store it in the same variable in one step. (a = a + 1) == (a += 1) Would it be possible to add a fifth operator, .= (period-equals) to apply a method to a variable in one step? ex: >> a = "SPAM" >> a .= lower() >> a 'spam' It would make code look a lot better, and easier to write for any longer-named variables. I can see where passing a method of an object by itself would cause an error, but might it be possible for the .= to override this? ---------- components: None messages: 176519 nosy: yos233 priority: normal severity: normal status: open title: Implementing .= for variable operator type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 08:45:31 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 28 Nov 2012 07:45:31 +0000 Subject: [issue12370] Use of super overwrites use of __class__ in class namespace In-Reply-To: <1308522510.81.0.637011547356.issue12370@psf.upfronthosting.co.za> Message-ID: <1354088731.15.0.31961064065.issue12370@psf.upfronthosting.co.za> Nick Coghlan added the comment: >From a quick scan of the patch, I suspect the current implementation will also break this code: class Outer: class InnerParent: pass class InnerChild(InnerParent): pass The evaluation of the other args to build_class needs to happen before we enter the new outer scope to fix that. I also agree with the others that this should use hidden variable names for the build_class arguments, rather than __args__ and __kw___. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 08:48:37 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 28 Nov 2012 07:48:37 +0000 Subject: [issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object In-Reply-To: <1344732276.83.0.543554641885.issue15627@psf.upfronthosting.co.za> Message-ID: <1354088917.22.0.865798523616.issue15627@psf.upfronthosting.co.za> Eric Snow added the comment: Sorry, just now digging out of a massive backlog here. The originally proposed name of "source_to_code()" might be more appropriate than compile_source(). The relationship to compilation is not compulsory and the name/docstring/docs might imply that. If you're not opposed, Brett, I can make the change. Regardless, glad to see this in. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 08:54:39 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 28 Nov 2012 07:54:39 +0000 Subject: [issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation In-Reply-To: <1322181994.22.0.955887054946.issue13475@psf.upfronthosting.co.za> Message-ID: <1354089279.91.0.365370119418.issue13475@psf.upfronthosting.co.za> Eric Snow added the comment: This proposal only affects the initialization of sys.path[0], and not any of the other sys.path entries made by site.py or otherwise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 09:24:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 28 Nov 2012 08:24:19 +0000 Subject: [issue15716] Ability to specify the PYTHONPATH via a command line flag In-Reply-To: <1345164027.44.0.397805734201.issue15716@psf.upfronthosting.co.za> Message-ID: <1354091059.87.0.0303832826583.issue15716@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 09:47:23 2012 From: report at bugs.python.org (Daniel Urban) Date: Wed, 28 Nov 2012 08:47:23 +0000 Subject: [issue12370] Use of super overwrites use of __class__ in class namespace In-Reply-To: <1308522510.81.0.637011547356.issue12370@psf.upfronthosting.co.za> Message-ID: <1354092443.16.0.907969239666.issue12370@psf.upfronthosting.co.za> Daniel Urban added the comment: Thanks for the review! Nick, the example with Outer, InnerParent and InnerChild still works (the evaluation happens before we enter the new scope). Of course you're all right about __args__ and __kw__. I'll try to find a way to hide them. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 10:03:32 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 28 Nov 2012 09:03:32 +0000 Subject: [issue16568] allow constructors to be documented separately from class Message-ID: <1354093412.82.0.692042663136.issue16568@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to settle on and provide a way to document the constructor of a class separately from the overall summary/description of a class. This is something that Ezio, Nick, and I discussed briefly on IRC a few hours ago. We all see the value in it. Currently, Sphinx's "class" directive is used in many places to document the constructor of a class. One drawback of this approach is that linking to the class using the :class: role links to the constructor as opposed to the class summary. As a result, in many cases the class description needs to be added before the class directive, and a second link needs to be created and used for the overall description. One way to address this would be to create a new "constructor" directive similar to directives like method, classmethod, and staticmethod. The constructor documentation could then be hyperlinked to using a new :constructor: role (or perhaps :ctor: to go with the pattern of 4-letter roles). The class summary could then go immediately after the class directive, with the constructor directive following, as follows: .. class:: Foo Description of Foo. .. constructor:: Foo(bar=1) Return a Foo. This could render as-- class **Foo** Description of Foo. *constructor* **Foo**(bar=1) Return a Foo. It is possible that something similar could be achieved by abusing the method directive for constructors and linking to them using :meth:`~Foo.Foo`, but that wouldn't be ideal in a few respects. Nick also raised a related issue for base classes, etc. I will let him speak to that issue, which might be best as part of another new issue. ---------- assignee: docs at python components: Documentation messages: 176524 nosy: chris.jerdonek, docs at python, ezio.melotti, ncoghlan priority: normal severity: normal status: open title: allow constructors to be documented separately from class type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 10:46:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 28 Nov 2012 09:46:22 +0000 Subject: [issue16209] add a "class str" entry to the docs In-Reply-To: <1350032597.23.0.0536115574586.issue16209@psf.upfronthosting.co.za> Message-ID: <3YBH7K1Sl6zRdB@mail.python.org> Roundup Robot added the comment: New changeset 0097379df2e1 by Chris Jerdonek in branch '3.3': Add a str class entry to the "Text Sequence Type" section (issue #16209). http://hg.python.org/cpython/rev/0097379df2e1 New changeset 81ac75c64780 by Chris Jerdonek in branch 'default': Merge from 3.3: Add a str class entry to the string section (issue #16209). http://hg.python.org/cpython/rev/81ac75c64780 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 10:50:51 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 28 Nov 2012 09:50:51 +0000 Subject: [issue16209] add a "class str" entry to the docs In-Reply-To: <1350032597.23.0.0536115574586.issue16209@psf.upfronthosting.co.za> Message-ID: <1354096251.37.0.202829582427.issue16209@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 10:55:55 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 28 Nov 2012 09:55:55 +0000 Subject: [issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation In-Reply-To: <1322181994.22.0.955887054946.issue13475@psf.upfronthosting.co.za> Message-ID: <1354096555.88.0.798991761944.issue13475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: before or after running site.py? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 10:59:36 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 28 Nov 2012 09:59:36 +0000 Subject: [issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation In-Reply-To: <1322181994.22.0.955887054946.issue13475@psf.upfronthosting.co.za> Message-ID: <1354096776.19.0.788684070784.issue13475@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'd suggest this would be applied at the same time as when sys.path[0] gets set now, but that kind of messy complication is why I decided we really needed to step back and start trying to clean up what we already have before we started layering yet *more* complications onto the initialisation process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 11:03:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 28 Nov 2012 10:03:18 +0000 Subject: [issue16205] update :class:`str` references to link to the str type section In-Reply-To: <1350008126.16.0.898285675428.issue16205@psf.upfronthosting.co.za> Message-ID: <1354096998.42.0.884581188091.issue16205@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This was addressed by issue #16209 since with that change :class:`str` and :func:`str` now both go to the new str class entry in the string type section. See also the new issue #16568. ---------- resolution: -> duplicate status: open -> closed superseder: -> add a "class str" entry to the docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 11:33:59 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 28 Nov 2012 10:33:59 +0000 Subject: [issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation In-Reply-To: <1322181994.22.0.955887054946.issue13475@psf.upfronthosting.co.za> Message-ID: <1354098839.39.0.386379397938.issue13475@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Absolutely, Nick. Perhaps we ought to start gathering a list of real world requirements, i.e. how do people run, or want to run, python? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 11:34:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 28 Nov 2012 10:34:39 +0000 Subject: [issue16323] Wrong C API documentation for locale encoding In-Reply-To: <1351173455.0.0.737976146006.issue16323@psf.upfronthosting.co.za> Message-ID: <3YBJC22MHSzRGj@mail.python.org> Roundup Robot added the comment: New changeset 11629c14ce1f by Andrew Svetlov in branch '3.3': Issue #16323: Fix wrong C API documentation for locale encoding. http://hg.python.org/cpython/rev/11629c14ce1f New changeset 6f3d3003acf3 by Andrew Svetlov in branch 'default': Merge issue #16323: Fix wrong C API documentation for locale encoding. http://hg.python.org/cpython/rev/6f3d3003acf3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 11:35:05 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 28 Nov 2012 10:35:05 +0000 Subject: [issue16323] Wrong C API documentation for locale encoding In-Reply-To: <1351173455.0.0.737976146006.issue16323@psf.upfronthosting.co.za> Message-ID: <1354098905.51.0.555998536333.issue16323@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- nosy: +asvetlov resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 11:52:56 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 28 Nov 2012 10:52:56 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <3YBJc8102gzRSG@mail.python.org> Roundup Robot added the comment: New changeset 69d5d834c5cb by Chris Jerdonek in branch '3.2': Improve argument/parameter documentation (issue #15990). http://hg.python.org/cpython/rev/69d5d834c5cb New changeset 40fd26a4206b by Chris Jerdonek in branch '3.3': Merge from 3.2: improve argument/parameter documentation (issue #15990). http://hg.python.org/cpython/rev/40fd26a4206b New changeset 74d8a2a20c52 by Chris Jerdonek in branch 'default': Merge from 3.3: improve argument/parameter documentation (issue #15990). http://hg.python.org/cpython/rev/74d8a2a20c52 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 12:01:10 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 28 Nov 2012 11:01:10 +0000 Subject: [issue16567] Implementing .= for variable operator In-Reply-To: <1354088242.01.0.122460016578.issue16567@psf.upfronthosting.co.za> Message-ID: <1354100470.66.0.158716421499.issue16567@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Please submit this kind of ideas to the python-ideas mailing list, to trigger a discussion and get valuable feedback: http://www.python.org/community/lists/#python-ideas-mailing-list ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 12:03:39 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 28 Nov 2012 11:03:39 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1354100619.88.0.138256086503.issue15990@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I realize now that this would also be good for 2.7. I will try to do that tomorrow. ---------- versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 13:22:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 28 Nov 2012 12:22:39 +0000 Subject: [issue16323] Wrong C API documentation for locale encoding In-Reply-To: <1351173455.0.0.737976146006.issue16323@psf.upfronthosting.co.za> Message-ID: <1354105359.0.0.856076310771.issue16323@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think the sentence "If a byte sequence can be decoded as a surrogate character and *errors* is not ``"strict"``, then the byte sequence is escaped using the ``"surrogateescape"`` error handler instead of being decoded." is redundant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 13:23:03 2012 From: report at bugs.python.org (Daniel Urban) Date: Wed, 28 Nov 2012 12:23:03 +0000 Subject: [issue16554] The description of the argument of MAKE_FUNCTION and MAKE_CLOSURE is incorrect In-Reply-To: <1353881740.2.0.222803994959.issue16554@psf.upfronthosting.co.za> Message-ID: <1354105383.25.0.936942981427.issue16554@psf.upfronthosting.co.za> Daniel Urban added the comment: Sorry, I won't have time for that in the following weeks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 13:23:43 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 28 Nov 2012 12:23:43 +0000 Subject: [issue16566] Structure._anonymous_ should not allow strings In-Reply-To: <1354051789.98.0.293941478089.issue16566@psf.upfronthosting.co.za> Message-ID: <1354105423.87.0.585210610192.issue16566@psf.upfronthosting.co.za> anatoly techtonik added the comment: I agree with you on a generic case, where "Special cases aren't special enough to break the rules.", but this special case in ctypes and _anonymous_ context is where the rule "Although practicality beats purity." should apply. Otherwise I can't see any examples where the latter wins, and why it presents in the The Zen at all. ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 13:26:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 28 Nov 2012 12:26:01 +0000 Subject: [issue9720] zipfile writes incorrect local file header for large files in zip64 In-Reply-To: <1352752706.07.0.594562101906.issue9720@psf.upfronthosting.co.za> Message-ID: <1354105911.8418.5.camel@raxxla> Serhiy Storchaka added the comment: Patches updated to resolve merge conflict with issue11981. Please review and apply any of this patches. This is needed for some other my zipfile patches. ---------- Added file: http://bugs.python.org/file28145/zipfile_zip64_always_2.patch Added file: http://bugs.python.org/file28146/zipfile_zip64_try_2.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 6f3d3003acf3 Lib/zipfile.py --- a/Lib/zipfile.py Wed Nov 28 12:34:27 2012 +0200 +++ b/Lib/zipfile.py Wed Nov 28 14:15:29 2012 +0200 @@ -346,7 +346,7 @@ # compress_size Size of the compressed file # file_size Size of the uncompressed file - def FileHeader(self): + def FileHeader(self, zip64=None): """Return the per-file header as a string.""" dt = self.date_time dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2] @@ -362,12 +362,17 @@ extra = self.extra min_version = 0 - if file_size > ZIP64_LIMIT or compress_size > ZIP64_LIMIT: - # File is larger than what fits into a 4 byte integer, - # fall back to the ZIP64 extension + if zip64 is None: + zip64 = file_size > ZIP64_LIMIT or compress_size > ZIP64_LIMIT + if zip64: fmt = ' ZIP64_LIMIT or compress_size > ZIP64_LIMIT: + if not zip64: + raise LargeZipFile("Filesize would require ZIP64 extensions") + # File is larger than what fits into a 4 byte integer, + # fall back to the ZIP64 extension file_size = 0xffffffff compress_size = 0xffffffff min_version = ZIP64_VERSION @@ -1301,7 +1306,7 @@ zinfo.CRC = 0 self.filelist.append(zinfo) self.NameToInfo[zinfo.filename] = zinfo - self.fp.write(zinfo.FileHeader()) + self.fp.write(zinfo.FileHeader(False)) return cmpr = _get_compressor(zinfo.compress_type) @@ -1309,8 +1314,9 @@ # Must overwrite CRC and sizes with correct data later zinfo.CRC = CRC = 0 zinfo.compress_size = compress_size = 0 - zinfo.file_size = file_size = 0 - self.fp.write(zinfo.FileHeader()) + # Compressed size can be larger than uncompressed size + self.fp.write(zinfo.FileHeader(self._allowZip64)) + file_size = 0 while 1: buf = fp.read(1024 * 8) if not buf: @@ -1330,11 +1336,11 @@ zinfo.compress_size = file_size zinfo.CRC = CRC zinfo.file_size = file_size - # Seek backwards and write CRC and file sizes + # Seek backwards and write file header (which will now include + # correct CRC and file sizes) position = self.fp.tell() # Preserve current position in file - self.fp.seek(zinfo.header_offset + 14, 0) - self.fp.write(struct.pack(" ZIP64_LIMIT or \ + zinfo.compress_size > ZIP64_LIMIT + if zip64 and not self._allowZip64: + raise LargeZipFile("Filesize would require ZIP64 extensions") + self.fp.write(zinfo.FileHeader(zip64)) self.fp.write(data) - self.fp.flush() if zinfo.flag_bits & 0x08: # Write CRC and file sizes after the file data - self.fp.write(struct.pack(" ZIP64_LIMIT or compress_size > ZIP64_LIMIT: - # File is larger than what fits into a 4 byte integer, - # fall back to the ZIP64 extension + if zip64 is None: + zip64 = file_size > ZIP64_LIMIT or compress_size > ZIP64_LIMIT + if zip64: fmt = ' ZIP64_LIMIT or compress_size > ZIP64_LIMIT: + if not zip64: + raise LargeZipFile("Filesize would require ZIP64 extensions") + # File is larger than what fits into a 4 byte integer, + # fall back to the ZIP64 extension file_size = 0xffffffff compress_size = 0xffffffff min_version = ZIP64_VERSION @@ -1301,7 +1306,7 @@ zinfo.CRC = 0 self.filelist.append(zinfo) self.NameToInfo[zinfo.filename] = zinfo - self.fp.write(zinfo.FileHeader()) + self.fp.write(zinfo.FileHeader(False)) return cmpr = _get_compressor(zinfo.compress_type) @@ -1309,8 +1314,11 @@ # Must overwrite CRC and sizes with correct data later zinfo.CRC = CRC = 0 zinfo.compress_size = compress_size = 0 - zinfo.file_size = file_size = 0 - self.fp.write(zinfo.FileHeader()) + # Compressed size can be larger than uncompressed size + zip64 = self._allowZip64 and \ + zinfo.file_size * 1.05 > ZIP64_LIMIT + self.fp.write(zinfo.FileHeader(zip64)) + file_size = 0 while 1: buf = fp.read(1024 * 8) if not buf: @@ -1330,11 +1338,16 @@ zinfo.compress_size = file_size zinfo.CRC = CRC zinfo.file_size = file_size - # Seek backwards and write CRC and file sizes + if not zip64 and self._allowZip64: + if file_size > ZIP64_LIMIT: + raise RuntimeError('File size has increased during compressing') + if compress_size > ZIP64_LIMIT: + raise RuntimeError('Compressed size larger than uncompressed size') + # Seek backwards and write file header (which will now include + # correct CRC and file sizes) position = self.fp.tell() # Preserve current position in file - self.fp.seek(zinfo.header_offset + 14, 0) - self.fp.write(struct.pack(" ZIP64_LIMIT or \ + zinfo.compress_size > ZIP64_LIMIT + if zip64 and not self._allowZip64: + raise LargeZipFile("Filesize would require ZIP64 extensions") + self.fp.write(zinfo.FileHeader(zip64)) self.fp.write(data) - self.fp.flush() if zinfo.flag_bits & 0x08: # Write CRC and file sizes after the file data - self.fp.write(struct.pack(" Message-ID: <1354106250.75.0.290416956392.issue16323@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Really I don't know what's better. Victor, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 13:37:33 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 28 Nov 2012 12:37:33 +0000 Subject: [issue16566] Structure._anonymous_ should not allow strings In-Reply-To: <1354051789.98.0.293941478089.issue16566@psf.upfronthosting.co.za> Message-ID: <1354106253.46.0.492444314667.issue16566@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: OTOH, __slots__ also allows a single string, but it is silently converted to a 1-tuple: class C: __slots__ = 'abc' assert 'abc' in C.__dict__ ---------- nosy: +amaury.forgeotdarc status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 13:53:27 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 28 Nov 2012 12:53:27 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1354107207.67.0.67365669381.issue16333@psf.upfronthosting.co.za> anatoly techtonik added the comment: > The reason is that people might rely on exact output and it's not nice to break their code in a bugfix release. This code has a very bad smell. Between supporting people who did that and teaching them a lesson I choose the latter, but I bet the situation like you describe either didn't exist or easily fixable on their side. If it's not fixable, then there is always a virtualenv and previous versions. That's about sympathy. Now about technical side of conservative development. There is no promise of binary compatibility for pretty-printed data. Python never made pretty-prints a serialization format. If you insist that people rely on this behavior, let's document it, because at least on this tracker there are already two people who have questions about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 14:04:07 2012 From: report at bugs.python.org (Lukas Lueg) Date: Wed, 28 Nov 2012 13:04:07 +0000 Subject: [issue16547] IDLE raises an exception in tkinter after fresh file's text has been rendered In-Reply-To: <1353785000.68.0.88975991365.issue16547@psf.upfronthosting.co.za> Message-ID: <1354107847.38.0.143906771921.issue16547@psf.upfronthosting.co.za> Lukas Lueg added the comment: @Roger: Triggering the segfault on MacOS 10.6 requires some interaction with the text-window while the text is being rendered. This includes moving the window or just clicking into it's canvas. Carefully leaving the window alone while colorization is going on avoids the segfault thereafter. My guess is that TK's event queue gets upset; the segfault was fixed when switching to ActiveState TK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 14:46:19 2012 From: report at bugs.python.org (Martin Dengler) Date: Wed, 28 Nov 2012 13:46:19 +0000 Subject: [issue15716] Ability to specify the PYTHONPATH via a command line flag In-Reply-To: <1345164027.44.0.397805734201.issue15716@psf.upfronthosting.co.za> Message-ID: <1354110379.82.0.849538493013.issue15716@psf.upfronthosting.co.za> Changes by Martin Dengler : ---------- nosy: +mdengler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 14:46:25 2012 From: report at bugs.python.org (Martin Dengler) Date: Wed, 28 Nov 2012 13:46:25 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1354110385.96.0.131695719697.issue16499@psf.upfronthosting.co.za> Changes by Martin Dengler : ---------- nosy: +mdengler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 15:09:37 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 28 Nov 2012 14:09:37 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1354111777.44.0.127192154391.issue16333@psf.upfronthosting.co.za> R. David Murray added the comment: "Code smell" and "Easily fixable on their side" are not an arguments that apply here. We have a strong backward compatibility policy that strives not to break working code in bug fix releases. And yes, this means that there are sometimes bugs that we only fix in feature releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 15:21:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 28 Nov 2012 14:21:52 +0000 Subject: [issue16569] Preventing errors of simultaneous access in zipfile Message-ID: <1354112511.94.0.436567820333.issue16569@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: If the ZipFile was created by passing in a file-like object as the first argument to the constructor, then simultaneous reading or writing of different file results in an non-consistent state. There is a warning about this in the documentation. The proposed patch forces this condition, raising the early exception if you attempt to simultaneously access. I'm not sure whether it's worth apply to older versions. ---------- components: Library (Lib) files: zipfile_simultaneous.patch keywords: patch messages: 176544 nosy: alanmcintyre, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Preventing errors of simultaneous access in zipfile type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28147/zipfile_simultaneous.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 15:35:18 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 28 Nov 2012 14:35:18 +0000 Subject: [issue16557] PEP 380 isn't reflected in the Functional Programming HOWTO In-Reply-To: <1353931638.82.0.313274646017.issue16557@psf.upfronthosting.co.za> Message-ID: <1354113318.28.0.902809248247.issue16557@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- keywords: +easy stage: -> needs patch type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 15:46:12 2012 From: report at bugs.python.org (Dirkjan Ochtman) Date: Wed, 28 Nov 2012 14:46:12 +0000 Subject: [issue16570] Absolute imports fail to take full path into account? Message-ID: <1354113971.91.0.733086645605.issue16570@psf.upfronthosting.co.za> New submission from Dirkjan Ochtman: This seems confusing: djc at enrai test $ ls -lR .: total 0 drwxr-xr-x 4 djc users 160 Nov 28 15:35 pkg ./pkg: total 4 -rw-r--r-- 1 djc users 39 Nov 28 15:37 http.py -rw-r--r-- 1 djc users 0 Nov 28 15:34 __init__.py drwxr-xr-x 3 djc users 136 Nov 28 15:40 tests ./pkg/tests: total 8 -rw-r--r-- 1 djc users 21 Nov 28 15:37 http.py -rw-r--r-- 1 djc users 27 Nov 28 15:40 __init__.py djc at enrai test $ cat pkg/__init__.py djc at enrai test $ cat pkg/http.py from http.client import HTTPConnection djc at enrai test $ cat pkg/tests/__init__.py from pkg.tests import http djc at enrai test $ cat pkg/tests/http.py from pkg import http djc at enrai test $ python3 Python 3.2.3 (default, May 28 2012, 09:27:08) [GCC 4.5.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pkg import http >>> djc at enrai test $ python3 Python 3.2.3 (default, May 28 2012, 09:27:08) [GCC 4.5.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pkg.tests import http >>> djc at enrai test $ PYTHONPATH=. python3 pkg/tests/__init__.py Traceback (most recent call last): File "pkg/tests/__init__.py", line 1, in from pkg.tests import http File "/home/djc/src/test/pkg/tests/__init__.py", line 1, in from pkg.tests import http File "/home/djc/src/test/pkg/tests/http.py", line 1, in from pkg import http File "/home/djc/src/test/pkg/http.py", line 1, in from http.client import HTTPConnection File "/home/djc/src/test/pkg/tests/http.py", line 1, in from pkg import http ImportError: cannot import name http ---------- components: Interpreter Core messages: 176545 nosy: brett.cannon, djc, ncoghlan priority: normal severity: normal status: open title: Absolute imports fail to take full path into account? versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 15:46:26 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 28 Nov 2012 14:46:26 +0000 Subject: [issue16569] Preventing errors of simultaneous access in zipfile In-Reply-To: <1354112511.94.0.436567820333.issue16569@psf.upfronthosting.co.za> Message-ID: <1354113986.03.0.324791673426.issue16569@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I am -0 to this. We can't prevent programmers for shotting in the foot. ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 16:00:06 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Nov 2012 15:00:06 +0000 Subject: [issue16323] Wrong C API documentation for locale encoding In-Reply-To: <1354106250.75.0.290416956392.issue16323@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: "If a byte sequence can be decoded as a surrogate character and *errors* is not ``"strict"``, then the byte sequence is escaped using the ``"surrogateescape"`` error handler instead of being decoded." I don't understand this sentence but it sounds to be wrong. The "surrogateescape" is only used if errors="surrogateescape"... If errors is set and is different to "strict" and "surrogateescape", an error is raised. 2012/11/28 Andrew Svetlov : > > Andrew Svetlov added the comment: > > Really I don't know what's better. Victor, what do you think? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 16:05:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 28 Nov 2012 15:05:14 +0000 Subject: [issue16569] Preventing errors of simultaneous access in zipfile In-Reply-To: <1354112511.94.0.436567820333.issue16569@psf.upfronthosting.co.za> Message-ID: <1354115114.15.0.43317351585.issue16569@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Reading from closed ZipFile or reading from ZipFile opened for write already forbidden. This is a preventing of the same kind. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 16:11:08 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 28 Nov 2012 15:11:08 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1354115468.88.0.0122368265906.issue16333@psf.upfronthosting.co.za> anatoly techtonik added the comment: The problem with policy and 'common sense' is that not everybody can feel that 'common sense', especially when there is no time to go deep into the issue. Policy is a quick and good 42 no matter that the matter is. The problem that it is also a filter, which puts a barrier in front of all reasonable arguments. You have either to transform yourself to live behind the barrier or to leave. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 16:56:27 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 28 Nov 2012 15:56:27 +0000 Subject: [issue16565] Increase Py_AddPendingCall array size In-Reply-To: <1354048654.58.0.545467206879.issue16565@psf.upfronthosting.co.za> Message-ID: <1354118187.73.0.0857594053582.issue16565@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 16:58:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 28 Nov 2012 15:58:50 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1354118330.79.0.288349069264.issue16333@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which adds a suggestion to use appropriate separators with indent. It also use they in Lib/json/tool.py. I suggest this patch only for old Python, up to 3.3. For 3.4 this is not needed if my previous suggestion will be accepted. ---------- Added file: http://bugs.python.org/file28148/json_indent_separators_suggestion.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 17:02:00 2012 From: report at bugs.python.org (Brian Berard) Date: Wed, 28 Nov 2012 16:02:00 +0000 Subject: [issue16571] Iterating over inconsistently-indented code block causes execution of code only on last iteration of loop Message-ID: <1354118520.63.0.69805798217.issue16571@psf.upfronthosting.co.za> New submission from Brian Berard: When a loop (for loop in this case) contains multiple lines of code, if the lines are inconsistently indented, the for loop will only execute those lines on the final pass through the loop with no type of warning regarding indentation error. Ex. for i in range(0,10): print "I will print on every iteration: %d" % i # TAB indented print "I will only print on the final iteration: %d" % i # 4 spaces ---------- components: Interpreter Core files: python_test.py messages: 176551 nosy: dimitriprosser priority: normal severity: normal status: open title: Iterating over inconsistently-indented code block causes execution of code only on last iteration of loop type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file28149/python_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 17:26:46 2012 From: report at bugs.python.org (Brian Berard) Date: Wed, 28 Nov 2012 16:26:46 +0000 Subject: [issue16571] Iterating over inconsistently-indented code block causes execution of code only on last iteration of loop In-Reply-To: <1354118520.63.0.69805798217.issue16571@psf.upfronthosting.co.za> Message-ID: <1354120006.32.0.507724686179.issue16571@psf.upfronthosting.co.za> Changes by Brian Berard : ---------- type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 17:39:46 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 28 Nov 2012 16:39:46 +0000 Subject: [issue16571] Iterating over inconsistently-indented code block causes execution of code only on last iteration of loop In-Reply-To: <1354118520.63.0.69805798217.issue16571@psf.upfronthosting.co.za> Message-ID: <1354120786.11.0.976632918507.issue16571@psf.upfronthosting.co.za> Mark Dickinson added the comment: This is expected behaviour for Python 2.x: Python interprets every TAB character as advancing to the next multiple-of-8 column, regardless of how your editor sees it. It would be too disruptive to change this behaviour in Python 2.x. It's already fixed in Python 3: there it's a syntax error to mix tabs and spaces in this way. Python 2.7 gives a warning if you run with the '-3' flag. ---------- nosy: +mark.dickinson resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 17:41:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 28 Nov 2012 16:41:06 +0000 Subject: [issue16571] Iterating over inconsistently-indented code block causes execution of code only on last iteration of loop In-Reply-To: <1354118520.63.0.69805798217.issue16571@psf.upfronthosting.co.za> Message-ID: <1354120866.5.0.207421118211.issue16571@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 17:44:08 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 28 Nov 2012 16:44:08 +0000 Subject: [issue16474] More code coverage for imp module In-Reply-To: <1352938470.43.0.179582544246.issue16474@psf.upfronthosting.co.za> Message-ID: <1354121048.67.0.0436307550885.issue16474@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I think nothing bad to push additional tests into 3.3 also. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 18:06:06 2012 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 28 Nov 2012 17:06:06 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1354122366.09.0.643035868387.issue15990@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum, python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 18:06:15 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 28 Nov 2012 17:06:15 +0000 Subject: [issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object In-Reply-To: <1344732276.83.0.543554641885.issue15627@psf.upfronthosting.co.za> Message-ID: <1354122375.04.0.573358416272.issue15627@psf.upfronthosting.co.za> Brett Cannon added the comment: It might not be compulsory, but how else are you going to get a code object? Then again, get_code() kind of codifies the use of the word "code" for methods that return a code object. So if you want to do the work to change the name then go ahead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 18:18:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 28 Nov 2012 17:18:36 +0000 Subject: [issue11076] Iterable argparse Namespace In-Reply-To: <1296461103.49.0.397676179483.issue11076@psf.upfronthosting.co.za> Message-ID: <3YBT9712cNzQJt@mail.python.org> Roundup Robot added the comment: New changeset bbecbcff0ce4 by Andrew Svetlov in branch '3.2': Issue #11076: document the way to convert argparse.Namespace to a dict. http://hg.python.org/cpython/rev/bbecbcff0ce4 New changeset ee4e31845977 by Andrew Svetlov in branch '3.3': Merge issue #11076: document the way to convert argparse.Namespace to a dict. http://hg.python.org/cpython/rev/ee4e31845977 New changeset 63ff2d421d1a by Andrew Svetlov in branch 'default': Merge issue #11076: document the way to convert argparse.Namespace to a dict. http://hg.python.org/cpython/rev/63ff2d421d1a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 18:21:46 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 28 Nov 2012 17:21:46 +0000 Subject: [issue16570] Absolute imports fail to take full path into account? In-Reply-To: <1354113971.91.0.733086645605.issue16570@psf.upfronthosting.co.za> Message-ID: <1354123306.15.0.87527570121.issue16570@psf.upfronthosting.co.za> Brett Cannon added the comment: This test example is nonsensical. You are directly executing a package which leads to pkg/tests being put in sys.path first. That means you end up with http in pkg/tests masking the one in the stdlib, which causes your ``from http.clients import HTTPConnection`` to fail. You should be using the -m option with a proper __main__.py file to avoid this. If you do that with a __main__.py file doing nothing more than ``from pkg import tests`` everything works. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 18:26:42 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 28 Nov 2012 17:26:42 +0000 Subject: [issue11076] Iterable argparse Namespace In-Reply-To: <1296461103.49.0.397676179483.issue11076@psf.upfronthosting.co.za> Message-ID: <1354123602.86.0.696246439801.issue11076@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Sorry, looks like it work already was done. Reverting: c008f070f88a 814403d824a5 ddcf09a348ca ---------- nosy: +asvetlov resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 18:31:15 2012 From: report at bugs.python.org (Dirkjan Ochtman) Date: Wed, 28 Nov 2012 17:31:15 +0000 Subject: [issue16570] Absolute imports fail to take full path into account? In-Reply-To: <1354113971.91.0.733086645605.issue16570@psf.upfronthosting.co.za> Message-ID: <1354123875.82.0.845794222315.issue16570@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: It's not nonsensical. Something exactly like it came up while I was looking into porting couchdb-python to Python 3. couchdb-python has had a couchdb.http module for a while now; it didn't start clashing with the stdlib until Python 3. Also, I don't understand why Python is trying to import any "bare" http, when all the imports are absolute. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 19:07:19 2012 From: report at bugs.python.org (Dirkjan Ochtman) Date: Wed, 28 Nov 2012 18:07:19 +0000 Subject: [issue16570] Absolute imports fail to take full path into account? In-Reply-To: <1354113971.91.0.733086645605.issue16570@psf.upfronthosting.co.za> Message-ID: <1354126039.36.0.499376999015.issue16570@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: Never mind, I get what you're getting at now. I thought that the cwd was added to the sys.path, not the containing directory for the executed script. I'll look into using __main__. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 19:08:54 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 28 Nov 2012 18:08:54 +0000 Subject: [issue16570] Absolute imports fail to take full path into account? In-Reply-To: <1354113971.91.0.733086645605.issue16570@psf.upfronthosting.co.za> Message-ID: <1354126134.18.0.699700564492.issue16570@psf.upfronthosting.co.za> Brett Cannon added the comment: When you execute a module on the command line, sys.path[0] is set to that containing directory (e.g. pkg/tests in your example; just have pkg/tests/__init__.py print out sys.path to see what I mean). ``import http`` is going to look on sys.path no matter what, and with ``pkg/tests`` being the first entry on sys.path, its going to find pkg/tests/http.py before it even has a chance to look in the directory containing the stdlib. A bare import only means "look on sys.path", not "magically only look in the stdlib". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 19:10:46 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 28 Nov 2012 18:10:46 +0000 Subject: [issue16570] Absolute imports fail to take full path into account? In-Reply-To: <1354113971.91.0.733086645605.issue16570@psf.upfronthosting.co.za> Message-ID: <1354126246.93.0.78246486688.issue16570@psf.upfronthosting.co.za> Brett Cannon added the comment: Glad it makes sense now. =) I was writing my reply while you sent yours. Anyway, your PYTHONPATH setting goes on to sys.path *after* the directory containing the script being executed. This is so that when you execute Python code somewhere it will get the local modules and packages it expects and not some random one you accidentally masked using PYTHONPATH. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 19:10:56 2012 From: report at bugs.python.org (Ned Batchelder) Date: Wed, 28 Nov 2012 18:10:56 +0000 Subject: [issue16571] Iterating over inconsistently-indented code block causes execution of code only on last iteration of loop In-Reply-To: <1354118520.63.0.69805798217.issue16571@psf.upfronthosting.co.za> Message-ID: <1354126256.05.0.0568267550625.issue16571@psf.upfronthosting.co.za> Ned Batchelder added the comment: @Brian: Your code doesn't run in Python 2.7 as you've shown it, it produces an IndentationError. If your code is actually different, and does run, try running it with the -tt flag on Python, which will warn about inconsistent indentation. ---------- nosy: +nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 19:19:01 2012 From: report at bugs.python.org (Brian Berard) Date: Wed, 28 Nov 2012 18:19:01 +0000 Subject: [issue16571] Iterating over inconsistently-indented code block causes execution of code only on last iteration of loop In-Reply-To: <1354118520.63.0.69805798217.issue16571@psf.upfronthosting.co.za> Message-ID: <1354126741.86.0.672061797163.issue16571@psf.upfronthosting.co.za> Brian Berard added the comment: @nedbat I'm able to run that code as is and receive no such error. With the -tt option, I do receive an indentation error. I will keep that in mind. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 19:29:02 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 28 Nov 2012 18:29:02 +0000 Subject: [issue16570] Absolute imports fail to take full path into account? In-Reply-To: <1354113971.91.0.733086645605.issue16570@psf.upfronthosting.co.za> Message-ID: <1354127342.32.0.898702665938.issue16570@psf.upfronthosting.co.za> Eric Snow added the comment: Things are working as they should here. The key points: * when running a script, sys.path[0] is set to the script's directory (with no script sys.path[0] is set to the CWD, see issue13475), * pkg/tests/__init__.py is loaded and executed twice: once as the script under the __main__ module and once during import as pkg.tests, * Python does not handle circular imports very well, * bad things happen when a "top-level" module has the same name as a module in the stdlib. Together those explain what's going on. The import you did at the REPL happened with '' at sys.path[0], so modules are found at the right relative places: pkg, pkg.http, pkg.tests, and pkg.tests.http. There is no script involved, just imports, so no double-loading happens. Things go south when you run "PYTHONPATH=. python3 pkg/tests/__init__.py". First of all, pkg/tests/__init__.py is executed twice: once as the script and once under import. Though you set PYTHONPATH, sys.path[0] is set to "pkg/tests", the directory the script is in. sys.path[1] is ".", what you were expecting to be at sys.path[0]. So when finding modules, the import system will first look in "pkg/tests" then in ".". Thus the pkg.* imports work as expected. However, "from http.client import HTTPConnection" in pkg/tests/http.py finds the same http.py (this time as the "http" module instead of "pkg.tests.http") in pkg/tests rather than the stdlib module as you expected. So it tries to import it a second time with a different module name. Since pkg/tests/http.py is already being loaded due to pkg/test/__init__.py, you get a circular import. Even if you did not get the circular import you would have gotten an ImportError for "http.client" since pkg/tests/http.py neither behaves like a package nor actually has any "client" submodule. Part of the fix is to use relative imports where appropriate. For instance, change pkg/tests/__init__.py like this: from . import http Also, don't run pkg/tests/__init__.py directly. Instead try this: PYTHONPATH=. python3 -m pkg.tests However, this implies that you wanted to run the package as a script, so you should have pkg/tests/__main__.py which would import pkg.tests. Alternately, you could have a dedicated script elsewhere, perhaps next to the pkg directory that does the same thing. Here's what I mean: some_project/ pkg/ tests/ __init__.py __main__.py (option 1) http.py __init__.py run_unittests.py (option 2) Finally, don't name your modules with the same names as those in the stdlib. ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 19:30:20 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 28 Nov 2012 18:30:20 +0000 Subject: [issue16570] Absolute imports fail to take full path into account? In-Reply-To: <1354113971.91.0.733086645605.issue16570@psf.upfronthosting.co.za> Message-ID: <1354127420.74.0.135981215337.issue16570@psf.upfronthosting.co.za> Eric Snow added the comment: oops. too slow. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 19:34:11 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 28 Nov 2012 18:34:11 +0000 Subject: [issue11076] Iterable argparse Namespace In-Reply-To: <1296461103.49.0.397676179483.issue11076@psf.upfronthosting.co.za> Message-ID: <1354127651.72.0.345437580613.issue11076@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Following up Andrew's last comment, for the record, it looks like this was done as part of issue 8982. ---------- nosy: +chris.jerdonek superseder: -> argparse docs cross reference Namespace as a class but the Namespace class is not documented _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 19:44:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 28 Nov 2012 18:44:49 +0000 Subject: [issue16568] allow constructors to be documented separately from class In-Reply-To: <1354093412.82.0.692042663136.issue16568@psf.upfronthosting.co.za> Message-ID: <1354128289.3.0.119194389793.issue16568@psf.upfronthosting.co.za> Ezio Melotti added the comment: I was wondering if this should be called initializer instead of constructor. Another idea is to keep using the "method" directive and use :initializer: to differentiate it from the others. This might be easier to implement, but OTOH is not consistent with the staticmethod and classmethod directives though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 19:49:04 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 28 Nov 2012 18:49:04 +0000 Subject: [issue16568] allow constructors to be documented separately from class In-Reply-To: <1354093412.82.0.692042663136.issue16568@psf.upfronthosting.co.za> Message-ID: <1354128544.05.0.510960549561.issue16568@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 20:17:06 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 28 Nov 2012 19:17:06 +0000 Subject: [issue16565] Increase Py_AddPendingCall array size In-Reply-To: <1354048654.58.0.545467206879.issue16565@psf.upfronthosting.co.za> Message-ID: <1354130226.92.0.00927219032813.issue16565@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This array would still have a fixed size. Could you arrange your code so that you enqueue pending calls elsewhere, and call Py_AddPendingCall only once until the pending items have been processed? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 20:24:44 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 28 Nov 2012 19:24:44 +0000 Subject: [issue16565] Increase Py_AddPendingCall array size In-Reply-To: <1354048654.58.0.545467206879.issue16565@psf.upfronthosting.co.za> Message-ID: <1354130683.99.0.726420985907.issue16565@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I just took a look at https://github.com/felipecruz/pyaio/commit/127372ba0a6dbca4045256dcd653789ee35f6a78 and it looks a bit silly to me: if the completion handler is called in a separate thread, then the completion handler can just take the GIL and put the results in a regular Python queue. In short, using signals for any kind of high-speed I/O sounds completely archaic to me. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 20:28:15 2012 From: report at bugs.python.org (Chris Kaynor) Date: Wed, 28 Nov 2012 19:28:15 +0000 Subject: [issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator In-Reply-To: <1230900364.95.0.0532833034138.issue4806@psf.upfronthosting.co.za> Message-ID: <1354130895.08.0.637756281164.issue4806@psf.upfronthosting.co.za> Changes by Chris Kaynor : ---------- nosy: +DragonFireCK _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 20:49:54 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 28 Nov 2012 19:49:54 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1354132194.78.0.474110014519.issue16333@psf.upfronthosting.co.za> Ezio Melotti added the comment: > There is no promise of binary compatibility for pretty-printed data. This was the reason that made me consider backporting this on the other branches. After all I expect this feature to be used from the terminal, while printing JSON in a human-friendly format and in other situations were trailing spaces would have little or no importance. OTOH people might be used pretty-printed JSON in tests to get a better a diff for example, and changing that in a debug release might be annoying. IOW the annoyance of having trailing spaces if it doesn't get fixed evens out the annoyance of having a possibly unwanted change of behavior if it does get fixed. Serhiy patches look good to me (modulo a couple of minor typos), so I will probably apply them as soon as I get a chance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 20:56:25 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 28 Nov 2012 19:56:25 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1354132585.82.0.931954292841.issue16333@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, I think the risk of breaking doctests (and breaking them in a very mysterious way...trailing spaces) is high enough that we shouldn't backport the fix, unfortunately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 21:35:29 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 28 Nov 2012 20:35:29 +0000 Subject: [issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4) In-Reply-To: <1286609205.46.0.0704666326351.issue10052@psf.upfronthosting.co.za> Message-ID: <1354134929.28.0.912369220645.issue10052@psf.upfronthosting.co.za> Changes by Trent Nelson : ---------- nosy: +trent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 21:35:44 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Nov 2012 20:35:44 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1354134944.03.0.234226881861.issue16333@psf.upfronthosting.co.za> ?ric Araujo added the comment: I agree with RDM. ---------- versions: -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 21:38:13 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 28 Nov 2012 20:38:13 +0000 Subject: [issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4) In-Reply-To: <1286609205.46.0.0704666326351.issue10052@psf.upfronthosting.co.za> Message-ID: <1354135093.94.0.339952982279.issue10052@psf.upfronthosting.co.za> Mark Dickinson added the comment: This is also an issue on the Tru64 / alpha on Snakebite: that platform has inttypes.h but no stdint.h, and inttypes.h has typedefs for uint32_t and friends, but no defines for UINT32_MAX, etc. So the pyport.h check: #if (defined UINT32_MAX || defined uint32_t) fails (uint32_t is a typedef rather than a #define). To make matters worse, the autoconf macro AC_TYPE_UINT32_T correctly detects that uint32_t exists, so doesn't bother to define it. The ideal place to fix this would be in the configure scripts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 21:45:07 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 28 Nov 2012 20:45:07 +0000 Subject: [issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4) In-Reply-To: <1286609205.46.0.0704666326351.issue10052@psf.upfronthosting.co.za> Message-ID: <1354135507.56.0.71310620315.issue10052@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 21:45:26 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 28 Nov 2012 20:45:26 +0000 Subject: [issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4) In-Reply-To: <1286609205.46.0.0704666326351.issue10052@psf.upfronthosting.co.za> Message-ID: <1354135526.85.0.901488814346.issue10052@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 22:12:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 28 Nov 2012 21:12:56 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1354137176.03.0.291237515672.issue16333@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please left 2.7, 3.2 and 3.3 for documentation changes (the second patch). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 22:13:32 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Nov 2012 21:13:32 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1354137212.0.0.310716491726.issue16333@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Documentation versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 22:18:39 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 28 Nov 2012 21:18:39 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1354137519.15.0.979607944722.issue15990@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Note that I took this from the pep. The pep could get the same clarification > (unless I made it more confusing than it was). Reading the following, it seems that PEPs aren't generally clarified after becoming Final (as is PEP 362): "In general, Standards track PEPs are no longer modified after they have reached the Final state." (from http://www.python.org/dev/peps/pep-0001/#pep-maintenance ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 22:35:08 2012 From: report at bugs.python.org (Thomas Chiroux) Date: Wed, 28 Nov 2012 21:35:08 +0000 Subject: [issue16572] Bad multi-inheritance support in some libs like threading or multiprocessing Message-ID: <1354138508.41.0.9459136379.issue16572@psf.upfronthosting.co.za> New submission from Thomas Chiroux: when using multi-inheritance and super() in __init__(), super() tries to run each constructor once. For this to work correctly, it is needed to call super() in each constructor, including for Classes directly inherited from object. The sample below does not execute correctly because threading.Thread constructor does not call super() (and because Thread inherit from _Verbose, _Verbose should also call super() ) Sample: from threading import Thread class Foo(object): def __init__(self): super(Foo, self).__init__() print('Foo constructor') self.param1 = 'foo param1' class Bar(Thread, Foo): def __init__(self): super(Bar, self).__init__() print('Bar constructor') self.another_param1 = "bar another_param1" def run(self): print("Running (%s - %s)" % (self.another_param1, self.param1)) if __name__ == '__main__': threads = [] for i in range(1, 10): thread = Bar() threads.append(thread) thread.start() for thread in threads: thread.join() This sample work by simply inverting Thread and Foo : (...) class Bar(Foo, Thread): (...) The sample is about threading.Thread, but it's also the same for multiprocessing.Process, and maybe for other modules in stdlib. attached is a proposed path for threading.Tread in 2.7 I've tested the issue and have the same behavior in 2.7 and in 3.3 ---------- components: Library (Lib) files: diff_threading.py_2.7.patch keywords: patch messages: 176576 nosy: thomas.chiroux priority: normal severity: normal status: open title: Bad multi-inheritance support in some libs like threading or multiprocessing type: behavior versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file28150/diff_threading.py_2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 22:56:09 2012 From: report at bugs.python.org (Stefan Krah) Date: Wed, 28 Nov 2012 21:56:09 +0000 Subject: [issue9176] module termios doesn't build on HP-UX In-Reply-To: <1278409886.91.0.742762759895.issue9176@psf.upfronthosting.co.za> Message-ID: <1354139769.87.0.501983598589.issue9176@psf.upfronthosting.co.za> Stefan Krah added the comment: This should be fixed now (see #6308). ---------- nosy: +skrah resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> termios fix for QNX breaks HP-UX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 23:01:33 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Nov 2012 22:01:33 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1354140093.13.0.354767124233.issue15990@psf.upfronthosting.co.za> ?ric Araujo added the comment: PEP 1 doesn?t reflect current practice then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 23:04:03 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 28 Nov 2012 22:04:03 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1354140243.44.0.164294209587.issue15990@psf.upfronthosting.co.za> Ezio Melotti added the comment: The PEPs don't undergo major changes, but AFAIU typo fixes and minor clarifications/rephrasing are allowed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 23:06:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 28 Nov 2012 22:06:47 +0000 Subject: [issue16572] Bad multi-inheritance support in some libs like threading or multiprocessing In-Reply-To: <1354138508.41.0.9459136379.issue16572@psf.upfronthosting.co.za> Message-ID: <1354140407.32.0.324572614599.issue16572@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Can you please provide a diff in unified format? I don't see any super() in Lib/threading.py. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 23:16:25 2012 From: report at bugs.python.org (Thomas Chiroux) Date: Wed, 28 Nov 2012 22:16:25 +0000 Subject: [issue16572] Bad multi-inheritance support in some libs like threading or multiprocessing In-Reply-To: <1354138508.41.0.9459136379.issue16572@psf.upfronthosting.co.za> Message-ID: <1354140985.82.0.0586423353994.issue16572@psf.upfronthosting.co.za> Thomas Chiroux added the comment: updated diff file, unified format ---------- Added file: http://bugs.python.org/file28151/diff_unified_threading.py_2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 23:17:15 2012 From: report at bugs.python.org (Stefan Krah) Date: Wed, 28 Nov 2012 22:17:15 +0000 Subject: [issue16534] -Olimit: unsupported option: warnings and ./configure failures In-Reply-To: <1353623026.18.0.63278964149.issue16534@psf.upfronthosting.co.za> Message-ID: <1354141035.88.0.60113517303.issue16534@psf.upfronthosting.co.za> Stefan Krah added the comment: The issue here is that the BASECFLAGS variable contains the mysterious option -Olimit 1500, which makes the X87_DOUBLE_ROUNDING test fail (i.e. X87_DOUBLE_ROUNDING is set to true when it should be false). When BASECFLAGS is unset, test_float passes. -Olimit gives problems with at least icc, suncc and HP C/aC++. So propose to make this an -Olimit issue instead. ---------- components: +Build -Tests keywords: +buildbot stage: -> needs patch title: test_float failure on IA64 (HPUX) -> -Olimit: unsupported option: warnings and ./configure failures versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 23:43:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 28 Nov 2012 22:43:13 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <3YBcMh0VVHzQLc@mail.python.org> Roundup Robot added the comment: New changeset 78bad589f205 by Ezio Melotti in branch '2.7': #16333: document a way to get rid of trailing whitespace when indent is used. http://hg.python.org/cpython/rev/78bad589f205 New changeset 2a5b183ac3cd by Ezio Melotti in branch '3.2': #16333: document a way to get rid of trailing whitespace when indent is used. http://hg.python.org/cpython/rev/2a5b183ac3cd New changeset 9d6706b6b482 by Ezio Melotti in branch '3.3': #16333: merge with 3.2. http://hg.python.org/cpython/rev/9d6706b6b482 New changeset 8b30a764b58d by Ezio Melotti in branch 'default': #16333: null merge with 3.3. http://hg.python.org/cpython/rev/8b30a764b58d New changeset e63ac05ccfa8 by Ezio Melotti in branch 'default': #16333: use (",", ": ") as default separator when indent is specified to avoid trailing whitespace. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/e63ac05ccfa8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 23:45:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 28 Nov 2012 22:45:35 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <3YBcQQ4WC8zQRT@mail.python.org> Roundup Robot added the comment: New changeset e7919cf9b5e5 by Ezio Melotti in branch 'default': #16333: fix example in docstring. http://hg.python.org/cpython/rev/e7919cf9b5e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 28 23:47:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 28 Nov 2012 22:47:48 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1354142868.12.0.374254233303.issue16333@psf.upfronthosting.co.za> Ezio Melotti added the comment: I committed the patches leaving out the json.tool changes. I will commit those as part of #16476. Thanks Serhiy for the patches! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 00:09:02 2012 From: report at bugs.python.org (Stefan Krah) Date: Wed, 28 Nov 2012 23:09:02 +0000 Subject: [issue15043] test_gdb is disallowed by default security settings in Fedora 17 In-Reply-To: <1339418920.32.0.804230672204.issue15043@psf.upfronthosting.co.za> Message-ID: <1354144142.38.0.0840698212309.issue15043@psf.upfronthosting.co.za> Stefan Krah added the comment: The test still seems to fail on Fedora 16: http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%202.7/builds/906/steps/test/logs/stdio ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 00:18:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 28 Nov 2012 23:18:10 +0000 Subject: [issue16534] -Olimit: unsupported option: warnings and ./configure failures In-Reply-To: <1353623026.18.0.63278964149.issue16534@psf.upfronthosting.co.za> Message-ID: <3YBd822VfCzQG7@mail.python.org> Roundup Robot added the comment: New changeset 5697387b0089 by Stefan Krah in branch '2.7': Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive. http://hg.python.org/cpython/rev/5697387b0089 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 00:22:03 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 28 Nov 2012 23:22:03 +0000 Subject: [issue16572] Bad multi-inheritance support in some libs like threading or multiprocessing In-Reply-To: <1354138508.41.0.9459136379.issue16572@psf.upfronthosting.co.za> Message-ID: <1354144923.25.0.0452160741266.issue16572@psf.upfronthosting.co.za> Richard Oudkerk added the comment: The patch is liable to break programs which explicitly call base constructors because the constructor will be called more than once. It also assumes that the __init__() method of all base classes should be called with no arguments (other than self). That is true in your example, but won't be in general. ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 00:53:40 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 28 Nov 2012 23:53:40 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1354146820.75.0.472593438669.issue15990@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for the clarification. I will create an issue to clarify that part of PEP 1. It should also say who is allowed to make such changes and whether/from whom approval is necessary, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 00:58:00 2012 From: report at bugs.python.org (Jonathan Kotta) Date: Wed, 28 Nov 2012 23:58:00 +0000 Subject: [issue16573] 2to3 should treat enumerate like sorted for zip, map, filter, dict, xrange Message-ID: <1354147080.22.0.730661642804.issue16573@psf.upfronthosting.co.za> New submission from Jonathan Kotta: enumerate() is a "consuming_call", as defined in fixer_util.py, because it takes an iterable (not necessarily a collection). Therefore whenever we have something like enumerate(zip(...)), we don't need to replace it with enumerate(list(zip(...))) in 2to3, because enumerate doesn't care that zip no longer returns a list. Patch attached. ---------- components: 2to3 (2.x to 3.x conversion tool) files: enumerate.patch keywords: patch messages: 176590 nosy: jpkotta priority: normal severity: normal status: open title: 2to3 should treat enumerate like sorted for zip, map, filter, dict, xrange type: behavior Added file: http://bugs.python.org/file28152/enumerate.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 01:12:19 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Nov 2012 00:12:19 +0000 Subject: [issue16476] Trailing spaces in pretty-printed JSON In-Reply-To: <1352978136.54.0.595211017134.issue16476@psf.upfronthosting.co.za> Message-ID: <1354147939.23.0.386362832099.issue16476@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 01:14:00 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 29 Nov 2012 00:14:00 +0000 Subject: [issue16534] -Olimit: unsupported option: warnings and ./configure failures In-Reply-To: <1353623026.18.0.63278964149.issue16534@psf.upfronthosting.co.za> Message-ID: <1354148040.73.0.0728773034818.issue16534@psf.upfronthosting.co.za> Stefan Krah added the comment: ./configure is fixed, sys.float_repr_style is 'short' now. I agree that it's not worth backporting Py_NAN fixes; I guess we can close this then. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 01:15:32 2012 From: report at bugs.python.org (Thomas Chiroux) Date: Thu, 29 Nov 2012 00:15:32 +0000 Subject: [issue16572] Bad multi-inheritance support in some libs like threading or multiprocessing In-Reply-To: <1354138508.41.0.9459136379.issue16572@psf.upfronthosting.co.za> Message-ID: <1354148132.9.0.0119929901401.issue16572@psf.upfronthosting.co.za> Thomas Chiroux added the comment: That's right. Lets consider this 'patch' was more for illustrating my example (like: this kind of modification may work) than to add directly into python core module... (which i'm not capable of) But I think the problem remains: do you agree that Classes should include a super() call in their __init__ ? [btw indeed a super() call with kwargs: super(ClassName, self).__init__(**kwargs)] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 01:27:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 29 Nov 2012 00:27:46 +0000 Subject: [issue16476] Trailing spaces in pretty-printed JSON In-Reply-To: <1352978136.54.0.595211017134.issue16476@psf.upfronthosting.co.za> Message-ID: <3YBfhK3yMWzRPl@mail.python.org> Roundup Robot added the comment: New changeset fa277ab588de by Ezio Melotti in branch '2.7': #16476: Fix json.tool to avoid including trailing whitespace. http://hg.python.org/cpython/rev/fa277ab588de New changeset 6996a53f13ce by Ezio Melotti in branch '3.2': #16476: Fix json.tool to avoid including trailing whitespace. http://hg.python.org/cpython/rev/6996a53f13ce New changeset 73a7e6ecd0e1 by Ezio Melotti in branch '3.3': #16476: merge with 3.2. http://hg.python.org/cpython/rev/73a7e6ecd0e1 New changeset c062ef6e4c3e by Ezio Melotti in branch 'default': #16476: null merge with 3.3. http://hg.python.org/cpython/rev/c062ef6e4c3e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 01:27:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 29 Nov 2012 00:27:47 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <3YBfhL2KhfzRPt@mail.python.org> Roundup Robot added the comment: New changeset 08e5973fdc7e by Ezio Melotti in branch '2.7': #16549: Add tests for json.tools. Initial patch by Berker Peksag and Serhiy Storchaka. http://hg.python.org/cpython/rev/08e5973fdc7e New changeset 44c544809e6c by Ezio Melotti in branch '3.2': #16549: Make json.tool work again on Python 3 and add tests. Initial patch by Berker Peksag and Serhiy Storchaka. http://hg.python.org/cpython/rev/44c544809e6c New changeset 1e2ae5e01963 by Ezio Melotti in branch '3.3': #16549: merge with 3.2. http://hg.python.org/cpython/rev/1e2ae5e01963 New changeset cdeca27b32e5 by Ezio Melotti in branch 'default': #16549: merge with 3.3. http://hg.python.org/cpython/rev/cdeca27b32e5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 01:30:27 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Nov 2012 00:30:27 +0000 Subject: [issue16476] Trailing spaces in pretty-printed JSON In-Reply-To: <1352978136.54.0.595211017134.issue16476@psf.upfronthosting.co.za> Message-ID: <1354149027.77.0.809809897653.issue16476@psf.upfronthosting.co.za> Ezio Melotti added the comment: I fixed this separately from #16333. In the "default" branch this got fixed by #16333 already. Thanks for the report! ---------- assignee: -> ezio.melotti components: +Library (Lib) resolution: duplicate -> fixed versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 01:31:17 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Nov 2012 00:31:17 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <1354149077.82.0.825386830191.issue16549@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patches! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 01:33:38 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 29 Nov 2012 00:33:38 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <3YBfq61LtRzRPj@mail.python.org> Roundup Robot added the comment: New changeset 1e3b01c52aee by Ezio Melotti in branch 'default': #16333: add Misc/NEWS entry for e63ac05ccfa8. http://hg.python.org/cpython/rev/1e3b01c52aee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 01:35:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Nov 2012 00:35:48 +0000 Subject: [issue16476] Trailing spaces in pretty-printed JSON In-Reply-To: <1352978136.54.0.595211017134.issue16476@psf.upfronthosting.co.za> Message-ID: <1354149348.11.0.663824093027.issue16476@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 01:56:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 29 Nov 2012 00:56:56 +0000 Subject: [issue16574] clarify policy on updates to final peps Message-ID: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to clarify the policy in PEP 1 regarding non-substantive changes to PEPs in the Final state (minor clarifications, rephrasings, etc). Currently, PEP 1 says, "In general, Standards track PEPs are no longer modified after they have reached the Final state." (from http://www.python.org/dev/peps/pep-0001/#pep-maintenance ) However, others have pointed out that minor clarifications and rephrasings are in fact allowed: http://bugs.python.org/issue15990#msg176575 The updated wording should also state the policy or process regarding such changes (who is allowed to make them and whether and from whom approval is needed to make such changes, etc). ---------- assignee: docs at python components: Documentation messages: 176598 nosy: barry, chris.jerdonek, docs at python, eric.araujo, ezio.melotti, goodger, ncoghlan priority: normal severity: normal status: open title: clarify policy on updates to final peps type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 01:57:43 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 29 Nov 2012 00:57:43 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1354150663.84.0.542596667625.issue15990@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I just created issue 16574 to clarify PEP 1 with regard to the above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 02:05:52 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 29 Nov 2012 01:05:52 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1354151152.35.0.325162535326.issue16333@psf.upfronthosting.co.za> ?ric Araujo added the comment: Ezio, I noticed in the check-in mail that you added the note before the description of the separators argument (specifically, the descrition of what it does when it?s a tuple). Maybe it would flow best to move the note after that part? Also, I don?t think this is important enought that it warrants a note directive. Regular text would have looked good to me. Kudos for the patch otherwise; I love it when we can at least give workarounds and recipes in stable versions? docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 02:15:28 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Nov 2012 01:15:28 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1354151728.54.0.412352995159.issue16333@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I noticed in the check-in mail that you added the note before > the description of the separators argument The note is just after the description of the indent argument, because it's relevant only when a indent value is specified. > Regular text would have looked good to me. I considered this, but I think it's ok. I built the doc and the note is not too bad. The other two alternatives were: 1) use a normal paragraph, but that would have broken the flow, since each paragraph describes a different arg; 2) write it in the same paragraph of "indent", but that would have made it less visible. FTR I also closed the related issues #16476 and #16549. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 02:20:30 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 29 Nov 2012 01:20:30 +0000 Subject: [issue16572] Bad multi-inheritance support in some libs like threading or multiprocessing In-Reply-To: <1354138508.41.0.9459136379.issue16572@psf.upfronthosting.co.za> Message-ID: <1354152030.95.0.117755647555.issue16572@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > But I think the problem remains: do you agree that Classes should include > a super() call in their __init__ ? No, I don't. I think super() is an attractive nuisance which is difficult to use correctly in an __init__() method, except in the trivial case where you only have one (non-mixin) base class. See https://fuhm.net/super-harmful/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 02:49:19 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 29 Nov 2012 01:49:19 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> Message-ID: <1354153759.15.0.953277251507.issue16574@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't think this needs clarification. The status quo is fine. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 03:00:54 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 29 Nov 2012 02:00:54 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> Message-ID: <1354154454.28.0.847723930068.issue16574@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Are you saying that PEP 1 is correct and that Final PEPs should not be modified, or that the PEP isn't correct but that it shouldn't be modified? If the latter, for someone new it's not clear whether minor clarifications are permitted and if so, how to go about making one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 03:08:12 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 29 Nov 2012 02:08:12 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> Message-ID: <1354154892.54.0.367739099352.issue16574@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think Brett edited PEP 302 a decade after its acceptance. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 03:16:00 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 29 Nov 2012 02:16:00 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1354155360.97.0.0259701011214.issue16333@psf.upfronthosting.co.za> ?ric Araujo added the comment: All right. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 03:26:17 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Thu, 29 Nov 2012 02:26:17 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1354155977.14.0.139004669797.issue7976@psf.upfronthosting.co.za> Bruno Dupuis added the comment: Patch attached. I just exposed _setoption() as process_option() so that the user can manage execptions as she wants but she has to make his own loop. `_OptionError` is exposed as `WarningsOptParsingError`. I'm not satisfied with this name as it is quite long and it contains "Warning" which is bad for something that raise and is not actually a warning. If someone has a better idea... Anyway, I wrote a test case, and I'll write a short reciepe in the doc when the patch is good. It's my very first patch for Python. Be rude, please :) ---------- keywords: +patch nosy: +lisael Added file: http://bugs.python.org/file28153/warnings_opt_parse_API.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 03:35:31 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 29 Nov 2012 02:35:31 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1354156531.92.0.334359305432.issue7976@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks! I reviewed the patch. You should have received an email, or you can follow the ?review? link on the right of your patch in the list of files. Can you add documentation? ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 03:37:48 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 29 Nov 2012 02:37:48 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> Message-ID: <20121128213744.2992f7e3@limelight.wooz.org> Barry A. Warsaw added the comment: On Nov 29, 2012, at 12:56 AM, Chris Jerdonek wrote: > >Currently, PEP 1 says, "In general, Standards track PEPs are no longer >modified after they have reached the Final state." I agree w/mvl. This is still true, and it doesn't mean PEPs can't be modified after reaching Final state. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 03:38:26 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 29 Nov 2012 02:38:26 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1354156706.61.0.560195225626.issue7976@psf.upfronthosting.co.za> ?ric Araujo added the comment: About the name: I think it?s good. ?Warnings? is at the start, meaning this is related to the warnings system; an exception with ?Warning? at the end would however not be good. I started to comment that the name could be just OptionParsingError, given that we don?t need prefixes when we have namespaces (i.e. modules: warnings.OptionParsingError is not ambiguous), but most other names in the modules contain ?warning? so let?s keep the convention. You will have noticed that I prefer Option to Opt :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 03:39:46 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 29 Nov 2012 02:39:46 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> Message-ID: <1354156786.91.0.386123800354.issue16574@psf.upfronthosting.co.za> ?ric Araujo added the comment: Right, ?in general? is good enough to capture what we do. Chris, closing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 03:46:21 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 29 Nov 2012 02:46:21 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> Message-ID: <1354157181.08.0.872921468818.issue16574@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Okay, so in a comment to issue 15990, Ezio suggested that some clarifying changes to PEP 362 might be worth making. How would I (or someone else) go about doing that? Where would they begin? I think this recent e-mail from Nick applies: http://mail.python.org/pipermail/python-dev/2012-November/122525.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 03:47:49 2012 From: report at bugs.python.org (Felipe Cruz) Date: Thu, 29 Nov 2012 02:47:49 +0000 Subject: [issue16565] Increase Py_AddPendingCall array size In-Reply-To: <1354048654.58.0.545467206879.issue16565@psf.upfronthosting.co.za> Message-ID: <1354157269.43.0.696632190945.issue16565@psf.upfronthosting.co.za> Felipe Cruz added the comment: Just confirmed that signals is not a viable option. Is too slow, as Antonie already pointed. It's almost 5 times slower than with SIGEV_THREAD. The problem now is: If I use Py_AddPendingCall, the tests can hang sometimes. I can still follow Amaury suggestion tough. If I try to acquire the GIL PyGILState_Ensure() call PyObject_CallObject and release the GIL in the aio_completion_handler function a SEGFAULT occurs in 2.7.3 but not in 3.3 and newer.. This branch works only on 3.3 and newer: https://github.com/felipecruz/pyaio/tree/feature/check_no_pending_call This other branch will segfault 2.7.3 with just acquire and release GIL on the completion handler: https://github.com/felipecruz/pyaio/tree/feature/py27_gil_error Since this looks very strange, can someone confirm this behavior? Tested on a Ubuntu12 64. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 03:53:08 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 29 Nov 2012 02:53:08 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> Message-ID: <1354157588.1.0.837645576537.issue16574@psf.upfronthosting.co.za> Chris Jerdonek added the comment: By the way, I don't especially care if the clarification goes in the PEP itself or not. What's more important is that it be documented *somewhere* (which could also be the devguide, for example). My interest in knowing the process is genuine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 04:06:38 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Thu, 29 Nov 2012 03:06:38 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1354158398.67.0.588762730114.issue7976@psf.upfronthosting.co.za> Bruno Dupuis added the comment: Thanks, I'll write the doc. Now, I'm not sure that keeping _OptionError as WarningsOptParsingError base class is a good idea. I can't see any use case to catch this exception outside the module and I'm quite sure nobody ever has. However, I tend to be over-conservative when it comes to backward-compatibility, even for underscore names. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 04:10:58 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 29 Nov 2012 03:10:58 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <3YBkJd4TjXzRP4@mail.python.org> Roundup Robot added the comment: New changeset 4102c1a02417 by Ezio Melotti in branch '2.7': #16549: fix test failures on Windows. http://hg.python.org/cpython/rev/4102c1a02417 New changeset 4ec9f0b0f8f1 by Ezio Melotti in branch '3.2': #16549: fix test failures on Windows. http://hg.python.org/cpython/rev/4ec9f0b0f8f1 New changeset e26345437f9f by Ezio Melotti in branch '3.3': #16549: merge with 3.2. http://hg.python.org/cpython/rev/e26345437f9f New changeset 2a73d9e64d34 by Ezio Melotti in branch 'default': #16549: merge with 3.3. http://hg.python.org/cpython/rev/2a73d9e64d34 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 04:16:00 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 29 Nov 2012 03:16:00 +0000 Subject: [issue15043] test_gdb is disallowed by default security settings in Fedora 17 In-Reply-To: <1339418920.32.0.804230672204.issue15043@psf.upfronthosting.co.za> Message-ID: <1354158960.46.0.0395663971572.issue15043@psf.upfronthosting.co.za> R. David Murray added the comment: Since it looks like that is your buildbot, can you do some command line testing to see what is going wrong with the gdb invocation? I'm wondering if perhaps this feature was backported as a security patch, so that the gdb version check is an insufficient check :( Or it could be that I got the version check wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 04:19:49 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 29 Nov 2012 03:19:49 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> Message-ID: <1354159189.41.0.552761379706.issue16574@psf.upfronthosting.co.za> Brett Cannon added the comment: Once PEPs reach their final status, I view them basically done if there is more official docs. For instance, I updated PEP 302 because the import and importlib docs were not as thorough as they are now thanks to Barry. But now that we have proper docs I don't plan to muck with PEP 302 anymore. That being said, I wouldn't object if someone chose to put the effort into updating PEP 302 in the future, I just won't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 04:28:13 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Nov 2012 03:28:13 +0000 Subject: [issue16568] allow constructors to be documented separately from class In-Reply-To: <1354093412.82.0.692042663136.issue16568@psf.upfronthosting.co.za> Message-ID: <1354159693.04.0.961415910915.issue16568@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 04:42:14 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 29 Nov 2012 03:42:14 +0000 Subject: [issue16568] allow constructors to be documented separately from class In-Reply-To: <1354093412.82.0.692042663136.issue16568@psf.upfronthosting.co.za> Message-ID: <1354160534.45.0.570200548261.issue16568@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m interested in an explanation of the value of doing this. In the threading docs for example, the classes (i.e. initializers) are documented in one section, with awkward links to ?Thread objects?, ?Lock objects?, etc. This felt much more cumbersome to me than more modern class/attribute/method combos. Isn?t it the simplest thing to document one class, usage, constructors and all attributes, in one place? On the other hand, I don?t have the view of an outsider anymore, so I can?t say what makes sense / reads better for the doc?s audience (as opposed to doc editors). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 04:45:47 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 29 Nov 2012 03:45:47 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> Message-ID: <1354160747.51.0.213051769928.issue16574@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think the gist here is that ?in general? is good enough, given that there is unwritten consensus about what edits are possible in the developers? heads. Most of the time unwritten knowledge is not good, but (if I get what Martin and Barry mean correctly) for PEP rules this is fine. We don?t want an over-detailed or inflexible process. About the mail from Nick: it was talking about writing a new informational PEP, so I don?t see the link with final standards track PEPs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 04:53:24 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Nov 2012 03:53:24 +0000 Subject: [issue16568] allow constructors to be documented separately from class In-Reply-To: <1354093412.82.0.692042663136.issue16568@psf.upfronthosting.co.za> Message-ID: <1354161204.05.0.478252415033.issue16568@psf.upfronthosting.co.za> Ezio Melotti added the comment: This came up while documenting the str type in datamodel.rst (IIRC), and linking to it from functions.rst. On one hand you want to say what the str type is, on the other hand you want to document the constructor and explain how can you use str() to obtain str objects. Putting both under the constructor doesn't work too well, especially when there's a lot of text. Putting the str type description in a plain paragraph before the "class" directive doesn't work too well either, because :class:`str` will link to the constructor documentation. The idea is to keep the two separate but still provide an easy way to link to the class without missing the general description. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 05:06:11 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Nov 2012 04:06:11 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> Message-ID: <1354161971.58.0.461351526145.issue16574@psf.upfronthosting.co.za> Ezio Melotti added the comment: FTR the reason I suggested to modify PEP 362 is that we are linking to it from the docs. This means that people will go and read the PEP looking for clarifications, so the PEP should be clear. In this regard I see the PEP (or at least the relevant section) as documentation, and given that it's about an aspect of Python that is not going to change any time soon, it makes sense to get it right and keep referencing the PEP. This doesn't normally apply to most of the other PEPs, especially if what they proposed is now documented on docs.python.org. (On a side note, I now noticed that the parameter kinds are also documented in http://docs.python.org/dev/library/inspect.html#inspect.Parameter.kind, so we could link to that instead of linking to the PEP.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 05:07:36 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 29 Nov 2012 04:07:36 +0000 Subject: [issue16568] allow constructors to be documented separately from class In-Reply-To: <1354093412.82.0.692042663136.issue16568@psf.upfronthosting.co.za> Message-ID: <1354162056.54.0.730207470873.issue16568@psf.upfronthosting.co.za> ?ric Araujo added the comment: For all the built-in types, I see the value now. Thinking aloud: Separating the namespaces used by the str and func roles would probably require too many changes in Sphinx. The current way is to use the function directive to document the class/constructor usage in one place, and use ref to link to the section describing the class. You can also have the cool class/method combo if you configure the class directive with the noindex option. Is that not good enough? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 05:16:50 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Thu, 29 Nov 2012 04:16:50 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1354162610.87.0.226622405137.issue7976@psf.upfronthosting.co.za> Bruno Dupuis added the comment: I added the documentation with a recipe. ---------- Added file: http://bugs.python.org/file28154/warnings_opt_parse_API-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 05:18:10 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Nov 2012 04:18:10 +0000 Subject: [issue16568] allow constructors to be documented separately from class In-Reply-To: <1354093412.82.0.692042663136.issue16568@psf.upfronthosting.co.za> Message-ID: <1354162690.41.0.569458932361.issue16568@psf.upfronthosting.co.za> Ezio Melotti added the comment: > For all the built-in types, I see the value now. The same applies for non built-in types too though (e.g. http://docs.python.org/3.4/library/collections.html). The only difference is that the built-in ones have entries in functions.rst and use more links. > Is that not good enough? Not really, and creating additional links and suppressing others with :noindex: feels wrong. The idea is that :class:`str` should just work and link to the right place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 05:22:21 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 29 Nov 2012 04:22:21 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> Message-ID: <1354162941.61.0.486926707138.issue16574@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I think the gist here is that ?in general? is good enough, given that there is unwritten consensus about what edits are possible in the developers? heads. As I said, I'm okay with keeping the PEP as is (with "in general," etc) provided a clarification is documented elsewhere like in the devguide. What I want to avoid are, as you say, there being "unwritten" rules about changing PEPs in the Final state. (It was the general remarks about unwritten rules in Nick's e-mail that I felt were applicable.) The written rules need not be overly-detailed or inflexible so long as they give newcomers without that common understanding a leg up on what to do. It could be something as simple as "non-substantive changes to PEPs in the Final state should be treated like any other changes to the documentation" (or whatever the general process/criteria should be for such changes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 05:22:30 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Nov 2012 04:22:30 +0000 Subject: [issue13094] Need Programming FAQ entry for the behavior of closures In-Reply-To: <1317652797.3.0.357677492942.issue13094@psf.upfronthosting.co.za> Message-ID: <1354162950.68.0.965906401496.issue13094@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 05:22:54 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Nov 2012 04:22:54 +0000 Subject: [issue16495] bytes_decode() unnecessarily examines encoding In-Reply-To: <1353187789.37.0.881944433109.issue16495@psf.upfronthosting.co.za> Message-ID: <1354162974.93.0.992562307782.issue16495@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 05:24:04 2012 From: report at bugs.python.org (Armin Rigo) Date: Thu, 29 Nov 2012 04:24:04 +0000 Subject: [issue16575] ctypes: unions as arguments Message-ID: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> New submission from Armin Rigo: ctypes pretends to support passing arguments to C functions that are unions (not pointers to unions), but that's a lie. In fact, the underlying libffi does not support it. The attached example misbehaves on Linux x86-64. ---------- components: ctypes files: test184_lib.tgz messages: 176627 nosy: arigo priority: normal severity: normal status: open title: ctypes: unions as arguments versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file28155/test184_lib.tgz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 05:25:41 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Thu, 29 Nov 2012 04:25:41 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1354163141.72.0.0498416859598.issue7976@psf.upfronthosting.co.za> Bruno Dupuis added the comment: ?ric, I saw the `review` link just after I submited the second patch, and I read your comments. I'll do the changes. Sorry, I still have to learn the tools and processes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 05:33:04 2012 From: report at bugs.python.org (Alex Gaynor) Date: Thu, 29 Nov 2012 04:33:04 +0000 Subject: [issue16575] ctypes: unions as arguments In-Reply-To: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> Message-ID: <1354163584.06.0.175397575264.issue16575@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 05:49:13 2012 From: report at bugs.python.org (Armin Rigo) Date: Thu, 29 Nov 2012 04:49:13 +0000 Subject: [issue16575] ctypes: unions as arguments In-Reply-To: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> Message-ID: <1354164553.79.0.88214134019.issue16575@psf.upfronthosting.co.za> Changes by Armin Rigo : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 05:53:32 2012 From: report at bugs.python.org (Armin Rigo) Date: Thu, 29 Nov 2012 04:53:32 +0000 Subject: [issue16576] ctypes: structure with bitfields as argument Message-ID: <1354164812.19.0.708202681719.issue16576@psf.upfronthosting.co.za> New submission from Armin Rigo: ctypes pretends to support passing arguments to C functions that are structures containing bitfields, or at least does not explicitly forbid it. But doing so results in misbehavior or segfaults in libffi itself. Indeed, libffi has no support for this, and ctypes just describes a field like "int x:1;" as "int x;". The attached example segfaults on Linux x86-64. ---------- components: ctypes files: test185_lib.tgz messages: 176629 nosy: arigo priority: normal severity: normal status: open title: ctypes: structure with bitfields as argument type: crash versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file28156/test185_lib.tgz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 05:54:30 2012 From: report at bugs.python.org (Alex Gaynor) Date: Thu, 29 Nov 2012 04:54:30 +0000 Subject: [issue16576] ctypes: structure with bitfields as argument In-Reply-To: <1354164812.19.0.708202681719.issue16576@psf.upfronthosting.co.za> Message-ID: <1354164870.68.0.442665853743.issue16576@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 05:59:12 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 29 Nov 2012 04:59:12 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1354165152.59.0.997590020408.issue7976@psf.upfronthosting.co.za> ?ric Araujo added the comment: No problem! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 06:24:20 2012 From: report at bugs.python.org (Armin Rigo) Date: Thu, 29 Nov 2012 05:24:20 +0000 Subject: [issue16576] ctypes: structure with bitfields as argument In-Reply-To: <1354164812.19.0.708202681719.issue16576@psf.upfronthosting.co.za> Message-ID: <1354166660.81.0.77370006785.issue16576@psf.upfronthosting.co.za> Armin Rigo added the comment: The same misbehavior occurs if the structures are packed ("_pack_ = 1"). Attached in test186_lib.tgz. ---------- Added file: http://bugs.python.org/file28157/test186_lib.tgz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 06:49:02 2012 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 29 Nov 2012 05:49:02 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> Message-ID: <1354168142.11.0.326883937368.issue16574@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yeah, I agree the "in general" in PEP 1 is enough of a caveat. The unwritten rules in this particular case are that if something in a PEP is important enough to be permanently referenced, then it's important enough to be part of the language spec (either the main language reference or the stdlib reference), or else it should be a versioned informational PEP that gets replaced when updated (e.g. the WSGI spec, DB-API, packaging metadata etc). There have been a few PEPs, most notably the import PEPs, where that wasn't possible because such docs didn't exist, and documenting the existing system would have taken so many caveats that nobody was ever willing to do it. So PEP 302 became the de facto documentation for the modular part of the import system. Now that we have real docs in the language reference for 3.3+, PEP 302 will finally be able fade into irrelevance as a normative document. Now that the import case is resolved, I can't think of any Final PEPs where we're likely to break the rules any more, unless it's just to update them with a link to the normative docs. ---------- components: +Devguide -Documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 08:02:10 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 29 Nov 2012 07:02:10 +0000 Subject: [issue16565] Increase Py_AddPendingCall array size In-Reply-To: <1354157269.43.0.696632190945.issue16565@psf.upfronthosting.co.za> Message-ID: <1354172463.3334.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > If I try to acquire the GIL PyGILState_Ensure() call > PyObject_CallObject and release the GIL in the aio_completion_handler > function a SEGFAULT occurs in 2.7.3 but not in 3.3 and newer.. Well, can you post a traceback? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 08:50:07 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 29 Nov 2012 07:50:07 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1354175407.77.0.484290018688.issue4945@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Ezio told me my previous comment was hard to understand. For the record, what I meant was that if you have a statement like, "If *allow_nan* is ``True``, then .... Otherwise, ...," then this can be read to mean that something like 1 for *allow_nan* would be covered by the otherwise clause (because otherwise means "or else"). Changing "If *allow_nan* is ``True``" to "equals ``True``" would be one way to address this while still stating the preferred value. But as I told Ezio on IRC, I would be okay with whatever you come up with. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 08:54:07 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Nov 2012 07:54:07 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1354175647.67.0.0673678589664.issue4945@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Changing "If *allow_nan* is ``True``" to "equals ``True``" I don't think that's any more accurate. Many Python objects are 'true' but not equal to 'True' (e.g., nonempty collections). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 08:56:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 29 Nov 2012 07:56:20 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1354175780.08.0.0664830835283.issue4945@psf.upfronthosting.co.za> Chris Jerdonek added the comment: You're right. My mistake. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 09:16:04 2012 From: report at bugs.python.org (Daniel Urban) Date: Thu, 29 Nov 2012 08:16:04 +0000 Subject: [issue16572] Bad multi-inheritance support in some libs like threading or multiprocessing In-Reply-To: <1354138508.41.0.9459136379.issue16572@psf.upfronthosting.co.za> Message-ID: <1354176964.25.0.449617219995.issue16572@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +daniel.urban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 12:20:00 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Thu, 29 Nov 2012 11:20:00 +0000 Subject: [issue16472] Distutils+mingw links agains msvcr90, while python27.dll is linked agains msvcrt In-Reply-To: <1352900041.91.0.554679168644.issue16472@psf.upfronthosting.co.za> Message-ID: <1354188000.13.0.922588927087.issue16472@psf.upfronthosting.co.za> V?clav ?milauer added the comment: I am sorry for the initial confusion. python27.dll is really linked against MSVCR90. Its path, though, is c:\windows\winsxs\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_08e4299fa83d7e3c\MSVCR90.DLL, and perhaps is a different one found at runtime? Dependency walker also reveals, that python27.dll links against SHELL32, which itself links to MSVCRT. PS I am using the offical build of 2.7.3 on Windows7 64bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 12:43:06 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 29 Nov 2012 11:43:06 +0000 Subject: [issue15043] test_gdb is disallowed by default security settings in Fedora 17 In-Reply-To: <1354158960.46.0.0395663971572.issue15043@psf.upfronthosting.co.za> Message-ID: <20121129114307.GA14125@sleipnir.bytereef.org> Stefan Krah added the comment: The gdb version is "GNU gdb (GDB) Fedora (7.3.50.20110722-16.fc16)", which looks like either a pre-release of 7.4 or a patched version. Testing for (gdb_major_version, gdb_minor_version) >= (7, 3) would fix the specific failure on Fedora 16, but I don't know if it would break other 7.3.x versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 13:08:41 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Thu, 29 Nov 2012 12:08:41 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1354190921.17.0.95592738249.issue7976@psf.upfronthosting.co.za> Bruno Dupuis added the comment: Ok, changes made. I also updated the tests ---------- Added file: http://bugs.python.org/file28158/warnings_opt_parse_API-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 13:16:36 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 29 Nov 2012 12:16:36 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> Message-ID: <1354191396.74.0.566795475288.issue16574@psf.upfronthosting.co.za> Martin v. L?wis added the comment: 1. I think that the PEP author has the final say as to what specific text goes into the PEP. Contributors shouldn't modify other people's PEP without consent from the author(s). 2. This holds for all stages, including the Final stage. If the PEP author wants to clarify/elaborate, they may; if they don't feel like it, they don't need to (even if the implementation later deviates from the PEP). 3. We should avoid to refer to PEPs for specification in the documentation. If there is a documentation issue proposing to update the PEP because it's referenced from the documentation, the right action should be to stop referencing it, and to incorporate the PEP text into the documentation (as needed). 4. Even without the "In general" cop-out, I think the PEP is fine as written. It doesn't say (as Chris suggested in msg176603) that Final PEPs *should not* be modified, but that they *are not* modified. PEP 1 describes an ideal process, nobody should be surprised that the real world does not always follow the ideal. My biggest complaint about PEP 1 not being followed is the "PEP authors are responsible for collecting community feedback" requirement. Editing Final PEPs is absolutely no concern to me, since the PEP has already achieved what it was written for. So even if this rule was regularly ignored, I'd still continue to be a happy contributor to Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 13:22:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 29 Nov 2012 12:22:43 +0000 Subject: [issue16477] tarfile fails to close file handles in case of exception In-Reply-To: <1352983787.27.0.404679122442.issue16477@psf.upfronthosting.co.za> Message-ID: <3YByYF5NQYzRRK@mail.python.org> Roundup Robot added the comment: New changeset b7bdc0b3c2fe by Andrew Svetlov in branch '3.2': Issue #16477: Close tarfile internal handlers in case of exception. http://hg.python.org/cpython/rev/b7bdc0b3c2fe New changeset 80749ddc30b6 by Andrew Svetlov in branch '3.3': Merge issue #16477: Close tarfile internal handlers in case of exception. http://hg.python.org/cpython/rev/80749ddc30b6 New changeset 2d887691a99b by Andrew Svetlov in branch 'default': Merge issue #16477: Close tarfile internal handlers in case of exception. http://hg.python.org/cpython/rev/2d887691a99b New changeset ea4bdf5a2e69 by Andrew Svetlov in branch '2.7': Issue #16477: Close tarfile internal handlers in case of exception. http://hg.python.org/cpython/rev/ea4bdf5a2e69 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 13:23:37 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 29 Nov 2012 12:23:37 +0000 Subject: [issue16477] tarfile fails to close file handles in case of exception In-Reply-To: <1352983787.27.0.404679122442.issue16477@psf.upfronthosting.co.za> Message-ID: <1354191817.43.0.882885798731.issue16477@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks, Serhiy ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 13:27:04 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 29 Nov 2012 12:27:04 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354191396.74.0.566795475288.issue16574@psf.upfronthosting.co.za> Message-ID: <20121129072702.16a2e874@limelight.wooz.org> Barry A. Warsaw added the comment: On Nov 29, 2012, at 12:16 PM, Martin v. L?wis wrote: >1. I think that the PEP author has the final say as to what specific text >goes into the PEP. Contributors shouldn't modify other people's PEP without >consent from the author(s). > >2. This holds for all stages, including the Final stage. If the PEP author >wants to clarify/elaborate, they may; if they don't feel like it, they don't >need to (even if the implementation later deviates from the PEP). > >3. We should avoid to refer to PEPs for specification in the >documentation. If there is a documentation issue proposing to update the PEP >because it's referenced from the documentation, the right action should be to >stop referencing it, and to incorporate the PEP text into the documentation >(as needed). > >4. Even without the "In general" cop-out, I think the PEP is fine as >written. It doesn't say (as Chris suggested in msg176603) that Final PEPs >*should not* be modified, but that they *are not* modified. PEP 1 describes >an ideal process, nobody should be surprised that the real world does not >always follow the ideal. My biggest complaint about PEP 1 not being followed >is the "PEP authors are responsible for collecting community feedback" >requirement. Editing Final PEPs is absolutely no concern to me, since the PEP >has already achieved what it was written for. So even if this rule was >regularly ignored, I'd still continue to be a happy contributor to Python. I agree with all of this. Occasionally PEPs themselves may leave open the possibility for future additions or changes. Release schedule PEPs are one example. PEP 425 is another example, where the PEP seems like the logical choice for registering future tags. All this is fine IMHO, and doesn't need any further clarification in PEP 1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 13:30:29 2012 From: report at bugs.python.org (Felipe Cruz) Date: Thu, 29 Nov 2012 12:30:29 +0000 Subject: [issue16565] Increase Py_AddPendingCall array size In-Reply-To: <1354048654.58.0.545467206879.issue16565@psf.upfronthosting.co.za> Message-ID: <1354192229.0.0.829688570507.issue16565@psf.upfronthosting.co.za> Felipe Cruz added the comment: Running test_aio_read [New Thread 0x7ffff7ff7700 (LWP 20681)] [New Thread 0x7ffff61ff700 (LWP 20682)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff61ff700 (LWP 20682)] sem_post () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S:34 34 ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S: No such file or directory. (gdb) backtrace #0 sem_post () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S:34 #1 0x000000000051b053 in PyThread_release_lock (lock=0x0) at Python/thread_pthread.h:346 #2 0x00000000004c868f in PyEval_ReleaseLock () at Python/ceval.c:265 #3 0x0000000000501974 in PyThreadState_DeleteCurrent () at Python/pystate.c:321 #4 0x0000000000502116 in PyGILState_Release (oldstate=PyGILState_UNLOCKED) at Python/pystate.c:652 #5 0x00007ffff660ed44 in aio_completion_handler (sigval=...) at pyaio/core.c:26 #6 0x00007ffff6409cdc in notify_func_wrapper (arg=0x7ffff00008c0) at ../sysdeps/pthread/aio_notify.c:45 #7 0x00007ffff7bc4e9a in start_thread (arg=0x7ffff61ff700) at pthread_create.c:308 #8 0x00007ffff71f14bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #9 0x0000000000000000 in ?? () ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 13:51:48 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 29 Nov 2012 12:51:48 +0000 Subject: [issue16577] Suspect test.test_codeccallbacks.test_mutatingdecodehandler Message-ID: <1354193508.42.0.911887136635.issue16577@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc: The test created by 504084c04ac0 passes for bad reasons, at least for the second part: - "test.mutating" error handler is never used. - If I replace the last line of the test, it still passes, but the TypeError is raised by exc.object[:] = b"" (bytes are not mutable!) I suggest to revert this old change completely. The premises ("the decoder might use memory that's no longer in use") are no longer true. ---------- components: Unicode messages: 176645 nosy: amaury.forgeotdarc, ezio.melotti, haypo priority: normal severity: normal status: open title: Suspect test.test_codeccallbacks.test_mutatingdecodehandler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 14:08:39 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 29 Nov 2012 13:08:39 +0000 Subject: [issue16472] Distutils+mingw links agains msvcr90, while python27.dll is linked agains msvcrt In-Reply-To: <1352900041.91.0.554679168644.issue16472@psf.upfronthosting.co.za> Message-ID: <1354194519.02.0.786587822401.issue16472@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think further investigation should require analysing the crash in a debugger. It may well be that the crash is completely unrelated to msvcrt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 14:23:55 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 29 Nov 2012 13:23:55 +0000 Subject: [issue16323] Wrong C API documentation for locale encoding In-Reply-To: <1351173455.0.0.737976146006.issue16323@psf.upfronthosting.co.za> Message-ID: <3YBzvv1k7TzQcQ@mail.python.org> Roundup Robot added the comment: New changeset af45e9ec35f0 by Andrew Svetlov in branch '3.3': Remove redundant sentence from c-api docs (issue #16323) http://hg.python.org/cpython/rev/af45e9ec35f0 New changeset efedd0f62a7e by Andrew Svetlov in branch 'default': Merge: remove redundant sentence from c-api docs (issue #16323) http://hg.python.org/cpython/rev/efedd0f62a7e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 14:25:08 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 29 Nov 2012 13:25:08 +0000 Subject: [issue16323] Wrong C API documentation for locale encoding In-Reply-To: <1351173455.0.0.737976146006.issue16323@psf.upfronthosting.co.za> Message-ID: <1354195508.81.0.783219452278.issue16323@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Removed bad sentence. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 14:34:45 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 29 Nov 2012 13:34:45 +0000 Subject: [issue16565] Increase Py_AddPendingCall array size In-Reply-To: <1354048654.58.0.545467206879.issue16565@psf.upfronthosting.co.za> Message-ID: <1354196085.56.0.274681774287.issue16565@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Is it with a debug Python build? `PyThread_release_lock (lock=0x0)` is a bit worrying. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 14:43:33 2012 From: report at bugs.python.org (Robin Schreiber) Date: Thu, 29 Nov 2012 13:43:33 +0000 Subject: [issue15650] PEP 3121, 384 refactoring applied to dbm module In-Reply-To: <1344968074.48.0.47544287235.issue15650@psf.upfronthosting.co.za> Message-ID: <1354196613.14.0.896271184449.issue15650@psf.upfronthosting.co.za> Robin Schreiber added the comment: Take a look at the discussion in Issue 15653. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 15:01:45 2012 From: report at bugs.python.org (Felipe Cruz) Date: Thu, 29 Nov 2012 14:01:45 +0000 Subject: [issue16565] Increase Py_AddPendingCall array size In-Reply-To: <1354048654.58.0.545467206879.issue16565@psf.upfronthosting.co.za> Message-ID: <1354197705.23.0.477992987816.issue16565@psf.upfronthosting.co.za> Felipe Cruz added the comment: Yes! 2.7.3 build with pydebug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 15:32:28 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 29 Nov 2012 14:32:28 +0000 Subject: [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1354199548.91.0.037154996728.issue16194@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I think it should not be fixed in 2.7, so I guess to close the issue as wontfix. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 15:37:00 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 29 Nov 2012 14:37:00 +0000 Subject: [issue15989] Possible integer overflow of PyLong_AsLong() results In-Reply-To: <1348167705.87.0.588220983695.issue15989@psf.upfronthosting.co.za> Message-ID: <1354199820.92.0.711952211465.issue15989@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 16:08:52 2012 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 29 Nov 2012 15:08:52 +0000 Subject: [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1354201732.21.0.85005329657.issue16194@psf.upfronthosting.co.za> Nick Coghlan added the comment: The behaviour won't change in 2.7, but the docs at http://docs.python.org/2/library/imp.html#imp.load_dynamic still need to be clarified. e.g. add a note like: Note: the import internals identify extension modules by filename, so doing ``foo = load_dynamic("foo", "mod.so")`` and ``bar = load_dynamic("bar", "mod.so")`` will result in both foo and bar referring to the same module, regardless of whether or not ``mod.so`` exports an ``initbar`` function. On systems which support them, symlinks can be used to import multiple modules from the same shared library, as each reference to the module will use a different file name. (probably flagged as a CPython implementation detail, since it's really an accident of the implementation rather than a deliberately considered language feature) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 16:15:26 2012 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 29 Nov 2012 15:15:26 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1354202126.49.0.752407171448.issue16421@psf.upfronthosting.co.za> Nick Coghlan added the comment: One nice feature of this is the potential to simplify single-file distribution - pack your application into a zip file, and only need to extract a single shared library for *all* your extension modules, which could be handled via a utility function called in __main__.py rather than needing to be built into the interpreter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 16:27:21 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 29 Nov 2012 15:27:21 +0000 Subject: [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1354202841.41.0.951741947285.issue16194@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Pushed doc patch. Nick, is it good for you? ---------- Added file: http://bugs.python.org/file28159/issue16194.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 16:46:27 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Thu, 29 Nov 2012 15:46:27 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1354203987.81.0.791494351949.issue7976@psf.upfronthosting.co.za> Changes by Bruno Dupuis : ---------- hgrepos: +161 Added file: http://bugs.python.org/file28160/warnings_opt_parse_API-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 16:58:58 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 29 Nov 2012 15:58:58 +0000 Subject: [issue16573] 2to3 should treat enumerate like sorted for zip, map, filter, dict, xrange In-Reply-To: <1354147080.22.0.730661642804.issue16573@psf.upfronthosting.co.za> Message-ID: <1354204738.46.0.198507643133.issue16573@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the patch. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 16:58:59 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 29 Nov 2012 15:58:59 +0000 Subject: [issue16573] 2to3 should treat enumerate like sorted for zip, map, filter, dict, xrange In-Reply-To: <1354147080.22.0.730661642804.issue16573@psf.upfronthosting.co.za> Message-ID: <3YC3Lp0nLWzQgg@mail.python.org> Roundup Robot added the comment: New changeset 3c6d8461b09f by Benjamin Peterson in branch '3.2': enumerate only requires an iterable (closes #16573) http://hg.python.org/cpython/rev/3c6d8461b09f New changeset 4ff17cf130eb by Benjamin Peterson in branch '3.3': merge 3.2 (#16573) http://hg.python.org/cpython/rev/4ff17cf130eb New changeset 2bb604a691de by Benjamin Peterson in branch '2.7': enumerate only requires an iterable (closes #16573) http://hg.python.org/cpython/rev/2bb604a691de New changeset ce3f0399ea33 by Benjamin Peterson in branch 'default': merge 3.3 (#16573) http://hg.python.org/cpython/rev/ce3f0399ea33 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 17:02:45 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Thu, 29 Nov 2012 16:02:45 +0000 Subject: [issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__ In-Reply-To: <1348615231.16.0.514985949274.issue16049@psf.upfronthosting.co.za> Message-ID: <1354204965.02.0.209990936411.issue16049@psf.upfronthosting.co.za> Bruno Dupuis added the comment: This solution hides the risk of metaclass conflicts, as the user did not explicitly set the metaclass. IMO, this risk should be clearly told in the Doc. ---------- nosy: +bruno.dupuis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 17:08:55 2012 From: report at bugs.python.org (Felipe Cruz) Date: Thu, 29 Nov 2012 16:08:55 +0000 Subject: [issue16565] Increase Py_AddPendingCall array size In-Reply-To: <1354048654.58.0.545467206879.issue16565@psf.upfronthosting.co.za> Message-ID: <1354205335.38.0.657872505744.issue16565@psf.upfronthosting.co.za> Felipe Cruz added the comment: Without debug backtrace #0 sem_post () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S:34 #1 0x00000000004d456e in PyGILState_Release () #2 0x00007ffff59b9cdc in notify_func_wrapper (arg=0x7ffff00008c0) at ../sysdeps/pthread/aio_notify.c:45 #3 0x00007ffff7bc4e9a in start_thread (arg=0x7ffff59b5700) at pthread_create.c:308 #4 0x00007ffff69b64bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #5 0x0000000000000000 in ?? () ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 17:34:25 2012 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 29 Nov 2012 16:34:25 +0000 Subject: [issue16549] regression: -m json.tool module is broken In-Reply-To: <1353799140.48.0.264325786565.issue16549@psf.upfronthosting.co.za> Message-ID: <1354206865.37.0.0258826577094.issue16549@psf.upfronthosting.co.za> anatoly techtonik added the comment: +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 17:48:11 2012 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Thu, 29 Nov 2012 16:48:11 +0000 Subject: [issue16577] Suspect test.test_codeccallbacks.test_mutatingdecodehandler In-Reply-To: <1354193508.42.0.911887136635.issue16577@psf.upfronthosting.co.za> Message-ID: <1354207691.28.0.489514113498.issue16577@psf.upfronthosting.co.za> Walter D?rwald added the comment: True, the second test uses the wrong error handler. And yes, you're correct, bytes are now immutable. And even if I try to decode a bytearray, what the callback gets to see is still an immutable bytes object:: import codecs def mutating(exc): if isinstance(exc, UnicodeDecodeError): exc.object[:] = b"" return ("\u4242", 0) else: raise TypeError("don't know how to handle %r" % exc) codecs.register_error('mutating', mutating) input = bytearray(b'bbb\xff') input.decode('ascii', 'mutating') This still raises: TypeError: 'bytes' object does not support item assignment So the change should indeed be reverted. ---------- nosy: +doerwalter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 17:55:23 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 29 Nov 2012 16:55:23 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1354208123.59.0.000505733020453.issue16421@psf.upfronthosting.co.za> Brett Cannon added the comment: Are you still planning on committing this, Andrew? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 17:56:34 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 29 Nov 2012 16:56:34 +0000 Subject: [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1354208194.07.0.599535751032.issue16194@psf.upfronthosting.co.za> Brett Cannon added the comment: The doc patch LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 18:03:21 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Thu, 29 Nov 2012 17:03:21 +0000 Subject: [issue6835] doctest problem with decorated function when decorator is defined in separate file In-Reply-To: <1251989637.01.0.106852845631.issue6835@psf.upfronthosting.co.za> Message-ID: <1354208601.0.0.701225961549.issue6835@psf.upfronthosting.co.za> Changes by Bruno Dupuis : ---------- nosy: +bruno.dupuis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 18:16:26 2012 From: report at bugs.python.org (=?utf-8?q?Gabriel_Rodr=C3=ADguez_Alberich?=) Date: Thu, 29 Nov 2012 17:16:26 +0000 Subject: [issue16578] Regular expressions with empty named groups breaks isname check Message-ID: <1354209386.4.0.0657079011573.issue16578@psf.upfronthosting.co.za> New submission from Gabriel Rodr?guez Alberich: >>> import re >>> re.compile("(?P<>)") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/re.py", line 190, in compile return _compile(pattern, flags) File "/usr/lib/python2.7/re.py", line 240, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python2.7/sre_compile.py", line 500, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python2.7/sre_parse.py", line 673, in parse p = _parse_sub(source, pattern, 0) File "/usr/lib/python2.7/sre_parse.py", line 308, in _parse_sub itemsappend(_parse(source, state)) File "/usr/lib/python2.7/sre_parse.py", line 544, in _parse if not isname(name): File "/usr/lib/python2.7/sre_parse.py", line 218, in isname if not isident(name[0]): IndexError: string index out of range isname() shouldn't be blindly accessing name[0]. ---------- components: Regular Expressions messages: 176664 nosy: Gabriel.Rodr?guez.Alberich, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Regular expressions with empty named groups breaks isname check type: crash versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 18:16:55 2012 From: report at bugs.python.org (=?utf-8?q?Gabriel_Rodr=C3=ADguez_Alberich?=) Date: Thu, 29 Nov 2012 17:16:55 +0000 Subject: [issue16578] Regular expressions with empty named groups break isname check In-Reply-To: <1354209386.4.0.0657079011573.issue16578@psf.upfronthosting.co.za> Message-ID: <1354209415.47.0.994327556947.issue16578@psf.upfronthosting.co.za> Changes by Gabriel Rodr?guez Alberich : ---------- title: Regular expressions with empty named groups breaks isname check -> Regular expressions with empty named groups break isname check _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 18:25:16 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 29 Nov 2012 17:25:16 +0000 Subject: [issue14803] Add feature to allow code execution prior to __main__ invocation In-Reply-To: <1336981419.55.0.280530546632.issue14803@psf.upfronthosting.co.za> Message-ID: <1354209916.53.0.152225867429.issue14803@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 18:30:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 29 Nov 2012 17:30:32 +0000 Subject: [issue16578] Regular expressions with empty named groups break isname check In-Reply-To: <1354209386.4.0.0657079011573.issue16578@psf.upfronthosting.co.za> Message-ID: <1354210232.26.0.370169985552.issue16578@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fixed in issue12759. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 18:32:22 2012 From: report at bugs.python.org (=?utf-8?q?Gabriel_Rodr=C3=ADguez_Alberich?=) Date: Thu, 29 Nov 2012 17:32:22 +0000 Subject: [issue16578] Regular expressions with empty named groups break isname check In-Reply-To: <1354209386.4.0.0657079011573.issue16578@psf.upfronthosting.co.za> Message-ID: <1354210342.06.0.683750440965.issue16578@psf.upfronthosting.co.za> Gabriel Rodr?guez Alberich added the comment: Uh, sorry about that. Thanks. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 18:32:36 2012 From: report at bugs.python.org (=?utf-8?q?Gabriel_Rodr=C3=ADguez_Alberich?=) Date: Thu, 29 Nov 2012 17:32:36 +0000 Subject: [issue16578] Regular expressions with empty named groups break isname check In-Reply-To: <1354209386.4.0.0657079011573.issue16578@psf.upfronthosting.co.za> Message-ID: <1354210356.55.0.0814227026814.issue16578@psf.upfronthosting.co.za> Changes by Gabriel Rodr?guez Alberich : ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 18:35:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 29 Nov 2012 17:35:09 +0000 Subject: [issue16578] Regular expressions with empty named groups break isname check In-Reply-To: <1354209386.4.0.0657079011573.issue16578@psf.upfronthosting.co.za> Message-ID: <1354210509.98.0.37305024937.issue16578@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> committed/rejected superseder: -> "(?P=)" input for Tools/scripts/redemo.py raises unnhandled exception _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 18:45:45 2012 From: report at bugs.python.org (Alex stein) Date: Thu, 29 Nov 2012 17:45:45 +0000 Subject: [issue16579] .pyw disturb multiprocessing behavior Message-ID: <1354211145.86.0.68056435154.issue16579@psf.upfronthosting.co.za> New submission from Alex stein: I made a software synchronizing every 2 seconds files from the network through SSH using Paramiko library. The software works normally on Linux and Windows 32 and 64 bits (never tried on Mac). At the office, I use Windows XP 32 bits: By comfort I made a link on the desktop pointing to the __init__.py file. I had no problems. Then I switched the extension file to .pyw. The files are not synchronized every 2 seconds anymore but typically some time after 5 minutes. At the restart the files are immediately detected and synchronized. The software runs multiples threads and processes. I tryed to update Python interpreter but the bug remains. ---------- components: Windows messages: 176667 nosy: Alex.stein priority: normal severity: normal status: open title: .pyw disturb multiprocessing behavior type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 18:52:31 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 29 Nov 2012 17:52:31 +0000 Subject: [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <3YC5sq15bzzQgg@mail.python.org> Roundup Robot added the comment: New changeset 94de77bd0b4b by Andrew Svetlov in branch '2.7': Issue #16194: document imp.load_dynamic problems http://hg.python.org/cpython/rev/94de77bd0b4b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 18:54:11 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 29 Nov 2012 17:54:11 +0000 Subject: [issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so In-Reply-To: <1349953870.22.0.50760531633.issue16194@psf.upfronthosting.co.za> Message-ID: <1354211651.27.0.881081047011.issue16194@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Documentation is fixed, behavior cannot be changed. Close the issue ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 18:59:19 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 29 Nov 2012 17:59:19 +0000 Subject: [issue16579] .pyw disturb multiprocessing behavior In-Reply-To: <1354211145.86.0.68056435154.issue16579@psf.upfronthosting.co.za> Message-ID: <1354211958.99.0.232912001915.issue16579@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Unless you give more information, this is unlikely to be a bug in Python. - Is your program running with Python 2? - When it runs as a .py file, does it print to the console? If both answers are yes, keep in mind that there is no console with a .pyw file, and the program will hang when some sys.stdout or sys.stderr buffer is full. In this case, you could try Python 3 instead, or simply redirect sys.stdout and sys.stderr to a disk file. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 20:25:09 2012 From: report at bugs.python.org (Paddy McCarthy) Date: Thu, 29 Nov 2012 19:25:09 +0000 Subject: [issue16580] Add examples to int.to_bytres and int.from_bytes Message-ID: <1354217109.61.0.534443148437.issue16580@psf.upfronthosting.co.za> New submission from Paddy McCarthy: http://docs.python.org/3.3/library/stdtypes.html?highlight=to_bytes#int.to_bytes and http://docs.python.org/3.3/library/stdtypes.html?highlight=to_bytes#int.to_bytes would benefit from an example showing what they do based on simpler coding. I have such an example that I wrote here: http://paddy3118.blogspot.co.uk/2012/11/some-identities-for-python-inttobytes.html that you can use. I.e. >>> n = 2491969579123783355964723219455906992268673266682165637887 >>> length = 25 >>> n2bytesbig = n.to_bytes(length, 'big') >>> n2byteslittle = n.to_bytes(length, 'little') >>> assert n2bytesbig == bytes( (n >> i*8) & 0xff for i in reversed(range(length))) >>> assert n2byteslittle == bytes( (n >> i*8) & 0xff for i in range(length)) >>> assert n == sum( n2bytesbig[::-1][i] << i*8 for i in range(length) ) >>> assert n == sum( n2byteslittle[i] << i*8 for i in range(length) ) >>> assert n == int.from_bytes(n2bytesbig, byteorder='big') >>> assert n == int.from_bytes(n2byteslittle, byteorder='little') >>> ---------- assignee: docs at python components: Documentation messages: 176671 nosy: docs at python, paddy3118 priority: normal severity: normal status: open title: Add examples to int.to_bytres and int.from_bytes type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 20:44:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 29 Nov 2012 19:44:38 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1354218278.1.0.194182269953.issue15990@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching a 2.7 version of the patch for this issue. >From the patch committed to Python 3, I removed mention of keyword-only parameters, inspect.Parameter, and PEP 362 (because all are specific to Python 3). ---------- Added file: http://bugs.python.org/file28161/issue-15990-5-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 22:29:20 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 29 Nov 2012 21:29:20 +0000 Subject: [issue15043] test_gdb is disallowed by default security settings in Fedora 17 In-Reply-To: <1339418920.32.0.804230672204.issue15043@psf.upfronthosting.co.za> Message-ID: <1354224560.02.0.703797073123.issue15043@psf.upfronthosting.co.za> Stefan Krah added the comment: I'm using the .gdbinit solution on the Fedora buildbot now. Trying to categorize gdb pre-releases and patched versions is probably not a good use of time. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 22:40:23 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 29 Nov 2012 21:40:23 +0000 Subject: [issue16467] frozen importlib required for extending Python interpreter not public In-Reply-To: <1352831594.42.0.797931332936.issue16467@psf.upfronthosting.co.za> Message-ID: <1354225223.8.0.386530107717.issue16467@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 22:40:40 2012 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 29 Nov 2012 21:40:40 +0000 Subject: [issue15043] test_gdb is disallowed by default security settings in Fedora 17 In-Reply-To: <1339418920.32.0.804230672204.issue15043@psf.upfronthosting.co.za> Message-ID: <1354225240.11.0.71950857589.issue15043@psf.upfronthosting.co.za> Dave Malcolm added the comment: In my Fedora Python packages I've been applying this patch: http://pkgs.fedoraproject.org/cgit/python.git/plain/00156-gdb-autoload-safepath.patch which uses this code fragment to detect if gdb has the autoload safe path code, rather than trying to guess it from version numbers (which I *think* is failing for Stefan due to a backport of the autoload stuff in that gdb): def gdb_has_autoload_safepath(): # Recent GDBs will only auto-load scripts from certain safe # locations, so we will need to turn off this protection. # However, if the GDB doesn't have it, then the following # command will generate noise on stderr (rhbz#817072): cmd = "--eval-command=set auto-load safe-path /" p = subprocess.Popen(["gdb", "--batch", cmd], stderr=subprocess.PIPE) _, stderr = p.communicate() return '"on" or "off" expected.' not in stderr HAS_AUTOLOAD_SAFEPATH = gdb_has_autoload_safepath() (etc) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 29 23:57:05 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 29 Nov 2012 22:57:05 +0000 Subject: [issue16574] clarify policy on updates to final peps In-Reply-To: <1354150615.68.0.531483999972.issue16574@psf.upfronthosting.co.za> Message-ID: <1354229825.02.0.204780926599.issue16574@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for the feedback. I will post here a devguide patch to include some of this information in the devguide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 00:51:07 2012 From: report at bugs.python.org (Matthias Klose) Date: Thu, 29 Nov 2012 23:51:07 +0000 Subject: [issue16235] Add python-config.sh for use during cross compilation. In-Reply-To: <1350251714.79.0.226527559426.issue16235@psf.upfronthosting.co.za> Message-ID: <1354233067.06.0.0966280025581.issue16235@psf.upfronthosting.co.za> Matthias Klose added the comment: looks fine, just one more minor issue: please use @LIBPL@ directly. there's no feedback from others, so I think this should go in as the extra script first, and not replace the original one immediately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 01:03:20 2012 From: report at bugs.python.org (Matthias Klose) Date: Fri, 30 Nov 2012 00:03:20 +0000 Subject: [issue16235] Add python-config.sh for use during cross compilation. In-Reply-To: <1350251714.79.0.226527559426.issue16235@psf.upfronthosting.co.za> Message-ID: <1354233800.43.0.0659675662922.issue16235@psf.upfronthosting.co.za> Matthias Klose added the comment: oh, the equivalent for flags = ['-I' + sysconfig.get_path('include'), '-I' + sysconfig.get_path('platinclude')] is still missing. I know that both scripts versions are only run post-install, but let's have the same output. background: I'm (mis)using this for a Debian/Ubuntu multiarch installation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 03:00:10 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 30 Nov 2012 02:00:10 +0000 Subject: [issue16581] define "PEP editor" in PEP 1 Message-ID: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to define "PEP editor" (or "PEP editors") in PEP 1 before it is used in the document and to provide certain clarifying information. In particular, PEP 1 should say whether editorship is an invitation-only status and/or how one becomes a PEP editor. It would also be good if it said (for transparency) how to go about seeing the current list of editors. There is also inconsistent singular/plural usage that I think would be good to clear up. Currently, in many places PEP 1 says "the PEP editor" (singular), so it's not clear if each PEP has its own editor, if there is a single PEP editor for all PEPs at any one time, or if it simply means "the PEP editor that happens to reply to an e-mail to peps at python.org". PEP 0 also has this issue because its introduction says, "[This] PEP contains the index of all Python Enhancement Proposals, known as PEPs. PEP numbers are assigned by the PEP Editor, and once assigned are never changed." ---------- assignee: docs at python components: Documentation messages: 176678 nosy: Jeremy.Hylton, barry, chris.jerdonek, docs at python, goodger, ncoghlan priority: normal severity: normal status: open title: define "PEP editor" in PEP 1 type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 04:04:34 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 30 Nov 2012 03:04:34 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <3YCL6m5xN7zNGR@mail.python.org> Roundup Robot added the comment: New changeset f44b8d69e5fc by Chris Jerdonek in branch '2.7': Backport from 3.2: improve argument/parameter documentation (issue #15990). http://hg.python.org/cpython/rev/f44b8d69e5fc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 04:05:46 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 30 Nov 2012 03:05:46 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1354244746.85.0.971289228442.issue15990@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 08:53:28 2012 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Rekucki?=) Date: Fri, 30 Nov 2012 07:53:28 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1354262008.37.0.608658692989.issue14621@psf.upfronthosting.co.za> ?ukasz Rekucki added the comment: Note that a few weeks ago, Ruby has switched from Murmur to SipHash for this exact reason: http://www.ruby-lang.org/en/news/2012/11/09/ruby19-hashdos-cve-2012-5371/ ---------- nosy: +?ukasz.Rekucki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 12:04:26 2012 From: report at bugs.python.org (Thomas Kluyver) Date: Fri, 30 Nov 2012 11:04:26 +0000 Subject: [issue16349] Document whether it's safe to use bytes for struct format string In-Reply-To: <1351428222.6.0.656645524198.issue16349@psf.upfronthosting.co.za> Message-ID: <1354273466.77.0.412129212726.issue16349@psf.upfronthosting.co.za> Thomas Kluyver added the comment: I'm happy to put together a docs patch, but I don't have any indication of the right answer (is it a safe feature to use, or an implementation detail?) Is there another venue where I should raise the question? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 12:59:21 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Fri, 30 Nov 2012 11:59:21 +0000 Subject: [issue6835] doctest problem with decorated function when decorator is defined in separate file In-Reply-To: <1251989637.01.0.106852845631.issue6835@psf.upfronthosting.co.za> Message-ID: <1354276761.67.0.376963158133.issue6835@psf.upfronthosting.co.za> Bruno Dupuis added the comment: updated the test to 3k (requires sh and Python2.{6,7} as python2). It works. Anyone to close? ---------- nosy: +ezio.melotti, michael.foord Added file: http://bugs.python.org/file28162/mytest3k.sh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 13:01:13 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Fri, 30 Nov 2012 12:01:13 +0000 Subject: [issue6835] doctest problem with decorated function when decorator is defined in separate file In-Reply-To: <1251989637.01.0.106852845631.issue6835@psf.upfronthosting.co.za> Message-ID: <1354276873.65.0.335816224763.issue6835@psf.upfronthosting.co.za> Bruno Dupuis added the comment: it's a duplicate of #1108 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 13:14:45 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Fri, 30 Nov 2012 12:14:45 +0000 Subject: [issue12891] Clean up traces of manifest template in packaging In-Reply-To: <1315062467.17.0.194525671954.issue12891@psf.upfronthosting.co.za> Message-ID: <1354277685.0.0.62390086175.issue12891@psf.upfronthosting.co.za> Bruno Dupuis added the comment: Sounds easy even though there's quite a bit of lines to impact. I may do it, I just need a go. Tarek? ?ric? anyone? ---------- nosy: +bruno.dupuis versions: -3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 14:34:46 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Fri, 30 Nov 2012 13:34:46 +0000 Subject: [issue10259] Entry text not set if all of 'Font', 'Foreground' and 'Justify' are set In-Reply-To: <1288491057.47.0.0560000338786.issue10259@psf.upfronthosting.co.za> Message-ID: <1354282486.74.0.319786954807.issue10259@psf.upfronthosting.co.za> Bruno Dupuis added the comment: I updated the script to 3k. Now the behaviour is very odd : Python 2.7: works only if `justify="right"` is commented out. Python 3.3: Shroedinger-like behaviour (sometimes dead, sometimes alive, nobody knows before we check) whith `justify="right"` Looks like some kind of race-condition or something, so this results may only be relevant on my hardware (2 yo low-end PC). I'm not a tkinter expert, so even if the app code looks good I need someone that knows tk to double-check if there is some oddities in the script before we go further. ---------- nosy: +bruno.dupuis, gpolo versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 -Python 2.6 Added file: http://bugs.python.org/file28163/Project5_3k.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 14:50:27 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Fri, 30 Nov 2012 13:50:27 +0000 Subject: [issue16472] Distutils+mingw links agains msvcr90, while python27.dll is linked agains msvcrt In-Reply-To: <1352900041.91.0.554679168644.issue16472@psf.upfronthosting.co.za> Message-ID: <1354283427.36.0.734060684381.issue16472@psf.upfronthosting.co.za> V?clav ?milauer added the comment: I was having a compiled module consistently crash at import time when linking against msvcr90, and being imported fine when linked against msvcrt. I will try to investigate further with mingw folks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 15:08:28 2012 From: report at bugs.python.org (Marc Schlaich) Date: Fri, 30 Nov 2012 14:08:28 +0000 Subject: [issue777588] asyncore is broken for windows if connection is refused Message-ID: <1354284508.5.0.948578188033.issue777588@psf.upfronthosting.co.za> Marc Schlaich added the comment: This issue is not fixed. Another workaround would be the `win32select` function from twisted: http://twistedmatrix.com/trac/browser/trunk/twisted/internet/selectreactor.py#L23 ---------- nosy: +schlamar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 15:24:18 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 30 Nov 2012 14:24:18 +0000 Subject: [issue14892] 'import readline' hangs when launching with '&' on BSD and OS X In-Reply-To: <1337799319.38.0.727886103909.issue14892@psf.upfronthosting.co.za> Message-ID: <1354285458.75.0.868429869159.issue14892@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 15:44:32 2012 From: report at bugs.python.org (Ray Donnelly) Date: Fri, 30 Nov 2012 14:44:32 +0000 Subject: [issue16235] Add python-config.sh for use during cross compilation. In-Reply-To: <1350251714.79.0.226527559426.issue16235@psf.upfronthosting.co.za> Message-ID: <1354286672.4.0.844653159024.issue16235@psf.upfronthosting.co.za> Ray Donnelly added the comment: New patch attached: LIBPL changed to a more direct AC_SUBST and PLATINCDIR used for --includes and --cflags. ---------- Added file: http://bugs.python.org/file28164/0000-add-python-config-sh.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 15:49:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 14:49:49 +0000 Subject: [issue10259] Entry text not set if all of 'Font', 'Foreground' and 'Justify' are set In-Reply-To: <1288491057.47.0.0560000338786.issue10259@psf.upfronthosting.co.za> Message-ID: <1354286989.06.0.981549786717.issue10259@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I confirm this. The bug appears sporadically on 3.x. When the entry displays text, self.entry1['textvariable'] is 'PY_VAR0'. When it does not, self.entry1['textvariable'] is '0' (actually the value of "text" parameter). The bug is due to the fact that option "text" is applied after the option "textvariable". Due to string hash randomization it occurs in 50% on 3.3+ (and always or never on default 2.7, depending on other options used in this call). For work around this bug you should not use both "text" and "textvariable" keyword or dict parameters in one call. Probably it is worth to mention in the documentation (unfortunately the Tkinter documentation is almost non-existent). ---------- assignee: -> docs at python components: +Documentation -Tkinter nosy: +docs at python, serhiy.storchaka stage: -> needs patch type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 15:50:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 14:50:15 +0000 Subject: [issue10259] Entry text not set if all of 'Font', 'Foreground' and 'Justify' are set In-Reply-To: <1288491057.47.0.0560000338786.issue10259@psf.upfronthosting.co.za> Message-ID: <1354287015.15.0.858573039708.issue10259@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Tkinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 15:54:49 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Fri, 30 Nov 2012 14:54:49 +0000 Subject: [issue6036] Clean up test_posixpath.py In-Reply-To: <1242465658.7.0.601350758359.issue6036@psf.upfronthosting.co.za> Message-ID: <1354287289.86.0.781444750316.issue6036@psf.upfronthosting.co.za> Changes by Bruno Dupuis : ---------- nosy: +bruno.dupuis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 17:01:01 2012 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 30 Nov 2012 16:01:01 +0000 Subject: [issue10259] Entry text not set if all of 'Font', 'Foreground' and 'Justify' are set In-Reply-To: <1288491057.47.0.0560000338786.issue10259@psf.upfronthosting.co.za> Message-ID: <1354291260.99.0.332693381868.issue10259@psf.upfronthosting.co.za> Guilherme Polo added the comment: Calm down for a moment. This is just incorrect usage of Entry. There is no "text" parameter documented for this class (see its docstring, for a quick reference on that). Also, there is a lot of Tkinter documentation, the official one at can be found at http://docs.python.org/2/library/tkinter.html, which includes links for further documentation. This is actually unrelated to string hash randomization, it is only barely related to the unordered nature of the hash implementation. What actually happens is that the tk lib usually accepts abbreviations of parameter names. So specifying "text" and "textvariable" is the same for tk. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 17:17:21 2012 From: report at bugs.python.org (Michael Edwards) Date: Fri, 30 Nov 2012 16:17:21 +0000 Subject: [issue14174] argparse.REMAINDER fails to parse remainder correctly In-Reply-To: <1330690090.15.0.511487898244.issue14174@psf.upfronthosting.co.za> Message-ID: <1354292241.18.0.629115211945.issue14174@psf.upfronthosting.co.za> Michael Edwards added the comment: I'm attaching my own bug repro script for Eric. Is this sufficient? I can demonstrate the entire resulting Namespace, but the problem is that argparse doesn't even produce a Namespace. The cases I show simply fail. ---------- nosy: +Michael.Edwards Added file: http://bugs.python.org/file28165/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 17:26:45 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 30 Nov 2012 16:26:45 +0000 Subject: [issue10589] I/O ABC docs should specify which methods have implementations In-Reply-To: <1291143953.85.0.0204032538698.issue10589@psf.upfronthosting.co.za> Message-ID: <1354292805.44.0.269432039034.issue10589@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Updated the patch. Is it ok now? ---------- nosy: +asvetlov Added file: http://bugs.python.org/file28166/issue10589.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 17:45:08 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 30 Nov 2012 16:45:08 +0000 Subject: [issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins In-Reply-To: <1353123389.46.0.245856363901.issue16490@psf.upfronthosting.co.za> Message-ID: <1354293908.89.0.78651843803.issue16490@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Larry, Ping... :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 17:53:32 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 30 Nov 2012 16:53:32 +0000 Subject: [issue16535] json encoder unable to handle decimal In-Reply-To: <1353624338.46.0.574343718645.issue16535@psf.upfronthosting.co.za> Message-ID: <1354294412.38.0.876079419322.issue16535@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 18:07:05 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 30 Nov 2012 17:07:05 +0000 Subject: [issue12891] Clean up traces of manifest template in packaging In-Reply-To: <1315062467.17.0.194525671954.issue12891@psf.upfronthosting.co.za> Message-ID: <1354295225.64.0.442451553895.issue12891@psf.upfronthosting.co.za> ?ric Araujo added the comment: Packaging is removed from the stdlib, and distutils2 (the backport for Python 2.5-3.3) shares its uncertain future. It would take too long to explain why that is here; I?m working on a blog post to do that and will give a link if you are interested. ---------- assignee: tarek -> eric.araujo stage: needs patch -> versions: +3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 19:01:34 2012 From: report at bugs.python.org (Robin Schreiber) Date: Fri, 30 Nov 2012 18:01:34 +0000 Subject: [issue15727] PyType_FromSpecWithBases tp_new bugfix In-Reply-To: <1345391866.4.0.54341725267.issue15727@psf.upfronthosting.co.za> Message-ID: <1354298494.92.0.324175638162.issue15727@psf.upfronthosting.co.za> Robin Schreiber added the comment: Here is revised version of the patch. Martin von L?wis and I had discovered a way to reproduce problems with refactored modules, that occur without this patch. This is was several months ago, however I will try to give you a code sample! :-) ---------- keywords: +patch Added file: http://bugs.python.org/file28167/PyType_FromSpecWithBases_tp_new_fix_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 19:03:53 2012 From: report at bugs.python.org (Abraham Karplus) Date: Fri, 30 Nov 2012 18:03:53 +0000 Subject: [issue16582] Tkinter calls SystemExit with string Message-ID: <1354298633.36.0.337905476432.issue16582@psf.upfronthosting.co.za> New submission from Abraham Karplus: Exiting a Tkinter application normally results in printing '0' and exiting with error code 1. This is a result of Tkinter's _exit function, whose default argument for code is the string '0'. It then calls SystemExit with the code argument. However, according to the SystemExit documentation "if [the argument] has another type (such as a string), the object?s value is printed and the exit status is one". A simple fix for this would be to change the Tkinter _exit function to convert code to an int before passing it to SystemExit. ---------- components: Tkinter messages: 176696 nosy: Abraham Karplus priority: normal severity: normal status: open title: Tkinter calls SystemExit with string type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 19:12:10 2012 From: report at bugs.python.org (=?utf-8?b?UmVuw6k=?=) Date: Fri, 30 Nov 2012 18:12:10 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1354299130.95.0.556177271791.issue14621@psf.upfronthosting.co.za> Ren? added the comment: Christian Heimes: It has always been trivial to artificially generate collisions for fast hashes designed for hash tables, like MurmurHash. I wouldn't call Murmurhash3 "busted" because of that, as this was never a design goal. It is a known propriety of this type of hash: you do that basically running them backwards. You can't even call that cryptanalysis. Of course, you need the seed to search those collisions, but from this thread it seems very difficult, if not impossible, not to leak the random seed to the attacker. I see the various collision counting alternatives proposed as the less intrusive and definitive solution for this problem. It also has the benefit that it can work for any type of key. Some pseudo code: hash as always, with a fast hash. if reprobes > initial_threshold: if the table has only one key type AND it has a robust comparison method: store the collisions in a O(log n) worst case structure (tree). elif the object has a secondary slow secure hash: try searching/inserting the key again with the new secure hash. It works like a double hashing reprobing hash table. elif collisions > max_threshold: raise Exception("Under attack or the object is using a crappy hash, with no fallback.") The first option, the O(log n) structure, can be ignored as unnecessary complication (even though there is already a path implementing that), but I suspect it may be faster than a secure hash. If not, then there is really no point in this option, except if the secure hash proves to be not so secure. ---------- nosy: +ReneSac _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 19:14:43 2012 From: report at bugs.python.org (Abraham Karplus) Date: Fri, 30 Nov 2012 18:14:43 +0000 Subject: [issue16583] Tkinter nested SystemExit Message-ID: <1354299283.97.0.595004930549.issue16583@psf.upfronthosting.co.za> New submission from Abraham Karplus: When a callback function gets called from Tkinter and raises SystemExit (either directly or through sys.exit), a new SystemExit exception is raised with the original exception as its code field, such as SystemExit(SystemExit(),) This is due to a bug in Tkinter's CallWrapper, where it has except SystemExit as msg: raise SystemExit(msg) which since msg is a SystemExit instance, creates the nesting. This bug did not exist in Python 2 because there the code was except SystemExit, msg: raise SystemExit, msg and this raises msg, as it already is a SystemExit instance. I suspect the bug was introduced by using the 2to3 tool, as it will do the conversion. If so, this is a bug in 2to3, as the two snippets are not functionally identical. ---------- components: Tkinter messages: 176698 nosy: Abraham Karplus priority: normal severity: normal status: open title: Tkinter nested SystemExit type: behavior versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 19:15:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 18:15:41 +0000 Subject: [issue10259] Entry text not set if all of 'Font', 'Foreground' and 'Justify' are set In-Reply-To: <1288491057.47.0.0560000338786.issue10259@psf.upfronthosting.co.za> Message-ID: <1354299341.54.0.163308510086.issue10259@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > So specifying "text" and "textvariable" is the same for tk. Thanks for clarifying. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 19:27:20 2012 From: report at bugs.python.org (Till Maas) Date: Fri, 30 Nov 2012 18:27:20 +0000 Subject: [issue16584] unhandled IOError filecmp.cmpfiles() if file not readable Message-ID: <1354300040.38.0.588944499058.issue16584@psf.upfronthosting.co.za> New submission from Till Maas: If filecmp is used with files that the user is not allowed to read, it creates an IOError exception instead of returning the file's name as an file that could not compared. The documentation says: http://docs.python.org/2/library/filecmp.html Returns three lists of file names: match, mismatch, errors. [...] errors lists the names of files which could not be compared. Files are listed in errors if they don?t exist in one of the directories, the user lacks permission to read them or if the comparison could not be done for some other reason. The attached file fails with an IOError: $ python filecmp-minimal.py Traceback (most recent call last): File "filecmp-minimal.py", line 21, in print filecmp.cmpfiles(join(t, "a"), join(t, "b"), ["testfile"], shallow=False) File "/usr/lib64/python2.7/filecmp.py", line 258, in cmpfiles res[_cmp(ax, bx, shallow)].append(x) File "/usr/lib64/python2.7/filecmp.py", line 270, in _cmp return not abs(cmp(a, b, sh)) File "/usr/lib64/python2.7/filecmp.py", line 53, in cmp outcome = _do_cmp(f1, f2) File "/usr/lib64/python2.7/filecmp.py", line 66, in _do_cmp with open(f1, 'rb') as fp1, open(f2, 'rb') as fp2: IOError: [Errno 13] Permission denied: '/tmp/tmpp93pmt/a/testfile' A quick glance at the current code in hg shows, that this bug is probably also present in all later Python versions than 2.7. I will attach a small patch that fixes this bug. ---------- components: Library (Lib) files: filecmp-minimal.py messages: 176700 nosy: till priority: normal severity: normal status: open title: unhandled IOError filecmp.cmpfiles() if file not readable type: crash versions: Python 2.7 Added file: http://bugs.python.org/file28168/filecmp-minimal.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 19:27:54 2012 From: report at bugs.python.org (Till Maas) Date: Fri, 30 Nov 2012 18:27:54 +0000 Subject: [issue16584] unhandled IOError filecmp.cmpfiles() if file not readable In-Reply-To: <1354300040.38.0.588944499058.issue16584@psf.upfronthosting.co.za> Message-ID: <1354300074.46.0.301572358907.issue16584@psf.upfronthosting.co.za> Changes by Till Maas : ---------- keywords: +patch Added file: http://bugs.python.org/file28169/filecmp_exception.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 19:55:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 18:55:08 +0000 Subject: [issue16349] Document whether it's safe to use bytes for struct format string In-Reply-To: <1351428222.6.0.656645524198.issue16349@psf.upfronthosting.co.za> Message-ID: <1354301708.29.0.267801260508.issue16349@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Python 2 supports only str. Support for unicode objects has been added in r59687 (merged with other unrelated changes in changeset 13aabc23cf2e). Maybe Raymond can explain why the type for the Struct.format was chosen bytes, not unicode. ---------- components: +Extension Modules -Library (Lib) nosy: +rhettinger, serhiy.storchaka versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 20:05:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 19:05:18 +0000 Subject: [issue16349] Document whether it's safe to use bytes for struct format string In-Reply-To: <1351428222.6.0.656645524198.issue16349@psf.upfronthosting.co.za> Message-ID: <1354302318.55.0.14929571205.issue16349@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No, this is not r59687. I can't found from which revision in 59680-59695 it came. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 20:16:14 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 30 Nov 2012 19:16:14 +0000 Subject: [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1354302974.04.0.678628981779.issue16581@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +anthony_baxter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 20:17:48 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 30 Nov 2012 19:17:48 +0000 Subject: [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <20121130141742.78397170@resist.wooz.org> Barry A. Warsaw added the comment: On Nov 30, 2012, at 02:00 AM, Chris Jerdonek wrote: >In particular, PEP 1 should say whether editorship is an invitation-only >status and/or how one becomes a PEP editor. It would also be good if it said >(for transparency) how to go about seeing the current list of editors. IMO, becoming a PEP editor is by invitation-only, as decided by consensus of the current set of PEP editors. The current list of editors is exactly equivalent to the members of the peps@ mailing list, currently: Anthony Baxter Barry Warsaw Brett Cannon Georg Brandl David Goodger Guido van Rossum Jesse Noller If there are editors who are not members of this mailing list, they should be! If there are editors who want to retire and be removed from the list, please let me know. >There is also inconsistent singular/plural usage that I think would be good >to clear up. Currently, in many places PEP 1 says "the PEP editor" >(singular), so it's not clear if each PEP has its own editor, if there is a >single PEP editor for all PEPs at any one time, or if it simply means "the >PEP editor that happens to reply to an e-mail to peps at python.org". The latter, and it should be plural everywhere. >PEP 0 also has this issue because its introduction says, "[This] PEP contains >the index of all Python Enhancement Proposals, known as PEPs. PEP numbers >are assigned by the PEP Editor, and once assigned are never changed." Plural. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 20:20:28 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 30 Nov 2012 19:20:28 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1354303228.7.0.174164371487.issue14621@psf.upfronthosting.co.za> Christian Heimes added the comment: No, Murmur3 *is* busted. Some clever people have found a way to perform a universal multicollision attack, that's a key independent attack. An attacker doesn't need to know the seed for an attack. Collision counting as not a solution for the issue, just a workaround. It has been proofed for decades that a tree data structure is not vulnerable to this kind of collision attacks. A hash function with crypto properties is the second best solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 20:39:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 19:39:20 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1354304360.64.0.960034723932.issue14621@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: However a tree data structure is vulnerable to sorted data. May be worth it to have the two hash functions (switchable by interpreter option or environment variable), strong for applications which can be attacked, and fast for applications which run in safe environment? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 20:46:32 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Fri, 30 Nov 2012 19:46:32 +0000 Subject: [issue12891] Clean up traces of manifest template in packaging In-Reply-To: <1315062467.17.0.194525671954.issue12891@psf.upfronthosting.co.za> Message-ID: <1354304792.58.0.505771758991.issue12891@psf.upfronthosting.co.za> Bruno Dupuis added the comment: Ok, thanks, ?ric. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 20:51:19 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Fri, 30 Nov 2012 19:51:19 +0000 Subject: [issue10259] Entry text not set if all of 'Font', 'Foreground' and 'Justify' are set In-Reply-To: <1288491057.47.0.0560000338786.issue10259@psf.upfronthosting.co.za> Message-ID: <1354305079.91.0.52471819476.issue10259@psf.upfronthosting.co.za> Bruno Dupuis added the comment: Thank you for the review, Guilherme. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 20:55:05 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 30 Nov 2012 19:55:05 +0000 Subject: [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1354305305.49.0.39434312872.issue16581@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for providing the info. To clarify, is membership in peps@ restricted to editors? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 20:58:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 19:58:30 +0000 Subject: [issue16583] Tkinter nested SystemExit In-Reply-To: <1354299283.97.0.595004930549.issue16583@psf.upfronthosting.co.za> Message-ID: <1354305510.1.0.0792592702656.issue16583@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +2to3 (2.x to 3.x conversion tool) nosy: +benjamin.peterson, gpolo versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 20:59:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 19:59:42 +0000 Subject: [issue16582] Tkinter calls SystemExit with string In-Reply-To: <1354298633.36.0.337905476432.issue16582@psf.upfronthosting.co.za> Message-ID: <1354305582.27.0.81059388211.issue16582@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +gpolo versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 21:01:02 2012 From: report at bugs.python.org (=?utf-8?b?UmVuw6k=?=) Date: Fri, 30 Nov 2012 20:01:02 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1354305662.68.0.843634806073.issue14621@psf.upfronthosting.co.za> Ren? added the comment: Serhiy Storchaka: I said a O(log n) data structure, so I was referring to balanced trees, like AVL, RBT or B+-tree. They are not vulnerable to sorted data. The downside is that they need the keys to provide robust comparison methods (like, if z < y < x, then z < x). Christian Heimes: Right, the seed indeed doesn't provides protection... But the collision counting is compatible with your two suggestions, and solves the problem. The only difference is that you don't get the performance hit if not under attack. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 21:06:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 20:06:32 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1354305992.63.0.159104942898.issue14621@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ren?, a balanced tree requires rebalancing on every (or almost every) item for some special (sorted) data sequences. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 21:20:22 2012 From: report at bugs.python.org (Philip Jenvey) Date: Fri, 30 Nov 2012 20:20:22 +0000 Subject: [issue16585] surrogateescape broken w/ multibytecodecs' encode Message-ID: <1354306822.13.0.130768178209.issue16585@psf.upfronthosting.co.za> New submission from Philip Jenvey: surrogateescape claims to be "implemented by all standard Python codecs" http://docs.python.org/3/library/codecs.html#codec-base-classes However it fails w/ multibytecodecs on encode: Python 3.2.3+ (3.2:eb999002916c, Oct 26 2012, 16:11:03) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> "\u30fb".encode('gb18030') b'\x819\xa79' >>> "\u30fb\udc80".encode('gb18030', 'surrogateescape') Traceback (most recent call last): File "", line 1, in TypeError: encoding error handler must return (unicode, int) tuple The problem being that multibytecodec.c forces error handler return results to always be unicode and surrogateescape returns bytes here. (surrogatepass also similarly returns bytes but it claims to be utf-8 only) The error handler spec seems to imply that error handlers should always return unicode, because "The encoder will encode the replacement" http://docs.python.org/3/library/codecs.html#codecs.register_error but obviously that's not really the case: some codecs special case bytes results and copy them directly to the output, e.g.: http://hg.python.org/cpython/file/ce3f0399ea33/Objects/unicodeobject.c#l6305 ---------- components: Interpreter Core messages: 176711 nosy: pjenvey priority: normal severity: normal status: open title: surrogateescape broken w/ multibytecodecs' encode versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 21:20:44 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 30 Nov 2012 20:20:44 +0000 Subject: [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354305305.49.0.39434312872.issue16581@psf.upfronthosting.co.za> Message-ID: <20121130152040.3b61a295@resist.wooz.org> Barry A. Warsaw added the comment: On Nov 30, 2012, at 07:55 PM, Chris Jerdonek wrote: >Thanks for providing the info. To clarify, is membership in peps@ restricted >to editors? Yes. It may not be a perfect overlap, but that's the best we have, and should be the intent, IMHO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 21:28:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 20:28:55 +0000 Subject: [issue16585] surrogateescape broken w/ multibytecodecs' encode In-Reply-To: <1354306822.13.0.130768178209.issue16585@psf.upfronthosting.co.za> Message-ID: <1354307335.46.0.74483010909.issue16585@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Unicode nosy: +benjamin.peterson, ezio.melotti, haypo, lemburg, pitrou, serhiy.storchaka type: -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 21:33:04 2012 From: report at bugs.python.org (Michal Petrucha) Date: Fri, 30 Nov 2012 20:33:04 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1354305992.63.0.159104942898.issue14621@psf.upfronthosting.co.za> Message-ID: <20121130203303.GA14181@ksp.sk> Michal Petrucha added the comment: On Fri, Nov 30, 2012 at 08:06:32PM +0000, Serhiy Storchaka wrote: > Ren?, a balanced tree requires rebalancing on every (or almost > every) item for some special (sorted) data sequences. That's perfectly true and it holds for most unsorted sequences as well -- that's why they are balanced. The fact that the tree is always balanced guarantees that each rebalance takes at most O(log n) operations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 21:34:37 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 30 Nov 2012 20:34:37 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1354305992.63.0.159104942898.issue14621@psf.upfronthosting.co.za> Message-ID: <50B91853.8050206@egenix.com> Marc-Andre Lemburg added the comment: On 30.11.2012 21:06, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > Ren?, a balanced tree requires rebalancing on every (or almost every) item for some special (sorted) data sequences. Sure, but that's still O(N*log N) for an attack scenario, not O(N^2). I think the main point here is that using hash tables or dictionaries for these things without any size limit is simply a wrong development approach. Developers need to be made aware of the problem and given data structures that they can use more safely to store the data and instead of trying to hide away the problem using some crypto approach, it's better to offer methods that allow developers to gain control over the problem (e.g. via an exception) rather than hoping for few hash collisions. If a developer has to build a lookup table from untrusted data, she should be able to say: try: mapping = insert_untrusted_data(source) except UnderAttackError: return 'no thank you' instead of: # Hmm, let's hope this doesn't bomb... mapping = insert_untrusted_data(source) At the moment, the best thing you can do is insert the data in chunks and measure the time it takes for each chunk. If it takes too long, you raise the UnderAttackError. If we make the collision counting limit a per-dictionary adjustable limit with some global default limit, the above could be written as: try: mapping = {} mapping.max_collisions = 100 mapping.update(source) except CollisionLimitError: return 'no thank you' Aside: It's better to know you worst case and program for it, rather than to ignore the problem and hope an attacker won't find your secret key. In the above case, if you know what the worst-case timing is for a 100-item dictionary, you can safely deal with it, possibly adjusting the limit to more suitable value for your application. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 30 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2012-11-28: Released eGenix mx Base 3.2.5 ... http://egenix.com/go36 2013-01-22: Python Meeting Duesseldorf ... 53 days to go ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 21:35:39 2012 From: report at bugs.python.org (=?utf-8?b?UmVuw6k=?=) Date: Fri, 30 Nov 2012 20:35:39 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1354307739.71.0.325990342727.issue14621@psf.upfronthosting.co.za> Ren? added the comment: Serhiy Storchaka: Yes, but it is still O(log n) worst case. Even in the worst case rebalancing, you only need to walk up/down rotating/spliting every node in your path. As the tree height is guaranteed to be x * log n (x from 1 to 2, depending on the algorithm), the rebalancing operation is aways limited by O(log n). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 21:47:43 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Fri, 30 Nov 2012 20:47:43 +0000 Subject: [issue6036] Clean up test_posixpath.py In-Reply-To: <1242465658.7.0.601350758359.issue6036@psf.upfronthosting.co.za> Message-ID: <1354308463.71.0.996449330968.issue6036@psf.upfronthosting.co.za> Bruno Dupuis added the comment: Mark, correct, this test doesn't exist in 3.X branches. I updated the patch for 2.7. It is trivial, so if someone may merge it, we could close this bug (please, before next SCM switch :-) ) ---------- nosy: +loewis Added file: http://bugs.python.org/file28170/6036_test_posixpath_cleanup_2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 21:50:11 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 30 Nov 2012 20:50:11 +0000 Subject: [issue16585] surrogateescape broken w/ multibytecodecs' encode In-Reply-To: <1354306822.13.0.130768178209.issue16585@psf.upfronthosting.co.za> Message-ID: <1354308611.29.0.364643269044.issue16585@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Codecs should be fixed to accept bytes from the error handler and the definition in the docs loosened. Returning bytes seems to be useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 22:08:13 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 30 Nov 2012 21:08:13 +0000 Subject: [issue11797] 2to3 does not correct "reload" In-Reply-To: <1302191844.85.0.922084217825.issue11797@psf.upfronthosting.co.za> Message-ID: <1354309693.75.0.225421832669.issue11797@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the patch. Could you try to share could with fix_intern? Maybe by moving some things to fixer_utils. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 22:15:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 30 Nov 2012 21:15:52 +0000 Subject: [issue6036] Clean up test_posixpath.py In-Reply-To: <1242465658.7.0.601350758359.issue6036@psf.upfronthosting.co.za> Message-ID: <3YCpKp0spCzN6W@mail.python.org> Roundup Robot added the comment: New changeset 980b13df6ccd by Benjamin Peterson in branch '2.7': Remove redundant check for symlink. (closes #6036) http://hg.python.org/cpython/rev/980b13df6ccd ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 22:25:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 21:25:54 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1354307739.71.0.325990342727.issue14621@psf.upfronthosting.co.za> Message-ID: <201211302325.37439.storchaka@gmail.com> Serhiy Storchaka added the comment: > Serhiy Storchaka: Yes, but it is still O(log n) worst case. Even in the > worst case rebalancing, you only need to walk up/down rotating/spliting > every node in your path. As the tree height is guaranteed to be x * log n > (x from 1 to 2, depending on the algorithm), the rebalancing operation is > aways limited by O(log n). Agree. However I think that for large enough data a balanced tree is slower than a hashtable with any slow hash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 22:27:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 21:27:24 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <50B91853.8050206@egenix.com> Message-ID: <201211302327.11422.storchaka@gmail.com> Serhiy Storchaka added the comment: > try: > mapping = {} > mapping.max_collisions = 100 > mapping.update(source) > except CollisionLimitError: > return 'no thank you' May be use a more general solution? try: with run_with_timeout(timeout=100, timer=collisions_count): mapping = insert_untrusted_data(source) except TimeoutError: return 'no thank you' (You can can use different measurement for timeout: user time, real time, ticks count, collisions count, or even a user defined timer). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 22:29:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 21:29:14 +0000 Subject: [issue16585] surrogateescape broken w/ multibytecodecs' encode In-Reply-To: <1354306822.13.0.130768178209.issue16585@psf.upfronthosting.co.za> Message-ID: <1354310954.14.0.940823122354.issue16585@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 22:30:46 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Fri, 30 Nov 2012 21:30:46 +0000 Subject: [issue2921] enable embedding: declare/#define only py* symbols in #includes In-Reply-To: <1211232563.03.0.480695098403.issue2921@psf.upfronthosting.co.za> Message-ID: <1354311046.56.0.47774951965.issue2921@psf.upfronthosting.co.za> Changes by Bruno Dupuis : ---------- nosy: +bruno.dupuis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 22:34:22 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 30 Nov 2012 21:34:22 +0000 Subject: [issue16566] Structure._anonymous_ should not allow strings In-Reply-To: <1354051789.98.0.293941478089.issue16566@psf.upfronthosting.co.za> Message-ID: <1354311262.54.0.38312603394.issue16566@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 22:38:30 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 30 Nov 2012 21:38:30 +0000 Subject: [issue16568] allow constructors to be documented separately from class In-Reply-To: <1354093412.82.0.692042663136.issue16568@psf.upfronthosting.co.za> Message-ID: <1354311510.78.0.645658405451.issue16568@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 22:39:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 21:39:09 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1354311549.32.0.627125939051.issue2897@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 22:40:45 2012 From: report at bugs.python.org (Dustin Boswell) Date: Fri, 30 Nov 2012 21:40:45 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings Message-ID: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> New submission from Dustin Boswell: Here's a command-line that parses a json string containing a large array of short strings: python -c "import simplejson as json; json.loads('[' + '''\"asdfadf\", ''' * 100000000 + '\"asdfasf\"]') " That works, but if you increase the size a little bit (so the string is > 2^31) python -c "import simplejson as json; json.loads('[' + '''\"asdfadf\", ''' * 300000000 + '\"asdfasf\"]') " Traceback (most recent call last): File "", line 1, in File "/usr/lib/pymodules/python2.6/simplejson/__init__.py", line 307, in loads return _default_decoder.decode(s) File "/usr/lib/pymodules/python2.6/simplejson/decoder.py", line 338, in decode raise ValueError(errmsg("Extra data", s, end, len(s))) ValueError: Extra data: line 1 column -994967285 - line 1 column 3300000011 (char -994967285 - 3300000011) Here's my version: $ python Python 2.6.5 (r265:79063, Oct 1 2012, 22:04:36) [GCC 4.4.3] on linux2 >>> import sys;print("%x" % sys.maxsize, sys.maxsize > 2**32) ('7fffffffffffffff', True) Also note that the test above requires at least 20GB of memory (that's not a bug, just a heads-up). ---------- components: Library (Lib) messages: 176722 nosy: Dustin.Boswell priority: normal severity: normal status: open title: json library can't parse large (> 2^31) strings type: crash versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 22:50:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 21:50:14 +0000 Subject: [issue4805] Make python code compilable with a C++ compiler In-Reply-To: <1230872206.73.0.47638283248.issue4805@psf.upfronthosting.co.za> Message-ID: <1354312214.36.0.798265391182.issue4805@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 22:53:41 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 30 Nov 2012 21:53:41 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354312421.87.0.233583436511.issue16586@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 22:56:27 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 30 Nov 2012 21:56:27 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1354312587.37.0.0768396342053.issue7976@psf.upfronthosting.co.za> ?ric Araujo added the comment: More comments in the review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 23:40:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 22:40:24 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354312421.95.0.727265189507.issue16586@psf.upfronthosting.co.za> Message-ID: <201212010040.06587.storchaka@gmail.com> Serhiy Storchaka added the comment: I saw nothing that could lead to a bug, except a few of the obsolete functions for work with size_t (for compatibility with versions <2.6). Here is a patch that gets rid of this outdated code. I don't have enough memory to check if this will help, but I think that at least for 3.4 it is worth to apply as a code cleanup. ---------- keywords: +patch Added file: http://bugs.python.org/file28171/json_size_t_cleanup.patch Added file: http://bugs.python.org/file28172/json_size_t_cleanup-2.7.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r ce3f0399ea33 Modules/_json.c --- a/Modules/_json.c Thu Nov 29 10:58:43 2012 -0500 +++ b/Modules/_json.c Sat Dec 01 00:32:05 2012 +0200 @@ -2,20 +2,6 @@ #include "structmember.h" #include "accu.h" -#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TYPE) -#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) -#endif -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -#define PY_SSIZE_T_MAX INT_MAX -#define PY_SSIZE_T_MIN INT_MIN -#define PyInt_FromSsize_t PyInt_FromLong -#define PyInt_AsSsize_t PyInt_AsLong -#endif -#ifndef Py_IS_FINITE -#define Py_IS_FINITE(X) (!Py_IS_INFINITY(X) && !Py_IS_NAN(X)) -#endif - #ifdef __GNUC__ #define UNUSED __attribute__((__unused__)) #else @@ -129,33 +115,12 @@ raise_errmsg(char *msg, PyObject *s, Py_ssize_t end); static PyObject * encoder_encode_string(PyEncoderObject *s, PyObject *obj); -static int -_convertPyInt_AsSsize_t(PyObject *o, Py_ssize_t *size_ptr); -static PyObject * -_convertPyInt_FromSsize_t(Py_ssize_t *size_ptr); static PyObject * encoder_encode_float(PyEncoderObject *s, PyObject *obj); #define S_CHAR(c) (c >= ' ' && c <= '~' && c != '\\' && c != '"') #define IS_WHITESPACE(c) (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || ((c) == '\r')) -static int -_convertPyInt_AsSsize_t(PyObject *o, Py_ssize_t *size_ptr) -{ - /* PyObject to Py_ssize_t converter */ - *size_ptr = PyLong_AsSsize_t(o); - if (*size_ptr == -1 && PyErr_Occurred()) - return 0; - return 1; -} - -static PyObject * -_convertPyInt_FromSsize_t(Py_ssize_t *size_ptr) -{ - /* Py_ssize_t to PyObject converter */ - return PyLong_FromSsize_t(*size_ptr); -} - static Py_ssize_t ascii_escape_unichar(Py_UCS4 c, unsigned char *output, Py_ssize_t chars) { @@ -265,7 +230,7 @@ if (errmsg_fn == NULL) return; } - pymsg = PyObject_CallFunction(errmsg_fn, "(zOO&)", msg, s, _convertPyInt_FromSsize_t, &end); + pymsg = PyObject_CallFunction(errmsg_fn, "(zOn)", msg, s, end); if (pymsg) { PyErr_SetObject(PyExc_ValueError, pymsg); Py_DECREF(pymsg); @@ -524,7 +489,7 @@ Py_ssize_t end; Py_ssize_t next_end = -1; int strict = 1; - if (!PyArg_ParseTuple(args, "OO&|i:scanstring", &pystr, _convertPyInt_AsSsize_t, &end, &strict)) { + if (!PyArg_ParseTuple(args, "On|i:scanstring", &pystr, &end, &strict)) { return NULL; } if (PyUnicode_Check(pystr)) { @@ -1087,7 +1052,7 @@ PyScannerObject *s; assert(PyScanner_Check(self)); s = (PyScannerObject *)self; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO&:scan_once", kwlist, &pystr, _convertPyInt_AsSsize_t, &idx)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "On:scan_once", kwlist, &pystr, &idx)) return NULL; if (PyUnicode_Check(pystr)) { @@ -1288,8 +1253,8 @@ assert(PyEncoder_Check(self)); s = (PyEncoderObject *)self; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO&:_iterencode", kwlist, - &obj, _convertPyInt_AsSsize_t, &indent_level)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "On:_iterencode", kwlist, + &obj, &indent_level)) return NULL; if (_PyAccu_Init(&acc)) return NULL; -------------- next part -------------- diff -r 1e614dae8448 Modules/_json.c --- a/Modules/_json.c Fri Nov 30 16:15:24 2012 -0500 +++ b/Modules/_json.c Sat Dec 01 00:25:45 2012 +0200 @@ -1,18 +1,5 @@ #include "Python.h" #include "structmember.h" -#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TYPE) -#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) -#endif -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -#define PY_SSIZE_T_MAX INT_MAX -#define PY_SSIZE_T_MIN INT_MIN -#define PyInt_FromSsize_t PyInt_FromLong -#define PyInt_AsSsize_t PyInt_AsLong -#endif -#ifndef Py_IS_FINITE -#define Py_IS_FINITE(X) (!Py_IS_INFINITY(X) && !Py_IS_NAN(X)) -#endif #ifdef __GNUC__ #define UNUSED __attribute__((__unused__)) @@ -121,10 +108,6 @@ raise_errmsg(char *msg, PyObject *s, Py_ssize_t end); static PyObject * encoder_encode_string(PyEncoderObject *s, PyObject *obj); -static int -_convertPyInt_AsSsize_t(PyObject *o, Py_ssize_t *size_ptr); -static PyObject * -_convertPyInt_FromSsize_t(Py_ssize_t *size_ptr); static PyObject * encoder_encode_float(PyEncoderObject *s, PyObject *obj); @@ -138,23 +121,6 @@ #define MAX_EXPANSION MIN_EXPANSION #endif -static int -_convertPyInt_AsSsize_t(PyObject *o, Py_ssize_t *size_ptr) -{ - /* PyObject to Py_ssize_t converter */ - *size_ptr = PyInt_AsSsize_t(o); - if (*size_ptr == -1 && PyErr_Occurred()) - return 0; - return 1; -} - -static PyObject * -_convertPyInt_FromSsize_t(Py_ssize_t *size_ptr) -{ - /* Py_ssize_t to PyObject converter */ - return PyInt_FromSsize_t(*size_ptr); -} - static Py_ssize_t ascii_escape_char(Py_UNICODE c, char *output, Py_ssize_t chars) { @@ -354,7 +320,7 @@ if (errmsg_fn == NULL) return; } - pymsg = PyObject_CallFunction(errmsg_fn, "(zOO&)", msg, s, _convertPyInt_FromSsize_t, &end); + pymsg = PyObject_CallFunction(errmsg_fn, "(zOn)", msg, s, end); if (pymsg) { PyErr_SetObject(PyExc_ValueError, pymsg); Py_DECREF(pymsg); @@ -791,7 +757,7 @@ Py_ssize_t next_end = -1; char *encoding = NULL; int strict = 1; - if (!PyArg_ParseTuple(args, "OO&|zi:scanstring", &pystr, _convertPyInt_AsSsize_t, &end, &encoding, &strict)) { + if (!PyArg_ParseTuple(args, "On|zi:scanstring", &pystr, &end, &encoding, &strict)) { return NULL; } if (encoding == NULL) { @@ -1663,7 +1629,7 @@ PyScannerObject *s; assert(PyScanner_Check(self)); s = (PyScannerObject *)self; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO&:scan_once", kwlist, &pystr, _convertPyInt_AsSsize_t, &idx)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "On:scan_once", kwlist, &pystr, &idx)) return NULL; if (PyString_Check(pystr)) { @@ -1883,8 +1849,8 @@ PyEncoderObject *s; assert(PyEncoder_Check(self)); s = (PyEncoderObject *)self; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO&:_iterencode", kwlist, - &obj, _convertPyInt_AsSsize_t, &indent_level)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "On:_iterencode", kwlist, + &obj, &indent_level)) return NULL; rval = PyList_New(0); if (rval == NULL) From report at bugs.python.org Fri Nov 30 23:51:28 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 30 Nov 2012 22:51:28 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <201211302327.11422.storchaka@gmail.com> Message-ID: <50B93867.5020209@egenix.com> Marc-Andre Lemburg added the comment: On 30.11.2012 22:27, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > >> try: >> mapping = {} >> mapping.max_collisions = 100 >> mapping.update(source) >> except CollisionLimitError: >> return 'no thank you' > > May be use a more general solution? > > try: > with run_with_timeout(timeout=100, timer=collisions_count): > mapping = insert_untrusted_data(source) > except TimeoutError: > return 'no thank you' > > (You can can use different measurement for timeout: user time, real time, ticks > count, collisions count, or even a user defined timer). Sure, as long as there's a way to break into the execution, any such method would do. The problem is that you'd have to check for the timeout at some point and the .update() call is running completely in C, so the only way to break into execution is either by explicitly adding a runtime check to the code, or use a signal (which is a can of worms better avoided :-)). Collision counting is one such method of detecting that something is likely not working according to plan, but it's really only another way of implementing the explicit runtime check. Using other counters or timers would work just as well. As long as you know that there are places in your code that can produce CPU time overloads, you can address those issues. The dictionary implementation is one such place, where you can run into the problem, but there are usually many other such areas in more complex applications as well, e.g. calculations that enter endless loops for some parameters, deadlocks, I/O operations that take unusually long (e.g. due to disk errors), poorly written drivers of all sorts, etc. etc. If there's a way to solve all these things in general and without explicit runtime checks, I'd like to know :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 23:57:00 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 30 Nov 2012 22:57:00 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354316220.16.0.114171984287.issue16586@psf.upfronthosting.co.za> Ezio Melotti added the comment: Even if the json module can't handle these values, the error message can be improved. Serhiy, does you patch have any effect on the error message? ---------- nosy: +ezio.melotti type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 30 23:59:50 2012 From: report at bugs.python.org (Dustin Boswell) Date: Fri, 30 Nov 2012 22:59:50 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354316390.75.0.815364032314.issue16586@psf.upfronthosting.co.za> Dustin Boswell added the comment: Here's a slightly smaller/cleaner test case that only requires 12GB of ram to run: python -c "import simplejson as json; json.loads('[' + '''\".......\", ''' * 200000000 + '0]') " Traceback (most recent call last): File "", line 1, in File "/usr/lib/pymodules/python2.6/simplejson/__init__.py", line 307, in loads ---------- _______________________________________ Python tracker _______________________________________